Package: ocaml Version: 3.08.2-1
The following program compiles but generates a segmentation fault.
test.mli:
val test: unit -> unit
test.ml
open Test ;; let fn=test ;; let test ()= print_string "Hello world!\n" ;; fn ()
$ ocamlopt test.mli $ ocamlopt -o test test.ml $ ./test Segmentation fault
(gdb) bt #0 0x0804977f in camlTest__entry () #1 0x080494b1 in caml_startup__code_begin () #2 0x0805619a in caml_start_program () #3 0x00000000 in ?? () #4 0xbffff898 in ?? () #5 0xbffff93c in ?? () #6 0xbffff934 in ?? () #7 0x0805b0e0 in caml_termination_hook () #8 0x0805649e in caml_main () Previous frame inner to this frame (corrupt stack?)
It seams that the function test can not be referenced in the executable before its definition. But it is already known because of the .mli file.
Jurjen Stellingwerff
-- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]