janestreet/core

Bigstring channel structure layout assumptions are incompatible with multicore

sadiqj opened this issue · 6 comments

@emillon and @Engil have been attempting to get the Core testsuite passing on 4.12.0+multicore.

They have tracked down the cause of a segfaulting test to the channel structure layout assumption made in https://github.com/janestreet/core/blob/v0.14/bigstring_unix/src/bigstring_unix_stubs.c#L448

@Engil has summarised the issue in more depth here: ocaml-multicore/ocaml-multicore#624 (comment)

This will probably require an upstream change, we don't think we can retain compatibility with the existing structure layout.

Hi! I tried with 4.13.1 and this is causing problems too. The reason is that the layout has changed in mainline ocaml too in ocaml/ocaml@9656815 (#10136).

It looks at a glance like we can simply switch to <caml/io.h> in Bigstring_unix. I'm running that change by folks internally now.

The definition is guarded under #ifdef CAML_INTERNALS. I don't know if that's an issue with how core deals with includes.

Should be fixed in 185ea93.

Hello, we just rediscovered this bug. Is it possible to add a constraint ocaml < 4.13 on core v0.14 ?