[nhc-bugs] Integer divide bug in nhc98 causes runtime segfault

Martin Guy martinwguy at gmail.com
Sun Jun 5 17:07:10 EDT 2005


Hi again!
    Last november I reported a bug in the nhc runtime code that bombs
the program out with Segmentation fault during garbage collection.
Since then there have been 2 more releases of nhc98, but the Integer
divide bug has not gone away nor even made it into the known bug list.
   I've been staring at the C code for several days now without
finding it yet, so here I am reporting it again to the list.
  
A few example programs that segfault are attached.
Any other code that makes repeated calls to the div, mod, quot or rem
on Integers bombs equally well :)

All run fine under hugs, and their making nhc generate faulty code has
been confirmed by one other person on the net (so it isn't my C
compiler!). I also have a example program (an earlier version just
after its translation from Miranda) that runs correctly under hugs but
gives pi as "3.13785478481Segmentation fault" with hugs98 v1.16 and
1.18 (though it's 65K - hardly a test case).

I'm not an nhcbugs list reader (sorry, too poor to afford it!) -
please CC any replies.

Cheers!

    M
-------------- next part --------------
A non-text attachment was scrubbed...
Name: s.hs
Type: application/octet-stream
Size: 1736 bytes
Desc: not available
Url : http://www.haskell.org//pipermail/nhc-bugs/attachments/20050605/6abc6c6a/s-0001.obj
-------------- next part --------------
A non-text attachment was scrubbed...
Name: s2.hs
Type: application/octet-stream
Size: 1808 bytes
Desc: not available
Url : http://www.haskell.org//pipermail/nhc-bugs/attachments/20050605/6abc6c6a/s2-0001.obj
-------------- next part --------------
A non-text attachment was scrubbed...
Name: t.hs
Type: application/octet-stream
Size: 450 bytes
Desc: not available
Url : http://www.haskell.org//pipermail/nhc-bugs/attachments/20050605/6abc6c6a/t-0001.obj


More information about the Nhc-bugs mailing list