[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 <rwbarton@…>): In [changeset:"af45feba476af0b5a12f3a1ac36854f2cf44f993/ghc"]: {{{ #!CommitTicketReference repository="ghc" revision="af45feba476af0b5a12f3a1ac36854f2cf44f993" Update list of primops that don't get wrappers (#10191) Summary: The list was 14 years old, and there don't seem to be any problems with seq# or par#; the other par*# primops were not actually implemented at all and were removed in D758. Test Plan: validate; will also try to locally validate an unregisterised build in case there was some truth to the deleted comment Reviewers: austin Subscribers: thomie Differential Revision: https://phabricator.haskell.org/D759 GHC Trac Issues: #10191 }}} -- Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/10191#comment:3> 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 -------------------------------+----------------------------------------- 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