[GHC] #8549: GHCI incorrectly link symbols defined with foreign import ccall

#8549: GHCI incorrectly link symbols defined with foreign import ccall -------------------------+------------------------------------------------- Reporter: | Owner: qnikst | Status: new Type: bug | Milestone: Priority: | Version: 7.6.3 normal | Operating System: Unknown/Multiple Component: GHCi | Type of failure: GHCi crash Keywords: | Test Case: Architecture: | https://gist.github.com/qnikst/324a66914b3aba878be5 Unknown/Multiple | Blocking: Difficulty: | Unknown | Blocked By: | Related Tickets: | -------------------------+------------------------------------------------- I have a problem that ghci when loads modules that uses external symbols incorrectly links them, the problem is not reproducible if I'm compiling executable or load modules with :load command. As a result every Pointer value is equivalent to constant 0x0000fffffff225ff. A minimal example is in attached link, it contains a small package and description how to reproduce a bug. Problem is also reproduces on the ghc-HEAD. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/8549 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#8549: GHCI incorrectly link symbols defined with foreign import ccall -------------------------------------------------+------------------------- Reporter: qnikst | Owner: Type: bug | Status: new Priority: normal | Milestone: Component: GHCi | Version: 7.6.3 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: Type of failure: GHCi crash | Unknown/Multiple Test Case: | Difficulty: https://gist.github.com/qnikst/324a66914b3aba878be5| Unknown Blocking: | Blocked By: | Related Tickets: -------------------------------------------------+------------------------- Comment (by hvr): I assume this is on Linux/x86_64? -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/8549#comment:1 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#8549: GHCI incorrectly link symbols defined with foreign import ccall -------------------------------------------------+------------------------- Reporter: qnikst | Owner: Type: bug | Status: new Priority: normal | Milestone: Component: GHCi | Version: 7.6.3 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: Type of failure: GHCi crash | Unknown/Multiple Test Case: | Difficulty: https://gist.github.com/qnikst/324a66914b3aba878be5| Unknown Blocking: | Blocked By: | Related Tickets: -------------------------------------------------+------------------------- Comment (by qnikst): Replying to [comment:1 hvr]:
I assume this is on Linux/x86_64?
Yes. I've tested it on Linux/x86 before and it also failed, I'll update information as soon as I'll be able to run it on that box again. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/8549#comment:2 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#8549: GHCI incorrectly link symbols defined with foreign import ccall -------------------------------------------------+------------------------- Reporter: qnikst | Owner: Type: bug | Status: new Priority: normal | Milestone: Component: GHCi | Version: 7.6.3 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: Type of failure: GHCi crash | Unknown/Multiple Test Case: | Difficulty: https://gist.github.com/qnikst/324a66914b3aba878be5| Unknown Blocking: | Blocked By: | Related Tickets: -------------------------------------------------+------------------------- Comment (by carter): theres no attachement on this ticket. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/8549#comment:3 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#8549: GHCI incorrectly link symbols defined with foreign import ccall -------------------------------------------------+------------------------- Reporter: qnikst | Owner: Type: bug | Status: new Priority: normal | Milestone: Component: GHCi | Version: 7.6.3 Resolution: | Keywords: Operating System: Linux | Architecture: Type of failure: GHCi crash | Unknown/Multiple Test Case: | Difficulty: https://gist.github.com/qnikst/324a66914b3aba878be5| Unknown Blocking: | Blocked By: | Related Tickets: -------------------------------------------------+------------------------- Changes (by qnikst): * os: Unknown/Multiple => Linux -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/8549#comment:4 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#8549: GHCI incorrectly link symbols defined with foreign import ccall -------------------------------------------------+------------------------- Reporter: qnikst | Owner: Type: bug | Status: Priority: normal | closed Component: GHCi | Milestone: Resolution: fixed | Version: 7.6.3 Operating System: Linux | Keywords: Type of failure: GHCi crash | Architecture: Test Case: | Unknown/Multiple https://gist.github.com/qnikst/324a66914b3aba878be5| Difficulty: Blocking: | Unknown | Blocked By: | Related Tickets: -------------------------------------------------+------------------------- Changes (by rwbarton): * status: new => closed * resolution: => fixed Comment: I can reproduce this in 7.6 and ghci's behavior is quite baffling to me, but happily 7.8 exhibits the expected behavior. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/8549#comment:5 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#8549: GHCI incorrectly link symbols defined with foreign import ccall -------------------------------------+------------------------------------- Reporter: qnikst | Owner: Type: bug | Status: closed Priority: normal | Milestone: Component: GHCi | Version: 7.6.3 Resolution: fixed | Keywords: Operating System: Linux | Architecture: Type of failure: GHCi crash | Unknown/Multiple Blocked By: | Test Case: Related Tickets: | https://gist.github.com/qnikst/324a66914b3aba878be5 | Blocking: | Differential Revisions: -------------------------------------+------------------------------------- Comment (by qnikst): Looks like this issue still have happen in some weird situation, currently I have the same issue, in a file that uses constant in quasi-quoter, but only when I'm using haddock (ghc builds fine). Not sure that it will be easy to write a minimal example because this problem involves many parts (quasiquotes, foreing-interface, external library), but many it will give an ideas of what is happening. This issue is reproducible on 7.8 and 7.10. Should I fill a separate bug for that? -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/8549#comment:6 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler
participants (1)
-
GHC