fix(runtime): use typed pthread attributes for Linux stack bounds - #9752
fix(runtime): use typed pthread attributes for Linux stack bounds#9752proggeramlug wants to merge 2 commits into
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Team Run ID: 📒 Files selected for processing (6)
Included review availability: Your plan provides up to 8 included reviews per hour; 0 remain after this review. 📝 WalkthroughWalkthroughThe runtime adds a validated Linux pthread stack-bound helper. GC roots, error-stack frames, and frame-pointer walking now use the shared helper. Tests cover current-thread and custom-thread stack bounds. ChangesLinux stack-bound handling
Estimated code review effort: 3 (Moderate) | ~20 minutes Merge Risk: ⚪ Minimal · up to Linux stack-bound discovery is consolidated behind a validated pthread helper for GC and error-stack walking, preserving safe fallback behavior. No current merge-blocking risk remains. 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches 💡 1🛠️ Fix failing CI checks 💡
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
Landed on |
Linux builds fail
-D warningsbecause the GC and Error.stack paths redeclare three pthread functions with incompatible pointer types. The ARM64 GC frame walker repeats the byte-buffer variant. Replace all three implementations with one Linux-only helper usinglibc::pthread_attr_tand libc's declarations.The shared helper has target-correct storage alignment and size, destroys attributes after a successful lookup, and returns zero if bounds cannot be read or overflow. GC and frame walkers retain their existing zero-bound fallback. Two runtime tests check current-thread bounds and workers with different requested stack sizes.
Validation:
12efed1222, LinuxRUSTFLAGS="-D warnings" cargo check -p perry-runtime --libfails with the three conflicting-declaration errors; the same command passes with this change.This removes the pre-existing Linux warnings failure reported on #9746, #9747, #9748 and #9750. The separate baseline raw-TLS policy failure is addressed by #9750. No version bump.
Summary by CodeRabbit