@bcc32 Wow, thank you so much for your kind explanation and solution!!! This really perfectly solved my question!
Indeed, I found the bug fix for OCaml 4.07.0 regarding GC crashes, so even if you said that this doesn’t appear to be in play, but I think this might be related in some way. Because, including your perturbation about Gc module, just calling any Gc library made this crash disappear. Like ignore (Gc.get ())
or ignore (Gc.stat ())
or ignore (Gc.minor ())
, … etc. So it is clear that how the read_line
function interoperates with garbage collector makes this very strange segfault (which I don’t know why deeply )
I’ve already requested to change compilation as native code and upgrade the version of OCaml to the admin. So I will wait for the update!
Many thanks!!!