Join GitHub today
GitHub is home to over 36 million developers working together to host and review code, manage projects, and build software together.Sign up
Segfault with lazy empty arrays #5518
Original bug ID: 5518
It also breaks in version 3.11.2.
The following program segfaults in the garbage collector:
let empty = lazy [||]
Steps to reproduce
Compile with ocamlc or ocamlopt without any particular options.
If the lazy value is not forced, it doesn't segfault.
Comment author: @sliquister
I would say that the following piece of code from minor_gc is the culprit:
f is the array, and I think Field(f, 0) is called because the header of an