Mantis Bug Tracker

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0007501OCamlmiddle end (typedtree to clambda)public2017-03-08 13:572017-06-30 09:51
Reporterdbuenzli 
Assigned Tochambart 
PrioritynormalSeverityminorReproducibilityhave not tried
StatusclosedResolutionfixed 
PlatformOSOS Version
Product Version4.04.0 
Target VersionFixed in Version4.04.1 
Summary0007501: The uunf package stackoverflows with flambda
Descriptionmshinwell told me the backtrace is useless so I elided it.

The source file is a generated one and only available in distributions do:

 opam source uunf --dir /tmp/uunf
 cat /tmp/uunf/src/uunf_data.ml

to consult it.


Steps To Reproduce> ulimit -s
8192
> opam switch 4.04.0+flambda
> opam install uunf -v -v
[...]
+ ocamlfind ocamlopt -c -g -bin-annot -safe-string -package bytes -package uchar -I src -I test -o src/uunf_data.cmx src/uunf_data.ml
- Fatal error: exception Stack overflow
TagsNo tags attached.
Attached Files

- Relationships

-  Notes
(0017599)
dbuenzli (reporter)
2017-03-08 14:00

Forgot to add seems to happen both on linux and osx.
(0017602)
chambart (developer)
2017-03-08 16:34

I could reproduced it on trunk.
The stack overflow happens during CSE.
The failing code is a large generated file containing arrays.
The entry function initializing the arrays is very large.
(0017603)
dbuenzli (reporter)
2017-03-08 16:49
edited on: 2017-03-08 16:49

FTR easy repro instructions without going through ocamlfind (as requested by Mark)

opam source uunf --dir /tmp/uunf
cd /tmp/uunf
ocaml pkg/pkg.ml build
cd _build/src
ocamlopt -c -g -o uunf_data.cmx uunf_data.ml
Raised by primitive operation at file "asmcomp/CSEgen.ml", line 298, characters 22-58
Called from file "asmcomp/CSEgen.ml", line 330, characters 24-32

(0017604)
chambart (developer)
2017-03-08 17:35
edited on: 2017-03-08 17:36

Potential fix: https://github.com/ocaml/ocaml/pull/1089 [^]
This reduces the size of the code, hence preventing the stack overflow on that file. This does not prevent it on a much larger one.

(0018017)
dbuenzli (reporter)
2017-06-29 17:25

This can be closed. It was fixed in 4.04.1.

- Issue History
Date Modified Username Field Change
2017-03-08 13:57 dbuenzli New Issue
2017-03-08 14:00 dbuenzli Note Added: 0017599
2017-03-08 14:17 shinwell Assigned To => shinwell
2017-03-08 14:17 shinwell Status new => acknowledged
2017-03-08 16:29 chambart Status acknowledged => confirmed
2017-03-08 16:34 chambart Note Added: 0017602
2017-03-08 16:49 dbuenzli Note Added: 0017603
2017-03-08 16:49 dbuenzli Note Edited: 0017603 View Revisions
2017-03-08 17:35 chambart Note Added: 0017604
2017-03-08 17:36 chambart Note Edited: 0017604 View Revisions
2017-03-08 18:24 shinwell Assigned To shinwell => chambart
2017-03-08 18:24 shinwell Status confirmed => assigned
2017-06-29 17:25 dbuenzli Note Added: 0018017
2017-06-30 09:51 frisch Status assigned => closed
2017-06-30 09:51 frisch Resolution open => fixed
2017-06-30 09:51 frisch Fixed in Version => 4.04.1


Copyright © 2000 - 2011 MantisBT Group
Powered by Mantis Bugtracker