#2586: ghc segfaults when compiling bytestring001
-------------------------+--------------------------------------------------
    Reporter:  igloo     |       Owner:               
        Type:  bug       |      Status:  new          
    Priority:  high      |   Milestone:  6.10.1       
   Component:  Compiler  |     Version:  6.9          
    Severity:  normal    |    Keywords:               
  Difficulty:  Unknown   |    Testcase:  bytestring001
Architecture:  Unknown   |          Os:  Unknown      
-------------------------+--------------------------------------------------
 With the `bytestring001` test in the testsuite:

 {{{
 $ ls bytestring001.*
 bytestring001.hs  bytestring001.stdout
 % /home/ian/ghc/darcs/full/ghc/stage2-inplace/ghc -fforce-recomp -o
 bytestring001 bytestring001.hs -O -fasm -package bytestring -package
 QuickCheck
 /home/ian/ghc/darcs/full/ghc/stage2-inplace/ghc: line 2: 22336
 Segmentation fault
 /home/ian/ghc/darcs/full/ghc/stage2-inplace/libexec/ghc
 -B/home/ian/ghc/darcs/full/inplace-datadir/. -dynload wrapped ${1+"$@"}
 }}}

 That's with the threaded RTS. threaded-debug also segfaults.
 debug-only gets an Illegal instruction.
 "+RTS -DS" doesn't spot any problems.

 Running the debug-only GHC in gdb, I get a segfault in
 stg_sel_ret_0_upd_info.

 Doing so again with "+RTS -DS" I got:

 {{{
 Program received signal SIGSEGV, Segmentation fault.
 [Switching to Thread 139962880329440 (LWP 16207)]
 0x000000000132a819 in LOOKS_LIKE_INFO_PTR_NOT_NULL
 (p=12297829382473034410)
     at ../includes/Storage.h:598
 598         return info->type != INVALID_OBJECT && info->type <
 N_CLOSURE_TYPES;
 (gdb) p info
 $1 = (StgInfoTable *) 0xaaaaaaaaaaaaaa9a
 (gdb) p &info
 $2 = (StgInfoTable **) 0x7fffadd7abb8
 (gdb) p4 0x7fffadd7abb0
 0x7fffadd7abc8: 0x132a7e8 <LOOKS_LIKE_INFO_PTR+39>
 0x7fffadd7abc0: 0x7fffadd7abe0
 0x7fffadd7abb8: 0xaaaaaaaaaaaaaa9a
 0x7fffadd7abb0: 0x7fffadd7ac00
 }}}

 so it looks like some unaligned writing has gone on at some point.

 The above is all amd64/Linux.

-- 
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/2586>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
_______________________________________________
Glasgow-haskell-bugs mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs

Reply via email to