[GHC] #10191: Interactive linker crash when partially applying seq#

#10191: Interactive linker crash when partially applying seq# -----------------------------------------+------------------------------- Reporter: mniip | Owner: Type: bug | Status: new Priority: low | Milestone: Component: GHCi | Version: 7.8.4-rc1 Keywords: | Operating System: Linux Architecture: x86_64 (amd64) | Type of failure: GHCi crash Test Case: | Blocked By: Blocking: | Related Tickets: Differential Revisions: | -----------------------------------------+------------------------------- Consider the following commands: {{{#!hs :set -XMagicHash import GHC.IO import GHC.Prim IO (seq# ()) }}} When the last statement is run in GHCi, the following error message is displayed: {{{ ByteCodeLink.lookupCE(primop) During interactive linking, GHCi couldn't find the following symbol: ghczmprim_GHCziPrimopWrappers_seqzh_closure This may be due to you not asking GHCi to load extra object files, archives or DLLs needed by your current session. Restart GHCi, specifying the missing library using the -L/path/to/object/dir and -lmissinglibname flags, or simply by naming the relevant files on the GHCi command line. Alternatively, this link failure might indicate a bug in GHCi. If you suspect the latter, please send a bug report to: glasgow-haskell-bugs@haskell.org }}} The expression works if I eta-unreduce the `seq#` call: `IO (\x -> seq# () x)`. The problem seems to be exclusive to GHCi: if you put that expression in a file, it works fine when compiled by GHC, and even GHCi works fine when using the resulting `.o` file. When there's no `.o` GHCi still crashes, and eta-unreduction doesn't help anymore (something to with optimizations I guess). I can also reproduce this on the Linux-x86 architecture. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/10191 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#10191: Interactive linker crash when partially applying seq# -------------------------------+----------------------------------------- Reporter: mniip | Owner: Type: bug | Status: new Priority: low | Milestone: Component: GHCi | Version: 7.8.4-rc1 Resolution: | Keywords: Operating System: Linux | Architecture: x86_64 (amd64) Type of failure: GHCi crash | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Revisions: -------------------------------+----------------------------------------- Comment (by rwbarton): `seq#` and some other primops don't get wrappers due to this filter in genprimopcode: {{{ dodgy spec = name spec `elem` [-- C code generator can't handle these "seq#", "tagToEnum#", -- not interested in parallel support "par#", "parGlobal#", "parLocal#", "parAt#", "parAtAbs#", "parAtRel#", "parAtForNow#" ] }}} I'm not sure entirely what this is all about, but since the code is 14 years old I'm just going to try deleting it and seeing if anything goes wrong. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/10191#comment:1 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#10191: Interactive linker crash when partially applying seq# -------------------------------+----------------------------------------- Reporter: mniip | Owner: Type: bug | Status: new Priority: low | Milestone: Component: GHCi | Version: 7.8.4-rc1 Resolution: | Keywords: Operating System: Linux | Architecture: x86_64 (amd64) Type of failure: GHCi crash | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Revisions: Phab:D759 -------------------------------+----------------------------------------- Changes (by rwbarton): * differential: => Phab:D759 -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/10191#comment:2 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#10191: Interactive linker crash when partially applying seq#
-------------------------------+-----------------------------------------
Reporter: mniip | Owner:
Type: bug | Status: new
Priority: low | Milestone:
Component: GHCi | Version: 7.8.4-rc1
Resolution: | Keywords:
Operating System: Linux | Architecture: x86_64 (amd64)
Type of failure: GHCi crash | Test Case:
Blocked By: | Blocking:
Related Tickets: | Differential Revisions: Phab:D759
-------------------------------+-----------------------------------------
Comment (by Reid Barton

#10191: Interactive linker crash when partially applying seq# -------------------------------+----------------------------------------- Reporter: mniip | Owner: Type: bug | Status: closed Priority: low | Milestone: Component: GHCi | Version: 7.8.4-rc1 Resolution: fixed | Keywords: Operating System: Linux | Architecture: x86_64 (amd64) Type of failure: GHCi crash | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Revisions: Phab:D759 -------------------------------+----------------------------------------- Changes (by rwbarton): * status: new => closed * resolution: => fixed -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/10191#comment:4 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#10191: Interactive linker crash when partially applying seq# -------------------------------+----------------------------------------- Reporter: mniip | Owner: Type: bug | Status: closed Priority: low | Milestone: Component: GHCi | Version: 7.8.4-rc1 Resolution: fixed | Keywords: Operating System: Linux | Architecture: x86_64 (amd64) Type of failure: GHCi crash | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Revisions: Phab:D759 -------------------------------+----------------------------------------- Comment (by simonpj): Thanks for chasing this down, Reid. Simon -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/10191#comment:5 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler
participants (1)
-
GHC