Skip to content

GHCi segfaults with +RTS -Di after hitting a breakpoint

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.

Trac metadata
Trac field Value
Version 8.5
Type Bug
TypeOfFailure OtherFailure
Priority normal
Resolution Unresolved
Component GHCi
Test case
Differential revisions
BlockedBy
Related
Blocking
CC
Operating system
Architecture
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information