Version française
Home     About     Download     Resources     Contact us    

This site is updated infrequently. For up-to-date information, please visit the new OCaml website at

Browse thread
[Caml-list] Segv while compiling ocaml-3.04
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: Xavier Leroy <xavier.leroy@i...>
Subject: Re: [Caml-list] Segv while compiling ocaml-3.04
> After ./configure, make world crashes for 3.04 in 
> ../boot/ocamlrun ../boot/ocamlc -g -nopervasives -c oo.mli
> make[1]: *** [oo.cmi] Erreur de segmentation
> make[1]: *** Deleting file `oo.cmi'
> make[1]: Quitte le répertoire `/usr/local/src/ocaml-3.04/stdlib'
> make: *** [coldstart] Erreur 2
> But then If I compile the file myself it works:
> [root@boris ocaml-3.04]# cd stdlib
> [root@boris stdlib]# ../boot/ocamlrun ../boot/ocamlc -g -nopervasives -c oo.mli

We've observed similar hard-to-reproduce segmentation faults on a
Linux RedHat 7.2 machine.  After some tracking, it turns out to be a
bug in gcc version 2.96 20000731 -- the "unofficial" gcc that RH 7.2
uses; I don't know which version of gcc your Mandrake has.

For those who are interested, the bug is that gcc forgets to allocate
a stack frame in a leaf function, thus accessing the stack "below" the
stack pointer.  If there are no interrupts during the leaf function,
it still works; but any interrupt wipes the memory area just below the
stack pointer, and the function crashes...

We're trying to figure out a workaround, and will release updated RPMs
and SRPMs.

- Xavier Leroy
Bug reports:  FAQ:
To unsubscribe, mail  Archives: