Skip to content

Commit 253b3ca

Browse files
committed
Modify Caml_state->backtrace_last_exn properly (#2191)
(cherry picked from commit 369a926)
1 parent 5704f5d commit 253b3ca

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

ocaml/otherlibs/systhreads/st_stubs.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -286,7 +286,8 @@ static void restore_runtime_state(caml_thread_t th)
286286
caml_set_local_arenas(Caml_state, th->local_arenas);
287287
Caml_state->backtrace_pos = th->backtrace_pos;
288288
Caml_state->backtrace_buffer = th->backtrace_buffer;
289-
Caml_state->backtrace_last_exn = th->backtrace_last_exn;
289+
caml_modify_generational_global_root
290+
(&Caml_state->backtrace_last_exn, th->backtrace_last_exn);
290291
#ifndef NATIVE_CODE
291292
Caml_state->trap_sp_off = th->trap_sp_off;
292293
Caml_state->trap_barrier_off = th->trap_barrier_off;

0 commit comments

Comments
 (0)