Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Stash the bytecode interpreter's internal structures when OCaml's run…
…time is processing a signal. Not doing so would cause the garbage collector to silently move the carpet from under our feet, thus causing a memory corruption. The chance it might have happened in the past is extremely low, because it would have required a memory shortage at the exact time a signal was processed. Something might have changed in the runtime of OCaml 5.1 that makes this conjunction of events more likely to occur, e.g., systematically performing a collection before or after processing a signal. Note that using Setup_for_caml_call rather than Setup_for_gc might be sufficient here, since "accu" is almost certainly always irrelevant here (function application). But since performance does not matter on this path, better safe than sorry.
- Loading branch information