Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CLOSURE opcode tries to allocate large objects on the minor heap #6385

vicuna opened this issue Apr 29, 2014 · 1 comment


None yet
1 participant
Copy link

commented Apr 29, 2014

Original bug ID: 6385
Reporter: @stedolan
Status: closed (set by @xavierleroy on 2015-12-11T18:26:45Z)
Resolution: fixed
Priority: normal
Severity: minor
Fixed in version: 4.02.0+dev
Category: runtime system and C interface
Monitored by: @gasche

Bug description

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.

File attachments


This comment has been minimized.

Copy link

commented May 4, 2014

Comment author: @xavierleroy

Fixed in SVN trunk, commit 14733. Will be in 4.02.

@vicuna vicuna closed this Dec 11, 2015

@vicuna vicuna added stdlib bug labels Mar 14, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.