Ticket #2586 (closed bug: fixed)

Opened 5 years ago

Last modified 5 years ago

ghc segfaults when compiling bytestring001

Reported by: igloo Owned by: simonmar
Priority: high Milestone: 6.10.1
Component: Compiler Version: 6.9
Keywords: Cc:
Operating System: Unknown/Multiple Architecture: Unknown/Multiple
Type of failure: Difficulty: Unknown
Test Case: bytestring001 Blocked By:
Blocking: Related Tickets:

Description

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.

Change History

Changed 5 years ago by simonmar

  • owner set to simonmar

Changed 5 years ago by simonmar

  • status changed from new to closed
  • resolution set to fixed

Fixed:

Fri Sep 12 14:04:04 BST 2008  Simon Marlow <marlowsd@gmail.com>
  * Fix #2586, bug in THUNK_SELECTORs (again)
  This time, we had forgetten the write barrier in one place.

Changed 5 years ago by simonmar

  • architecture changed from Unknown to Unknown/Multiple

Changed 5 years ago by simonmar

  • os changed from Unknown to Unknown/Multiple
Note: See TracTickets for help on using tickets.