Version française
Home     About     Download     Resources     Contact us    
Browse thread
Causes for segfaults
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: Jamie Brandon <jamie@s...>
Subject: Re: [Caml-list] Causes for segfaults
> Excessive recursion of a function does raise an exception, on most
> platforms, doesn't it?

jamie@jamie-aspire:~$ uname -a
Linux jamie-aspire 2.6.35-22-generic #35-Ubuntu SMP Sat Oct 16
20:36:48 UTC 2010 i686 GNU/Linux
jamie@jamie-aspire:~$ ocaml -version
The Objective Caml toplevel, version 3.11.2
jamie@jamie-aspire:~$ cat > segfault.ml
let rec ints n = n :: ints (n+1)
let _ = ints 0
jamie@jamie-aspire:~$ ocamlopt segfault.ml
jamie@jamie-aspire:~$ ./a.out
Segmentation fault

[root@senldogo0183 texsearch-development2]# uname -a
Linux senldogo0183 2.6.18-53.el5 #1 SMP Wed Oct 10 16:34:19 EDT 2007
x86_64 x86_64 x86_64 GNU/Linux
[root@senldogo0183 texsearch-development2]# ocaml -version
The Objective Caml toplevel, version 3.12.0
[root@senldogo0183 texsearch-development2]# cat > segfault.ml
let rec ints n = n :: ints (n+1)
let _ = ints 0
[root@senldogo0183 texsearch-development2]# ocamlopt segfault.ml
[root@senldogo0183 texsearch-development2]# ./a.out
Segmentation fault