-
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
pthread_get_stacksize_np returns incorrect values for the main thread on OS X 10.9 #43347
Comments
Are we sure OS X doesn’t just put the guard page on the main thread by default? |
All of the evidence that I've seen suggests that OS X already has guard pages in place. |
In fact there should be guard pages in place for all other threads too. |
It looks like calling pthread_get_stacksize_np returns all kinds of different things on different versions of OS X. On 10.8 it gives a hard coded 8MB It seems like the only way to reliably get the stack size of the main thread is to use mach_vm_region_info() |
Discussed during triage today, the conclusion was that this doesn't seem super high priority, so P-medium. It seems like we should just remove the main stack guard page on OSX like we've already done on Linux. |
We can probably use this code as reference: |
Triage: no changes I'm aware of |
|
I don't know if the rust-lang policy would be to close out this issue that affects a now retired target or not, but fyi macports added a workaround for this issue taken from llvm. (As noted in the discussion above, |
See:
robovm/robovm#274
https://groups.google.com/forum/#!topic/address-sanitizer/7_abqFZ5wXw
http://mail.openjdk.java.net/pipermail/hotspot-dev/2013-October/011388.html
pthread_get_stacksize_np returns 512KB for the main thread instead of the 8MB that it's supposed to. This causes us to allocate our guard page in the middle of the stack.
The text was updated successfully, but these errors were encountered: