Skip to content

Segfault in bytecode program using effects #11669

@shym

Description

@shym

We noticed a segfault appearing in the bytecode backend since the release of 5.0.0 β1, triggered by a test exercising effects in @jmid’s multicoretests: effect_lin_tests_dsl.

Unfortunately I didn’t manage to create a smaller example, but I bisected the compiler and found the bug appears with commit ce080dae which might give a clue where it stems from. See the logs before and after that commit.

It can be reproduced thus:

opam switch create bug-repro --empty --no-switch
eval $(opam env --switch=bug-repro --set-switch)

git clone https://github.com/ocaml/ocaml
cd ocaml
git checkout ce080dae # or later, such as 5.0.0-beta1 or 5.0
opam install -y ocaml-option-bytecode-only .
eval $(opam env)
cd ..

git clone https://github.com/shym/multicoretests.git --depth=1 -b effect-bug
cd multicoretests
opam install -y qcheck-core dune

export CI=true
# This setting removes constant progress messages. Without it, the bug
# does not trigger...
dune exec src/neg_tests/effect_lin_tests_dsl.bc -- -v -s 134165266

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions