logo       

SegFault caused by some IO+Arrays+GC interaction: msg#00055

lang.haskell.glasgow.bugs

Subject: SegFault caused by some IO+Arrays+GC interaction

Hello!

The attached program uses no unsafe operations and yet it segfaults from
time to time. Try it on some file of moderate size, like:

$ ghc --version
The Glorious Glasgow Haskell Compilation System, version 6.2.1
$ ghc -O --make Bug -o Bug
Chasing modules from: Bug
Compiling Main ( Bug.hs, Bug.o )
Linking ...
$ ls -l /etc/termcap
-rw-r--r-- 1 root root 737535 lip 20 2001 /etc/termcap
$ ./Bug < /etc/termcap > /dev/null
Segmentation fault (core dumped)
$ ./Bug < /etc/termcap > /dev/null
$ ghc --version
The Glorious Glasgow Haskell Compilation System, version 6.2.1
$ gcc --version
gcc (GCC) 3.3.3
Copyright (C) 2003 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is
NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR
PURPOSE.

$ uname -a
Linux green.local.gem.pl 2.4.18-10 #1 Wed Aug 7 10:26:48 EDT 2002 i686
unknown

Notice that this program calls performGC after every processed word
and commenting this out seems to eliminate the problem. Perhaps this
is a silly thing to do, but I don't think it should result in SEGV.

If this qualifies as a bug, tell me if I can do anything to help you
nail it down.

Best regards,
Tom

--
.signature: Too many levels of symbolic links

Attachment: Bug.hs
Description: Text document

_______________________________________________
Glasgow-haskell-bugs mailing list
Glasgow-haskell-bugs@xxxxxxxxxxx
http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs
<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

News | FAQ | advertise