If I pass a function from OCaml to C, and then store a reference to that OCaml function (to call it multiple times) in C do I need to make some special bookkeeping:
a) when I pass the function?
b) when I call it?
I get random segfaults when calling the OCaml closure for let’s say 1000th time. Can there be any race condition that interferes with gc?