The lifetime of bindings referenced by a closure in OCaml may be incorrectly extended as a reference to the closure record is kept alive for too long.
These changes work around that compiler bug by calling a non-inlined function at the start of the closure, which forces the compiler to generate code to extract all the bindings from the closure record and turn them into ordinary bindings.
The lifetime of bindings referenced by a closure in OCaml may be incorrectly extended as a reference to the closure record is kept alive for too long.
These changes work around that compiler bug by calling a non-inlined function at the start of the closure, which forces the compiler to generate code to extract all the bindings from the closure record and turn them into ordinary bindings.