[GHC] #12527: GHC segfault while linking llvm-general while compiling a file using Template Haskell

GHC ghc-devs at haskell.org
Tue Aug 23 14:56:55 UTC 2016


#12527: GHC segfault while linking llvm-general while compiling a file using
Template Haskell
-------------------------------------+-------------------------------------
           Reporter:  HMPerson1      |             Owner:
               Type:  bug            |            Status:  new
           Priority:  normal         |         Milestone:
          Component:  Compiler       |           Version:  7.10.3
           Keywords:                 |  Operating System:  Unknown/Multiple
       Architecture:                 |   Type of failure:  Compile-time
  Unknown/Multiple                   |  crash
          Test Case:                 |        Blocked By:
           Blocking:                 |   Related Tickets:
Differential Rev(s):                 |         Wiki Page:
-------------------------------------+-------------------------------------
 If I have a file
 {{{#!hs
 -- Lib.hs
 module Lib where
 [d| foo = 1 |]
 }}}
 and I add `llvm-general` as a dependency, compiling with -v yields the
 attached log, followed by `segmentation fault (core dumped)`.

 Investigating with gdb, the back trace is

 {{{
 ...
 Loading package llvm-general-3.5.1.2 ... linking ...
 Thread 1 "ghc" received signal SIGSEGV, Segmentation fault.
 0x000000004490f604 in ?? ()
 (gdb) bt
 #0  0x000000004490f604 in ?? ()
 #1  0x0000000044a8798d in ?? ()
 #2  0x0000000000000132 in ?? ()
 #3  0x0000000044a98b38 in ?? ()
 #4  0x0000000044a87b30 in ?? ()
 #5  0x00007fffeed667b1 in ocRunInit_ELF (oc=0xf7f520) at rts/Linker.c:6198
 #6  resolveObjs_ () at rts/Linker.c:3196
 #7  resolveObjs () at rts/Linker.c:3218
 #8  0x00007ffff5eb03a3 in ?? ()
    from
 /home/michael/.stack/programs/x86_64-linux/ghc-7.10.3/lib/ghc-7.10.3/bin/../ghc_0AG9TOjDEtx4Ji3wSwHOBe/libHSghc-7.10.3
 -0AG9TOjDEtx4Ji3wSwHOBe-ghc7.10.3.so
 #9  0x0000000000000000 in ?? ()
 }}}

 Note that without the quasi-quotation in `Lib.hs` it will compile fine,
 and without the `llvm-general` dependency it will also compile fine.

--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/12527>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler


More information about the ghc-tickets mailing list