Mantis Bug Tracker

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0005844OCaml~DO NOT USE (was: OCaml general)public2012-12-05 10:172013-02-18 11:28
Assigned Togasche 
Platformintel amd 64OSlinuxOS Versiondebian testing
Product Version3.12.1 
Target VersionFixed in Version 
Summary0005844: stack overflow compiling medium size list constants
DescriptionOCaml can not compile lists of size 30000 which is not a so big number.
This can not be caused only by a non tailrec function.
ocamlc.opt -pp caml4o
ocamlopt.opt -pp caml4o
ocamlc -pp caml4o
ocamlopt -pp caml4o

all fail at 30000

ocamlc.opt and ocamlopt.opt works at 1000000 which seems enough to me
Steps To Reproduceproduire un code source ocaml :
ocaml >

le compiler:
ocamlc -c

----------------- --------------------
open Printf

let _ =
  printf "let l = [";
  for i = 0 to 30000 do
    printf "%d;\n" i
  printf "0]"
----------------- --------------------
Additional Informationalso reproduced with 4.00.0 with a MAC
TagsNo tags attached.
Attached Files

- Relationships
related to 0005626resolved Stack overflow in ocamlopt.opt: Comballoc.combine 
related to 0004405closed ocamlopt, ocaml, ocamlc, Stack Overflow on large hardcoded arrays. 
related to 0005925resolvedgasche Stack overflow in compiler 

-  Notes
gasche (administrator)
2012-12-05 11:30

For the record, here is the corresponding caml-list discussion:
  "ocamlc, ocamlopt stackoverflow on list" [^]

I still think this is a size issue for which the cost/benefit of a fix is not worth it. There is no point in, say, changing some code in the type-checker only to have a failure later in the closure conversion pass, or have a related failure on a slightly different input.

Marking the bug as "suspended" to indicate the low-priority status. If I have time and motivation I'll run a debugging-enabled version of the compiler on your example to get a stack trace. Feel free to investigate the issue on your side and provide patches if you think they solve your problem and have an *extremely low* risk of breaking anything or making the code harder to maintain.

- Issue History
Date Modified Username Field Change
2012-12-05 10:17 craff New Issue
2012-12-05 11:30 gasche Note Added: 0008566
2012-12-05 11:30 gasche Status new => resolved
2012-12-05 11:30 gasche Resolution open => suspended
2012-12-05 11:30 gasche Assigned To => gasche
2012-12-05 11:34 gasche Assigned To gasche =>
2012-12-05 11:34 gasche Status resolved => acknowledged
2012-12-05 11:34 gasche Relationship added related to 0005626
2012-12-05 11:34 gasche Relationship added related to 0004405
2012-12-05 11:35 gasche Status acknowledged => resolved
2012-12-05 11:35 gasche Assigned To => gasche
2013-02-18 11:28 gasche Relationship added child of 0005925
2013-02-18 11:28 gasche Relationship deleted child of 0005925
2013-02-18 11:28 gasche Relationship added related to 0005925
2017-02-23 16:36 doligez Category OCaml general => -OCaml general
2017-03-03 17:55 doligez Category -OCaml general => -(deprecated) general
2017-03-03 18:01 doligez Category -(deprecated) general => ~deprecated (was: OCaml general)
2017-03-06 17:04 doligez Category ~deprecated (was: OCaml general) => ~DO NOT USE (was: OCaml general)

Copyright © 2000 - 2011 MantisBT Group
Powered by Mantis Bugtracker