Skip to content
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 reachable words, part deux #832

Merged
merged 1 commit into from
Jan 7, 2022

Conversation

avsm
Copy link
Collaborator

@avsm avsm commented Jan 6, 2022

This cherry-picks @xavierleroy's commits to 4.14 on ocaml/ocaml#10853, adapted for the 5.00 branch. Follow up to discussion in #828

A marshaling operation can leave `extern_flags` with the `NO_SHARING`
bit set.  In this context, `caml_obj_reachable_words` calls
`extern_init_position_table`, which does nothing, then proceeds to
access the position table, causing a crash.

The solution is trivial: initialize `extern_flags` before calling
`extern_init_position_table`.

A regression test was added.

First reported at ocaml-multicore#824
@avsm
Copy link
Collaborator Author

avsm commented Jan 6, 2022

synched with the 4.14 branch commit that got merged

@ctk21
Copy link
Collaborator

ctk21 commented Jan 6, 2022

LGTM

@ctk21 ctk21 merged commit 81db6f0 into ocaml-multicore:5.00 Jan 7, 2022
@avsm avsm deleted the fix-reachable-words-2 branch January 7, 2022 10:51
sadiqj pushed a commit to sadiqj/ocaml that referenced this pull request Jan 10, 2022
…reachable-words-2

Fix reachable words, part deux
ctk21 added a commit to ctk21/ocaml that referenced this pull request Jan 11, 2022
…reachable-words-2

Fix reachable words, part deux
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants