Fix a bug in PR9742: in naked pointers mode, the code could dereference a pointer before checking it is not a naked pointer.#9989
Merged
gasche merged 1 commit intoocaml:trunkfrom Oct 29, 2020
Conversation
Contributor
Author
|
I did not include a test for this bug, since it seems particularly difficult to reproduce in practice. Also, the bug only occured in naked pointers mode, which should hopefully disappear soon. |
Contributor
Author
|
Cc @bobot. |
Contributor
Author
|
Of course, this is a bugfix, so this is a candidate for cherry-picking in 4.12. |
2 tasks
bobot
suggested changes
Oct 25, 2020
dereference a pointer before checking it is not a naked pointer. Algo fix a debug macro changed in PR9742 which could potentially modify its parameter. It turns out this is not a bug, but the macro was still particularly dangerous.
Contributor
Author
|
Thanks for the review! Do you have other comments? @xavierleroy, @damiendoligez : Could you give your approval before merging? |
xavierleroy
approved these changes
Oct 26, 2020
Contributor
xavierleroy
left a comment
There was a problem hiding this comment.
I'm not familiar with this part of the runtime system, but this looks like a good fix.
bobot
approved these changes
Oct 29, 2020
Member
|
@Octachron I think this is something we probably want to backport in 4.12. Would you, by chance, be available to do the backport? |
Member
|
Certainly, I will cherry-pick to 4.12 . |
Octachron
pushed a commit
that referenced
this pull request
Oct 29, 2020
Fix a bug in PR9742: in naked pointers mode, the code could dereference a pointer before checking it is not a naked pointer. (cherry picked from commit 3a094eb)
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.
Algo fix a debug macro changed in #9742 which could potentially
modify its parameter. It turns out this is not a bug, but the macro
was still particularly dangerous.