[Hugs-bugs] coredump on innocent code

fool at sdf-eu.org fool at sdf-eu.org
Thu Sep 8 12:00:47 EDT 2005


Hello.

$ cat bug.hs
main = print (let (x,(q,_)) = (1,divMod x x) in q)
$ runhugs bug.hs
Illegal instruction (core dumped)
$ md5 hugs98-Mar2005-patched.tar.gz
MD5 (hugs98-Mar2005-patched.tar.gz) = f72c378251f0d488fff9871583d26843
$ uname -a
NetBSD droog 2.0.2_STABLE NetBSD 2.0.2_STABLE (sdf) #0: Sun Jun 12 15:36:54 UTC 2005  root at vinland:/var/netbsd/arch/alpha/compile/sdf alpha
$ cat workaround1.hs
main = print (let x = 1
                  (q,_) = divMod x x in q)
$ runhugs workaround1.hs
1
$ cat workaround2.hs
main = print (let (x,(q,_)) = (1,dm x x) in q)
dm a b = (div a b,mod a b)
$ runhugs workaround2.hs
1
$ 

Thank you for making hugs freely and libre available.

fool at sdf-eu.org


More information about the Hugs-Bugs mailing list