-
-
Notifications
You must be signed in to change notification settings - Fork 5.6k
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
Call pthread_attr_init
in jl_init_stack_limits
#55594
Conversation
Looks like this indeed fixes the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should be in the FreeBSD only section?
I don't know, should it? Doesn't seem to be required on Linux though it shouldn't hurt to call it. |
It may cause a memory leak, since it fails to get destroyed |
Doesn't it get destroyed here? Line 78 in 7d2a7de
|
The second does, but not the first |
I don't understand, I only see one Lines 50 to 101 in 7d2a7de
|
PR 55515 seems to have introduced segfaults on FreeBSD during the `atexit` tests. Prior to that PR, we had been calling `pthread_attr_init` in `jl_init_stack_limits` on FreeBSD. According to the manual page for `pthread_attr_get_np`, it is "HIGHLY RECOMMENDED" to use `pthread_attr_init` to allocate storage. Might as well put it back then, and hopefully it'll fix the segfaults.
7d2a7de
to
76e72db
Compare
I still don't get why it shouldn't be called on Linux, but at any rate, I've moved the call to be FreeBSD only. |
Quoth Jameson in Slack, "just merge." Okie dokie |
PR 55515 seems to have introduced segfaults on FreeBSD during the `atexit` and `ccall` tests. Prior to that PR, we had been calling `pthread_attr_init` in `jl_init_stack_limits` on FreeBSD. According to the [manual page](https://man.freebsd.org/cgi/man.cgi?query=pthread_attr_get_np&apropos=0&sektion=3&manpath=FreeBSD+13.2-RELEASE&arch=default&format=html) for `pthread_attr_get_np`, it is "HIGHLY RECOMMENDED" to use `pthread_attr_init` to allocate storage. Might as well put it back then, as it fixes the segfaults.
#55515 seems to have introduced segfaults on FreeBSD during the
atexit
andccall
tests. Prior to that PR, we had been callingpthread_attr_init
injl_init_stack_limits
on FreeBSD. According to the manual page forpthread_attr_get_np
, it is "HIGHLY RECOMMENDED" to usepthread_attr_init
to allocate storage. Might as well put it back then, and hopefully it'll fix the segfaults.