-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
fix #11482: random crash in large closure allocation #11542
Conversation
Checked on 5.0.0~alpha0, it does fix the segfault. Now ready for review. |
Note: will have to move the Changes entry and cherry-pick to 5.0. |
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 looks like a good fix for #11482. Two minor remarks:
- I'm not super happy about the function name
caml_alloc_shr_with_safepoint
. Ischeck_urgent_gc
equivalent to the safe points that ocamlopt implements?caml_alloc_shr_check_urgent
might be more descriptive.caml_alloc_shr_check
would be shorter :-) - I wondered about performance. We can probably assume that ocamlopt-generated code rarely allocates directly in the major heap, in which case performance should be OK.
6d40d15
to
3dae3ac
Compare
3dae3ac
to
4a6c505
Compare
I've renamed the function to |
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.
Looks good to me, thanks. Could you please move the Changes entry to 5.0, merge in trunk, and cherry-pick -x in 5.0 ? Thanks.
Cherry-picked to 5.0 (as 43754a5). Thanks for the review. |
Note: this is still a draft, I still want to check that it does make the bug disappear.
Fixes #11482