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

GHC ghc-devs at haskell.org
Sun Jan 20 08:13:01 UTC 2019


#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


More information about the ghc-tickets mailing list