Join GitHub today
GitHub is home to over 31 million developers working together to host and review code, manage projects, and build software together.Sign up
CLOSURE opcode tries to allocate large objects on the minor heap #6385
Original bug ID: 6385
If a function closes over more than Max_young_wosize variables, the CLOSURE opcode in interp.c will nonetheless try to allocate it on the minor heap.
When using the debug runtime, this causes an assertion failure. For a big enough function / unlucky enough minor heap state, I suspect it would cause memory corruption.
Steps to reproduce
Compile the attached file and run with ocamlrund.