Browse thread
Crash reading a file
[
Home
]
[ Index:
by date
|
by threads
]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
| Date: | -- (:) |
| From: | tmp123 <tmp123@m...> |
| Subject: | Crash reading a file |
Hello,
The following program (foo.ml):
value rec read_stdin () =
try
[ (input_line Pervasives.stdin) :: (read_stdin ()) ]
with [ End_of_file -> [] ];
value main () =
read_stdin();
main();
when compiled with "ocamlopt -pp camlp4r foo.ml" and executed "./a.out",
produces a segmentation fault, but I'm not able to find why.
Please, has someone any sugestion?
Thanks a lot.