| Anonymous | Login | Signup for a new account | 2013-05-19 00:10 CEST | ![]() |
| Main | My View | View Issues | Change Log | Roadmap |
| View Issue Details [ Jump to Notes ] | [ Issue History ] [ Print ] | |||||||||||
| ID | Project | Category | View Status | Date Submitted | Last Update | |||||||
| 0005844 | OCaml | OCaml general | public | 2012-12-05 10:17 | 2013-02-18 11:28 | |||||||
| Reporter | craff | |||||||||||
| Assigned To | gasche | |||||||||||
| Priority | normal | Severity | crash | Reproducibility | always | |||||||
| Status | resolved | Resolution | suspended | |||||||||
| Platform | intel amd 64 | OS | linux | OS Version | debian testing | |||||||
| Product Version | 3.12.1 | |||||||||||
| Target Version | Fixed in Version | |||||||||||
| Summary | 0005844: stack overflow compiling medium size list constants | |||||||||||
| Description | OCaml 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 ocamlopt 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 Reproduce | produire un code source ocaml : ocaml grandeliste.ml > foo.ml le compiler: ocamlc -c foo.ml ----------------- grandeliste.ml -------------------- open Printf let _ = printf "let l = ["; for i = 0 to 30000 do printf "%d;\n" i done; printf "0]" ----------------- grandeliste.ml -------------------- | |||||||||||
| Additional Information | also reproduced with 4.00.0 with a MAC | |||||||||||
| Tags | No tags attached. | |||||||||||
| Attached Files | ||||||||||||
Relationships |
||||||||||||||||
|
||||||||||||||||
Notes |
|
|
(0008566) gasche (developer) 2012-12-05 11:30 |
For the record, here is the corresponding caml-list discussion: "ocamlc, ocamlopt stackoverflow on list" https://sympa.inria.fr/sympa/arc/caml-list/2012-11/msg00267.html [^] 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 |
| Copyright © 2000 - 2011 MantisBT Group |