Properly modify Caml_state->backtrace_last_exn#12861
Merged
Octachron merged 1 commit intoocaml:trunkfrom Feb 1, 2024
Merged
Conversation
kayceesrk
approved these changes
Dec 23, 2023
Contributor
There was a problem hiding this comment.
LGTM.
The roots management for systhreads went through several iterations. It looks like this particular bug was introduced in ocaml-multicore/ocaml-multicore#771. In bringing the roots management closer to trunk, the modification of the generational global root Caml_state->backtrace_last_exn in restore_runtime_state was incorrectly changed to a plain store.
Member
|
@mshinwell this needs a Changes entry. Please put in in the 5.2 section as we want to include this trivial fix in the release branch. |
Member
|
@mshinwell , would you prefer if I took care of the changelog ? |
Octachron
added a commit
that referenced
this pull request
Feb 1, 2024
Properly modify Caml_state->backtrace_last_exn (cherry picked from commit 5f0cdb7)
Member
|
I took the liberty to add the Changes entry, merge the PR, and cherry-pick it to 5.2. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Caml_state->backtrace_last_exncannot be updated using direct assignment, as it is registered as a generational global root. Direct assignment can (and does) lead to crashes.(Will add Changes entry later.)