[GHC] #16205: Printing a large (GMP) Integer in ghci-ext with LLVM causes a segfault

#16205: Printing a large (GMP) Integer in ghci-ext with LLVM causes a segfault -------------------------------------+------------------------------------- Reporter: harpocrates | Owner: (none) Type: bug | Status: new Priority: normal | Milestone: Component: GHCi | Version: 8.6.3 Keywords: llvm integer- | Operating System: Unknown/Multiple gmp | Architecture: | Type of failure: GHCi crash Unknown/Multiple | Test Case: | Blocked By: Blocking: | Related Tickets: Differential Rev(s): | Wiki Page: -------------------------------------+------------------------------------- Although I haven't reproduced this locally yet, the `validate-x86_64 -linux-deb9-llvm` CI pipeline (which is allowed to fail) has continuously been failing for `print037(ghci-ext)`. Here's the relevant output: {{{ --- ghci.debugger/scripts/print037.run/print037.stdout.normalised 2019-01-19 11:37:48.698917882 +0000 +++ ghci.debugger/scripts/print037.run/print037.run.stdout.normalised 2019-01-19 11:37:48.698917882 +0000 @@ -1,5 +1,4 @@ smallNeg = -53 smallPos = 89 zero = 0 -largeNeg = -4123841823694876543987265438957349857349 -largePos = 5402398759384752938475029384750298347554 +ghc-stage2: ghc-iserv terminated (-11) *** unexpected failure for print037(ghci-ext) }}} Given that the crash happens only on large integers (i.e. not `S#`), something in the C FFI with the GMP code is probably to blame. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/16205 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#16205: Printing a large (GMP) Integer in ghci-ext with LLVM causes a segfault -------------------------------------+------------------------------------- Reporter: harpocrates | Owner: (none) Type: bug | Status: new Priority: normal | Milestone: Component: GHCi | Version: 8.6.3 Resolution: | Keywords: llvm integer- | gmp Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: GHCi crash | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Comment (by harpocrates): More evidence this is C FFI related: the crash does not happen with `integer-simple` and LLVM. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/16205#comment:1 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#16205: Printing a large (GMP) Integer in ghci-ext with LLVM causes a segfault -------------------------------------+------------------------------------- Reporter: harpocrates | Owner: (none) Type: bug | Status: new Priority: normal | Milestone: Component: GHCi | Version: 8.6.3 Resolution: | Keywords: llvm integer- | gmp Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: GHCi crash | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Comment (by bgamari): For the record, yesterday I briefly investigated a related failure in `T15502` in #16087. Unfortunately I found that, unsurprisingly, it will be a nontrivial issue to debug and put it aside. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/16205#comment:2 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#16205: Printing a large (GMP) Integer in ghci-ext with LLVM causes a segfault -------------------------------------+------------------------------------- Reporter: harpocrates | Owner: (none) Type: bug | Status: new Priority: normal | Milestone: Component: GHCi | Version: 8.6.3 Resolution: | Keywords: llvm integer- | gmp Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: GHCi crash | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Comment (by mpickering): I think this is the same issue as #16087 really. I bet they all pass with `integer-simple`. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/16205#comment:3 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#16205: Printing a large (GMP) Integer in ghci-ext with LLVM causes a segfault
-------------------------------------+-------------------------------------
Reporter: harpocrates | Owner: (none)
Type: bug | Status: new
Priority: normal | Milestone:
Component: GHCi | Version: 8.6.3
Resolution: | Keywords: llvm integer-
| gmp
Operating System: Unknown/Multiple | Architecture:
| Unknown/Multiple
Type of failure: GHCi crash | Test Case:
Blocked By: | Blocking:
Related Tickets: | Differential Rev(s):
Wiki Page: |
-------------------------------------+-------------------------------------
Comment (by Marge Bot
participants (1)
-
GHC