Skip to content

Commit

Permalink
Bugfix: ensure local domain state is initialised
Browse files Browse the repository at this point in the history
  • Loading branch information
stedolan committed Dec 15, 2021
1 parent 80f54dd commit 8f22ad8
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions runtime/domain.c
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,12 @@ void caml_init_domain ()
Caml_state->external_raise = NULL;
Caml_state->exn_bucket = Val_unit;

Caml_state->local_arenas = NULL;
Caml_state->local_sp = 0;
Caml_state->local_top = NULL;
Caml_state->local_limit = 0;
Caml_state->local_total = 0;

Caml_state->top_of_stack = NULL;
Caml_state->bottom_of_stack = NULL; /* no stack initially */
Caml_state->last_return_address = 1; /* not in OCaml code initially */
Expand Down

0 comments on commit 8f22ad8

Please sign in to comment.