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

The uunf package stackoverflows with flambda #7501

Closed
vicuna opened this Issue Mar 8, 2017 · 5 comments

Comments

Projects
None yet
2 participants
@vicuna
Copy link
Collaborator

commented Mar 8, 2017

Original bug ID: 7501
Reporter: @dbuenzli
Assigned to: @chambart
Status: closed (set by @alainfrisch on 2017-06-30T07:51:10Z)
Resolution: fixed
Priority: normal
Severity: minor
Version: 4.04.0
Fixed in version: 4.04.1
Category: middle end (typedtree to clambda)
Monitored by: @dbuenzli

Bug description

mshinwell 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
@vicuna

This comment has been minimized.

Copy link
Collaborator Author

commented Mar 8, 2017

Comment author: @dbuenzli

Forgot to add seems to happen both on linux and osx.

@vicuna

This comment has been minimized.

Copy link
Collaborator Author

commented Mar 8, 2017

Comment author: @chambart

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.

@vicuna

This comment has been minimized.

Copy link
Collaborator Author

commented Mar 8, 2017

Comment author: @dbuenzli

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

@vicuna

This comment has been minimized.

Copy link
Collaborator Author

commented Mar 8, 2017

Comment author: @chambart

Potential fix: #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.

@vicuna

This comment has been minimized.

Copy link
Collaborator Author

commented Jun 29, 2017

Comment author: @dbuenzli

This can be closed. It was fixed in 4.04.1.

@vicuna vicuna closed this Jun 30, 2017

@vicuna vicuna added the middle-end label Mar 14, 2019

@vicuna vicuna added the bug label Mar 20, 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.