-
Notifications
You must be signed in to change notification settings - Fork 68
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
freebsd/openbsd segfault in tests/lib-obj/test_reachable #824
Comments
Digging into this, it looks like the problem is that :
extern_lookup_position uses
NO_SHARING is set, so the remainder of |
avsm
added a commit
to avsm/ocaml-multicore
that referenced
this issue
Jan 5, 2022
Without this the value may potentially contain junk values and is subsequently used in reachable_words, which results in memory corruption. Fixes Obj.reachable_words on platforms which return junk memory from malloc (e.g. FreeBSD/OpenBSD but also potentially some libcs on Linux) Fixes ocaml-multicore#824
xavierleroy
added a commit
to xavierleroy/ocaml
that referenced
this issue
Jan 6, 2022
xavierleroy
added a commit
to xavierleroy/ocaml
that referenced
this issue
Jan 6, 2022
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`. First reported at ocaml-multicore/ocaml-multicore#824
xavierleroy
added a commit
to xavierleroy/ocaml
that referenced
this issue
Jan 6, 2022
xavierleroy
added a commit
to xavierleroy/ocaml
that referenced
this issue
Jan 6, 2022
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`. First reported at ocaml-multicore/ocaml-multicore#824
avsm
pushed a commit
to avsm/ocaml-multicore
that referenced
this issue
Jan 6, 2022
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`. First reported at ocaml-multicore#824
avsm
pushed a commit
to avsm/ocaml-multicore
that referenced
this issue
Jan 6, 2022
xavierleroy
added a commit
to ocaml/ocaml
that referenced
this issue
Jan 6, 2022
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/ocaml-multicore#824
avsm
pushed a commit
to avsm/ocaml-multicore
that referenced
this issue
Jan 6, 2022
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
sadiqj
pushed a commit
to sadiqj/ocaml
that referenced
this issue
Jan 7, 2022
Without this the value may potentially contain junk values and is subsequently used in reachable_words, which results in memory corruption. Fixes Obj.reachable_words on platforms which return junk memory from malloc (e.g. FreeBSD/OpenBSD but also potentially some libcs on Linux) Fixes ocaml-multicore/ocaml-multicore#824
sadiqj
pushed a commit
to sadiqj/ocaml
that referenced
this issue
Jan 7, 2022
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/ocaml-multicore#824
sadiqj
pushed a commit
to sadiqj/ocaml
that referenced
this issue
Jan 10, 2022
Without this the value may potentially contain junk values and is subsequently used in reachable_words, which results in memory corruption. Fixes Obj.reachable_words on platforms which return junk memory from malloc (e.g. FreeBSD/OpenBSD but also potentially some libcs on Linux) Fixes ocaml-multicore/ocaml-multicore#824
sadiqj
pushed a commit
to sadiqj/ocaml
that referenced
this issue
Jan 10, 2022
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/ocaml-multicore#824
ctk21
pushed a commit
to ctk21/ocaml
that referenced
this issue
Jan 11, 2022
Without this the value may potentially contain junk values and is subsequently used in reachable_words, which results in memory corruption. Fixes Obj.reachable_words on platforms which return junk memory from malloc (e.g. FreeBSD/OpenBSD but also potentially some libcs on Linux) Fixes ocaml-multicore/ocaml-multicore#824
ctk21
pushed a commit
to ctk21/ocaml
that referenced
this issue
Jan 11, 2022
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/ocaml-multicore#824
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This fails from the testsuite on both freebsd and openbsd (bytecode only, native is fine)
The text was updated successfully, but these errors were encountered: