[GHC] #14905: GHCi segfaults with +RTS -Di after hitting a breakpoint

GHC ghc-devs at haskell.org
Fri Mar 9 12:10:20 UTC 2018


#14905: GHCi segfaults with +RTS -Di after hitting a breakpoint
-------------------------------------+-------------------------------------
           Reporter:  osa1           |             Owner:  (none)
               Type:  bug            |            Status:  new
           Priority:  normal         |         Milestone:
          Component:  GHCi           |           Version:  8.5
           Keywords:                 |  Operating System:  Unknown/Multiple
       Architecture:                 |   Type of failure:  None/Unknown
  Unknown/Multiple                   |
          Test Case:                 |        Blocked By:
           Blocking:                 |   Related Tickets:
Differential Rev(s):                 |         Wiki Page:
-------------------------------------+-------------------------------------
 Steps to reproduce:

 - Compile stage2 with `-debug`
 - Run GHCi with `+RTS -Di`
 - Load an interpreted module with a definition, set a breakpoint on the
 definition
 - Evaluate the definition

 GHCi crashes with a segfault. Backtrace:

 {{{
 #0  0x00007ffff18bcaa9 in disInstr (bco=0x4200013f30, pc=1) at
 rts/Disassembler.c:71
 #1  0x00007ffff18c89e9 in interpretBCO (cap=0x7ffff19431c0
 <MainCapability>) at rts/Interpreter.c:986
 #2  0x00007ffff18d19fe in schedule (initialCapability=0x7ffff19431c0
 <MainCapability>, task=0x7fffe0000910) at rts/Schedule.c:471
 #3  0x00007ffff18d4ee2 in scheduleWorker (cap=0x7ffff19431c0
 <MainCapability>, task=0x7fffe0000910) at rts/Schedule.c:2553
 #4  0x00007ffff18ccab8 in workerStart (task=0x7fffe0000910) at
 rts/Task.c:444
 #5  0x00007ffff0c3c6ba in start_thread (arg=0x7fffee9aa700) at
 pthread_create.c:333
 #6  0x00007ffff06f241d in clone () at
 ../sysdeps/unix/sysv/linux/x86_64/clone.S:109
 }}}

 in this line:

 {{{
 71          debugBelch(" %s\n",
 ((CostCentre*)(literals[instrs[pc+3]]))->label);
 }}}

 `literals[instrs[pc+3]]` is null.

-- 
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/14905>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler


More information about the ghc-tickets mailing list