-
Notifications
You must be signed in to change notification settings - Fork 13.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Guard pages are disabled on musl. #31506
Comments
I've found this issue again through #42816 as it bounced. I poked around in the source code for musl and it looks like guard pages are not disabled. What it looks like is that guard page detection in libstd is disabled. Our detection of the guard page relies on I believe the consequence of this is that on musl you don't get a pretty "you overflowed your stack" error message, you just get a scary segfault. Technically though I believe guard pages are indeed enabled and we'll guarantee segfaults on stack overflow. |
Looking at the musl source, musl is now specifying the guard size as of the feb 2018 commit: |
I tried enabling it in https://github.com/rust-lang/rust/blob/6ecad338381cc3b8d56e2df22e5971a598eddd6c/src/libstd/sys/unix/thread.rs but overflow tests fail the same way as before. |
In #30629 I disabled guard pages on musl. I did this because one of the pthread calls (I've forgotten which) was segfaulting during runtime initialization on i686-unknown-linux-musl, with my local build of musl, and I just wanted it working.
It should at least be on for x86_64 where it's known to work on the bots.
The text was updated successfully, but these errors were encountered: