On Mon, Mar 07, 2005 at 05:07:05PM -0000, Simon Peyton-Jones wrote: > Excellent bug. It's been there a long time. You seem to have a talent > for finding dark corners in GHC! > > Anyway, it's fixed, and a test added. > > SImon
I'll probably build a new release candidate tomorrow, so stay tuned ;) One question though: MHashTable.hs (simpl011.hs) itself builds ok (well, doesn't crash), it's only when Main.hs imports & uses it that GHC dies, so will testsuite/tests/ghc-regress/simplCore/should_compile/simpl011.hs actually catch the bug? Cheers, Remi > | -----Original Message----- > | From: [EMAIL PROTECTED] > [mailto:glasgow-haskell-bugs- > | [EMAIL PROTECTED] On Behalf Of Remi Turk > | Sent: 07 March 2005 00:41 > | To: [email protected] > | Subject: 6.4.20050304 RULES panic from CgMonad.lhs & other nastiness > | > | Hi, > | > | while still trying to get Data.HashTable to work both in ST and > | IO (I'll probably start complaining about optimizations not > | performed once this is fixed ;), I bumped into the following > | nastiness. > | > | Comments interleaved with shell copy-paste-work. > | > | > | % make clean > | rm -f *.o *.hi a.out > | > | > | % /var/tmp/ghc/bin/ghc --make -O Main.hs > | Chasing modules from: Main.hs > | Compiling MHashTable ( ./MHashTable.hs, ./MHashTable.o ) > | Compiling Main ( Main.hs, Main.o ) > | ghc-6.4.20050304: panic! (the `impossible' happened, GHC version > 6.4.20050304): > | cgPanic > | zdfMutHashSTArray{v a1ip} > | static binds for: > | local binds for: > | SRT labelghc-6.4.20050304: panic! (the `impossible' happened, > GHC version 6.4.20050304): > | initC: srt > | > | Okay, it dies. Almost any new change in the source makes this one > | go away. The next panic is probably partly a consequence of this > | one: MHashTable.o already exists and GHC can't cope with that for > | some reason. That reason may of course be that MHashTable.o > | contains garbage due to the previous bug. > | > | > | % /var/tmp/ghc/bin/ghc --make -O Main.hs > | Chasing modules from: Main.hs > | Skipping MHashTable ( ./MHashTable.hs, ./MHashTable.o ) > | ghc-6.4.20050304: panic! (the `impossible' happened, GHC version > 6.4.20050304): > | tcIfaceGlobal (local): not found: > | MHashTable.updateST{v r87} > | [(rr, Identifier `MHashTable.zdfMutHashSTArray{v rr}'), > | (rs, Type constructor `MHashTable.HT{tc rs}'), > | (rt, Identifier `MHashTable.dir{v rt}'), > | (ru, Data constructor `MHashTable.HT{d ru}'), > | (rv, Identifier `MHashTable.HT{v rv}'), > | (rw, Type constructor `MHashTable.HashTable{tc rw}'), > | (rx, Data constructor `MHashTable.HashTable{d rx}'), > | (ry, Identifier `MHashTable.zdWHashTable{v ry}'), > | (rz, Type constructor `MHashTable.STHashTable{tc rz}'), > | (rA, Class `MHashTable.MutHash{tc rA}'), > | (rB, Type constructor `MHashTable.ZCTMutHash{tc rB}'), > | (rC, Data constructor `MHashTable.ZCDMutHash{d rC}'), > | (rD, Identifier `MHashTable.ZCDMutHash{v rD}'), > | (rE, Identifier `MHashTable.newMHArray{v rE}'), > | (rF, Identifier `MHashTable.readMHArray{v rF}'), > | (rG, Identifier `MHashTable.writeMHArray{v rG}'), > | (rH, Identifier `MHashTable.newMHRef{v rH}'), > | (rI, Identifier `MHashTable.readMHRef{v rI}'), > | (rJ, Identifier `MHashTable.writeMHRef{v rJ}'), > | (rK, Identifier `MHashTable.zdp1MutHash{v rK}'), > | (rL, Identifier `MHashTable.new{v rL}'), > | (rM, Identifier `MHashTable.update{v rM}'), > | (rN, Identifier `MHashTable.zdwpolyzuwriteMHArray{v rN}'), > | (rO, Identifier `MHashTable.polyzuwriteMHArray{v rO}'), > | (rP, Identifier `MHashTable.lit{v rP}'), > | (rQ, Identifier `MHashTable.lvl{v rQ}'), > | (rR, Identifier `MHashTable.zdwnew{v rR}')] > | > | > | % make clean > | rm -f *.o *.hi a.out > | > | Removing all generated files: A Fresh Start with another > | definition of "new" (see attachment): > | > | > | % /var/tmp/ghc/bin/ghc --make -Dnew_undef -no-recomp -O Main.hs > | Chasing modules from: Main.hs > | Compiling MHashTable ( ./MHashTable.hs, ./MHashTable.o ) > | Compiling Main ( Main.hs, Main.o ) > | Linking ... > | Main.o(.text+0x57): undefined reference to > `MHashTable_updateST_closure' > | Main.o(.rodata+0x0): undefined reference to > `MHashTable_updateST_closure' > | collect2: ld returned 1 exit status > | > | > | Finally, executing the previous command again gives _another_ > | error, which is rather weird given that "-no-recomp" is given... > | > | > | % /var/tmp/ghc/bin/ghc --make -Dnew_undef -no-recomp -O Main.hs > | Chasing modules from: Main.hs > | Compiling MHashTable ( ./MHashTable.hs, ./MHashTable.o ) > | Compiling Main ( Main.hs, Main.o ) > | ghc-6.4.20050304: panic! (the `impossible' happened, GHC version > 6.4.20050304): > | lookupVers1 MHashTable updateST{v} > | > | Good night, > | Remi > | > | -- > | Nobody can be exactly like me. Even I have trouble doing it. > -- Nobody can be exactly like me. Even I have trouble doing it. _______________________________________________ Glasgow-haskell-bugs mailing list [email protected] http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs
