[GHC] #9903: GHCi produces a cryptic message when using HPC

#9903: GHCi produces a cryptic message when using HPC -------------------------------------+------------------------------------- Reporter: facundo.dominguez | Owner: Type: bug | Status: new Priority: normal | Milestone: Component: GHCi | Version: 7.9 Keywords: hpc | Operating System: Architecture: Unknown/Multiple | Unknown/Multiple Difficulty: Unknown | Type of failure: GHCi crash Blocked By: | Test Case: Related Tickets: #9878, #9762 ? | Blocking: | Differential Revisions: -------------------------------------+------------------------------------- The following test produces an impolite response from GHCi {{{ $ cat t.hs g :: Int g = 1 + 1 $ ghc-stage2 --interactive t.hs -fhpc GHCi, version 7.9.20141217: http://www.haskell.org/ghc/ :? for help [1 of 1] Compiling Main ( t.hs, interpreted ) Ok, modules loaded: Main. *Main> g ghc-stage2: panic! (the 'impossible' happened) (GHC version 7.9.20141217 for x86_64-unknown-linux): Loading temp shared object failed: /tmp/ghc25774_0/ghc25774_5.so: undefined symbol: _hpc_tickboxes_Main_hpc Please report this as a GHC bug: http://www.haskell.org/ghc/reportabug }}} It has been noted elsewhere (#9878) that these kinds of messages are better avoided. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/9903 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#9903: GHCi produces a cryptic message when using HPC -------------------------------------+------------------------------------- Reporter: | Owner: facundo.dominguez | Status: new Type: bug | Milestone: Priority: normal | Version: 7.9 Component: GHCi | Keywords: hpc Resolution: | Architecture: Unknown/Multiple Operating System: | Difficulty: Unknown Unknown/Multiple | Blocked By: Type of failure: GHCi crash | Related Tickets: #9878, #9762 ? Test Case: | Blocking: | Differential Revisions: | -------------------------------------+------------------------------------- Description changed by facundo.dominguez: Old description:
The following test produces an impolite response from GHCi
{{{ $ cat t.hs g :: Int g = 1 + 1 $ ghc-stage2 --interactive t.hs -fhpc GHCi, version 7.9.20141217: http://www.haskell.org/ghc/ :? for help [1 of 1] Compiling Main ( t.hs, interpreted ) Ok, modules loaded: Main. *Main> g ghc-stage2: panic! (the 'impossible' happened) (GHC version 7.9.20141217 for x86_64-unknown-linux): Loading temp shared object failed: /tmp/ghc25774_0/ghc25774_5.so: undefined symbol: _hpc_tickboxes_Main_hpc
Please report this as a GHC bug: http://www.haskell.org/ghc/reportabug }}} It has been noted elsewhere (#9878) that these kinds of messages are better avoided.
New description: The following test produces an impolite response from GHCi {{{ $ cat t.hs g :: Int g = 1 + 1 $ ghc-stage2 --interactive t.hs -fhpc GHCi, version 7.9.20141217: http://www.haskell.org/ghc/ :? for help [1 of 1] Compiling Main ( t.hs, interpreted ) Ok, modules loaded: Main. *Main> g ghc-stage2: panic! (the 'impossible' happened) (GHC version 7.9.20141217 for x86_64-unknown-linux): Loading temp shared object failed: /tmp/ghc25774_0/ghc25774_5.so: undefined symbol: _hpc_tickboxes_Main_hpc Please report this as a GHC bug: http://www.haskell.org/ghc/reportabug }}} Discovered while investigating #9878. -- -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/9903#comment:1 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#9903: GHCi produces a cryptic message when using HPC -------------------------------------+------------------------------------- Reporter: | Owner: facundo.dominguez | Status: new Type: bug | Milestone: Priority: normal | Version: 7.9 Component: GHCi | Keywords: hpc Resolution: | Architecture: Unknown/Multiple Operating System: | Difficulty: Unknown Unknown/Multiple | Blocked By: Type of failure: GHCi crash | Related Tickets: #9878, #9762 ? Test Case: | Blocking: | Differential Revisions: | -------------------------------------+------------------------------------- Comment (by rwbarton): This is likely the same issue as #9762, yes. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/9903#comment:2 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#9903: GHCi produces a cryptic message when using HPC -------------------------------------+------------------------------------- Reporter: | Owner: facundo.dominguez | Status: new Type: bug | Milestone: Priority: normal | Version: 7.9 Component: GHCi | Keywords: hpc Resolution: | Architecture: Unknown/Multiple Operating System: | Difficulty: Unknown Unknown/Multiple | Blocked By: Type of failure: GHCi crash | Related Tickets: #9878, #9762 ? Test Case: | Blocking: | Differential Revisions: | -------------------------------------+------------------------------------- Comment (by rwbarton): Replying to [comment:2 rwbarton]:
This is likely the same issue as #9762, yes.
After some investigation I no longer think it's the same issue. This one is really about supporting HPC in bytecode objects. In the short term we may just want to bail out of the bytecode compiler if HPC is turned on (with a friendlier message) and suggest that the user use `-fobject-code`. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/9903#comment:3 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#9903: GHCi produces a cryptic message when using HPC -------------------------------------+------------------------------------- Reporter: | Owner: facundo.dominguez | Type: bug | Status: closed Priority: normal | Milestone: Component: GHCi | Version: 7.9 Resolution: invalid | Keywords: hpc Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: GHCi crash | Test Case: Blocked By: | Blocking: Related Tickets: #9878, #9762 ? | Differential Revisions: -------------------------------------+------------------------------------- Changes (by bgamari): * status: new => closed * resolution: => invalid Comment: It appears that the issue here is really the poor error message. As noted in the User's Guide, hpc and GHCi aren't compatible (as the code generator is expected to produce some symbols which the interpreter does not produce, hence the error message here). I'll push a fix for the error message shortly. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/9903#comment:4 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#9903: GHCi produces a cryptic message when using HPC
-------------------------------------+-------------------------------------
Reporter: | Owner:
facundo.dominguez |
Type: bug | Status: closed
Priority: normal | Milestone:
Component: GHCi | Version: 7.9
Resolution: invalid | Keywords: hpc
Operating System: Unknown/Multiple | Architecture:
| Unknown/Multiple
Type of failure: GHCi crash | Test Case:
Blocked By: | Blocking:
Related Tickets: #9878, #9762 ? | Differential Revisions:
-------------------------------------+-------------------------------------
Comment (by Ben Gamari
participants (1)
-
GHC