[GHC] #10236: DWARF unwind info is broken

#10236: DWARF unwind info is broken -------------------------------------+------------------------------------- Reporter: | Owner: thoughtpolice | Status: new Type: bug | Milestone: 7.10.2 Priority: high | Version: 7.10.1 Component: Compiler | Operating System: Unknown/Multiple (Debugging) | Type of failure: Incorrect result Keywords: dwarf | at runtime Architecture: | Blocked By: Unknown/Multiple | Related Tickets: Test Case: | Blocking: | Differential Revisions: Phab:D792 | -------------------------------------+------------------------------------- As reported by `bitonic` and `petermw` on `#ghc` (April 2nd): {{{ 07:02 < bitonic> I'm trying to get a meaningful backtrace with DWARF, using https://ghc.haskell.org/trac/ghc/wiki/DWARF as a guide. however, all I get is `Backtrace stopped: previous frame identical to this frame (corrupt stack?)` 07:03 < bitonic> I've re-built GHC 7.10.1 using `GhcRtsHcOpts += -g` and `GhcLibHcOpts += -g`, even if I'm not sure it's even necessary 07:04 < bitonic> are there any additional steps I should take? or any way to make sure that the binary I'm generating is sane? }}} -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/10236 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#10236: DWARF unwind info is broken
-------------------------------------+-------------------------------------
Reporter: thoughtpolice | Owner:
Type: bug | Status: new
Priority: high | Milestone: 7.10.2
Component: Compiler | Version: 7.10.1
(Debugging) | Keywords: dwarf
Resolution: | Architecture:
Operating System: Unknown/Multiple | Unknown/Multiple
Type of failure: Incorrect result | Test Case:
at runtime | Blocking:
Blocked By: | Differential Revisions: Phab:D792
Related Tickets: |
-------------------------------------+-------------------------------------
Comment (by Austin Seipp

#10236: DWARF unwind info is broken -------------------------------------+------------------------------------- Reporter: thoughtpolice | Owner: Type: bug | Status: merge Priority: high | Milestone: 7.10.2 Component: Compiler | Version: 7.10.1 (Debugging) | Keywords: dwarf Resolution: | Architecture: Operating System: Unknown/Multiple | Unknown/Multiple Type of failure: Incorrect result | Test Case: at runtime | Blocking: Blocked By: | Differential Revisions: Phab:D792 Related Tickets: | -------------------------------------+------------------------------------- Changes (by thoughtpolice): * status: new => merge -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/10236#comment:2 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#10236: DWARF unwind info is broken -------------------------------------+------------------------------------- Reporter: thoughtpolice | Owner: Type: bug | Status: closed Priority: high | Milestone: 7.10.2 Component: Compiler | Version: 7.10.1 (Debugging) | Keywords: dwarf Resolution: fixed | Architecture: Operating System: Unknown/Multiple | Unknown/Multiple Type of failure: Incorrect result | Test Case: at runtime | Blocking: Blocked By: | Differential Revisions: Phab:D792 Related Tickets: | -------------------------------------+------------------------------------- Changes (by thoughtpolice): * status: merge => closed * resolution: => fixed Comment: Merged to `ghc-7.10` via 2f7eb6c74f4c7f0f6ea4eea476cf56bdbb7d0d62. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/10236#comment:3 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#10236: DWARF unwind info is broken -------------------------------------+------------------------------------- Reporter: thoughtpolice | Owner: Type: bug | Status: closed Priority: high | Milestone: 7.10.2 Component: Compiler | Version: 7.10.1 (Debugging) | Keywords: dwarf Resolution: fixed | Architecture: Operating System: Unknown/Multiple | Unknown/Multiple Type of failure: Incorrect result | Test Case: at runtime | Blocking: Blocked By: | Differential Revisions: Phab:D792 Related Tickets: | -------------------------------------+------------------------------------- Comment (by tibbe): Could we have a test for this so it doesn't break in the future? -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/10236#comment:4 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#10236: DWARF unwind info is broken -------------------------------------+------------------------------------- Reporter: thoughtpolice | Owner: Type: bug | Status: closed Priority: high | Milestone: 7.10.2 Component: Compiler | Version: 7.10.1 (Debugging) | Keywords: dwarf Resolution: fixed | Architecture: Operating System: Unknown/Multiple | Unknown/Multiple Type of failure: Incorrect result | Test Case: at runtime | Blocking: Blocked By: | Differential Revisions: Phab:D792 Related Tickets: | -------------------------------------+------------------------------------- Comment (by scpmw): See D792 - it's slightly tricky, because the only meaningful test would involve taking the produced object file apart. Best approach in my opinion would be to do some sanity checks on `objdump`/`dwarfdump` output. Still not exactly trivial to formulate a robust "all Haskell code covered" test. Maybe calculate `.text` section size and compare it with the sum of ranges from `.debug_info`? Side note: If/when we equip the RTS to consume DWARF this could become a lot more straightforward. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/10236#comment:5 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#10236: DWARF unwind info is broken -------------------------------------+------------------------------------- Reporter: thoughtpolice | Owner: (none) Type: bug | Status: closed Priority: high | Milestone: 7.10.2 Component: Compiler | Version: 7.10.1 (Debugging) | Resolution: fixed | Keywords: DWARF Operating System: Unknown/Multiple | Architecture: Type of failure: Incorrect result | Unknown/Multiple at runtime | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Phab:D792 Wiki Page: | -------------------------------------+------------------------------------- Changes (by bgamari): * keywords: dwarf => DWARF -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/10236#comment:6 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler
participants (1)
-
GHC