caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
* Crash reading a file
@ 2008-02-04 14:54 tmp123
  2008-02-04 15:07 ` [Caml-list] " Adam Chlipala
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: tmp123 @ 2008-02-04 14:54 UTC (permalink / raw)
  To: caml-list

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.


^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2008-02-04 18:22 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-02-04 14:54 Crash reading a file tmp123
2008-02-04 15:07 ` [Caml-list] " Adam Chlipala
2008-02-04 15:18 ` Chet Murthy
     [not found] ` <6f9f8f4a0802040719u6b47cef2n3c3d41b382964773@mail.gmail.com>
2008-02-04 16:21   ` tmp123
2008-02-04 16:26     ` Ashish Agarwal
2008-02-04 18:22       ` Loup Vaillant

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).