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
Segmentation Fault on Fairly trivial program #3198
Comments
Comment author: administrator
This looks like you've hit a limit that your shell has on stack size. Could you -- Michel Mauny |
Comment author: administrator
This looks like a stack overflow (List.map is not tail-recursive). You might be able to get your code to run by raising the Unix stack Hope this helps,
|
Comment author: administrator Just a stack overflow. Feature wish: Stack_overflow exception on AMD64/Linux. |
Original bug ID: 3198
Reporter: administrator
Status: closed
Resolution: fixed
Priority: normal
Severity: feature
Category: ~DO NOT USE (was: OCaml general)
Bug description
Full_Name: Joseph E. Gonzalez
Version: 3.08.1
OS: Linux 2.6.8-1.521smp x86_64
Submission from: fleming-55.caltech.edu (131.215.87.55)
I wrote a simple program to test performance (the following one):
let rec random_list x list = match x with
| 0 -> list
| _ -> random_list (x - 1) ((Random.int 999999999)::list);;
let l = (random_list 999999 []);;
let y = (List.map (function x -> x) l);;
and compiled it using the command:
ocamlopt prof.ml -o prof
when I run it I get a segmentation fault. This does not happen on my other
systems. When I used gdb the fault is said to be in
camlList__map_86 ()
Thanks
-Joey
The text was updated successfully, but these errors were encountered: