[GHC] #14510: GHC.ExecutionStack.showStackTrace broken

GHC ghc-devs at haskell.org
Thu Nov 23 03:47:26 UTC 2017


#14510: GHC.ExecutionStack.showStackTrace broken
---------------------------------+--------------------------------------
        Reporter:  duog          |                Owner:  (none)
            Type:  bug           |               Status:  new
        Priority:  normal        |            Milestone:
       Component:  Compiler      |              Version:  8.2.1
      Resolution:                |             Keywords:
Operating System:  Linux         |         Architecture:  x86_64 (amd64)
 Type of failure:  None/Unknown  |            Test Case:
      Blocked By:                |             Blocking:
 Related Tickets:                |  Differential Rev(s):
       Wiki Page:                |
---------------------------------+--------------------------------------

Comment (by duog):

 bgamari was able to reproduce this, so it may well be a real bug.

 I spent some time today learning all about libdw, and I was able to
 determine what's going wrong, though not why. It happens at this "stack
 trace":


 [https://sourceware.org/git/?p=elfutils.git;a=blob;f=libdw/dwarf_next_cfi.c;h=53fc369722e9685c04ca6f18ca683cf820b10338;hb=54ba4ce2973113d8f4315d4fc90e16a9b4476ea6#l55
 libdw/dwarf_next_cfi.c:dwarf_next_cfi:55]

 [https://sourceware.org/git/?p=elfutils.git;a=blob;f=libdw/fde.c;h=f5f6fbe14133b0cb36738e9c25a5cdfeaf3d9e8b;hb=54ba4ce2973113d8f4315d4fc90e16a9b4476ea6#l283
 libdw/fde.c:__libdw_find_fde:283]

 [https://sourceware.org/git/?p=elfutils.git;a=blob;f=libdw/dwarf_cfi_addrframe.c;h=44240279a957579b6c1d3469028e3d9df7da9411;hb=54ba4ce2973113d8f4315d4fc90e16a9b4476ea6#l42
 libdw/dwarf_cfi_addrframe.c:dwarf_cfi_addrframe:42]

 [https://sourceware.org/git/?p=elfutils.git;a=blob;f=libdwfl/frame_unwind.c;h=4dc9c43252fd0a232168ede0cbc6712da94cfaef;hb=54ba4ce2973113d8f4315d4fc90e16a9b4476ea6#l542
 libdwfl/frame_unwind.c:handle_cfi:542]

 [https://sourceware.org/git/?p=elfutils.git;a=blob;f=libdwfl/frame_unwind.c;h=4dc9c43252fd0a232168ede0cbc6712da94cfaef;hb=54ba4ce2973113d8f4315d4fc90e16a9b4476ea6#l722
 libdwfl/frame_unwind.c:__libdwfl_frame_unwind:722]


 ...

 rts/libdw/libdwGetBacktrace

 `off + 4 >= data->d_size` is true.

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


More information about the ghc-tickets mailing list