[GHC] #14115: GHC segfaults trying to use TH code when ghc is compiled as DYNAMIC_GHC_PROGRAMS=NO

#14115: GHC segfaults trying to use TH code when ghc is compiled as DYNAMIC_GHC_PROGRAMS=NO -------------------------------------+------------------------------------- Reporter: pacak | Owner: (none) Type: bug | Status: new Priority: normal | Milestone: Component: Compiler | Version: 8.2.1 Keywords: | Operating System: Unknown/Multiple Architecture: | Type of failure: Compile-time Unknown/Multiple | crash or panic Test Case: | Blocked By: Blocking: | Related Tickets: Differential Rev(s): | Wiki Page: -------------------------------------+------------------------------------- When ghc 8.2.1 compiled using DYNAMIC_GHC_PROGRAMS=NO attemps at using TH results in all sorts of exciting errors: source files: {{{ % cat A.hs {-# LANGUAGE TemplateHaskell #-} module Numeric.Sum where import B b }}} this file makes little sense, but it was segfaulting when it had more code as well {{{ % cat B.hs {-# LANGUAGE TemplateHaskellQuotes #-} module B where import Language.Haskell.TH b :: DecsQ b = return [ InstanceD Nothing [] (ConT ''Show `AppT` undefined) [] ] }}} Let's try running it a few times - note illegal hardware instruction {{{ % ghc -O2 A.hs [1 of 2] Compiling B ( B.hs, B.o ) [2 of 2] Compiling Numeric.Sum ( A.hs, A.o ) zsh: segmentation fault ghc -O2 A.hs % ghc -O2 A.hs [2 of 2] Compiling Numeric.Sum ( A.hs, A.o ) zsh: segmentation fault ghc -O2 A.hs % ghc -O2 A.hs [2 of 2] Compiling Numeric.Sum ( A.hs, A.o ) zsh: illegal hardware instruction ghc -O2 A.hs % ghc -O2 A.hs [2 of 2] Compiling Numeric.Sum ( A.hs, A.o ) zsh: segmentation fault ghc -O2 A.hs }}} -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/14115 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#14115: GHC segfaults trying to use TH code when ghc is compiled as DYNAMIC_GHC_PROGRAMS=NO -------------------------------------+------------------------------------- Reporter: pacak | Owner: (none) Type: bug | Status: new Priority: normal | Milestone: Component: Compiler | Version: 8.2.1 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: Type of failure: Compile-time | Unknown/Multiple crash or panic | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Comment (by Phyx-): Thanks for the report, which operating system are you on? switching `DYNAMIC_GHC_PROGRAMS=NO` introduces a large platform variant as each platform has it's own linker so it would be useful to know Which one it is :) -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/14115#comment:1 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#14115: GHC segfaults trying to use TH code when ghc is compiled as DYNAMIC_GHC_PROGRAMS=NO -------------------------------------+------------------------------------- Reporter: pacak | Owner: (none) Type: bug | Status: new Priority: normal | Milestone: Component: Compiler | Version: 8.2.1 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: Type of failure: Compile-time | Unknown/Multiple crash or panic | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Comment (by pacak): Ubuntu 16.04.2 LTS I think it segfaults before linking, not sure. Original was segfaulting when compiling 1 of 10. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/14115#comment:2 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#14115: GHC segfaults trying to use TH code when ghc is compiled as DYNAMIC_GHC_PROGRAMS=NO -------------------------------------+------------------------------------- Reporter: pacak | Owner: (none) Type: bug | Status: new Priority: normal | Milestone: Component: Runtime System | Version: 8.2.1 (Linker) | Resolution: | Keywords: Operating System: Linux | Architecture: Type of failure: Compile-time | Unknown/Multiple crash or panic | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Changes (by Phyx-): * os: Unknown/Multiple => Linux * component: Compiler => Runtime System (Linker) Comment: Thanks. The act of running TH code already involves linking, just using the runtime linker instead of the system linker (which you see you visual output for). -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/14115#comment:3 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#14115: GHC segfaults trying to use TH code when ghc is compiled as DYNAMIC_GHC_PROGRAMS=NO -------------------------------------+------------------------------------- Reporter: pacak | Owner: (none) Type: bug | Status: new Priority: normal | Milestone: Component: Runtime System | Version: 8.2.1 (Linker) | Resolution: | Keywords: Operating System: Linux | Architecture: Type of failure: Compile-time | Unknown/Multiple crash or panic | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Comment (by pacak): So that kind of linking... I see. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/14115#comment:4 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#14115: GHC segfaults trying to use TH code when ghc is compiled as DYNAMIC_GHC_PROGRAMS=NO -------------------------------------+------------------------------------- Reporter: pacak | Owner: (none) Type: bug | Status: new Priority: normal | Milestone: Component: Runtime System | Version: 8.2.1 (Linker) | Resolution: | Keywords: Operating System: Linux | Architecture: Type of failure: Compile-time | Unknown/Multiple crash or panic | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Changes (by liyang): * cc: liyang (added) -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/14115#comment:5 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#14115: GHC segfaults trying to use TH code when ghc is compiled as DYNAMIC_GHC_PROGRAMS=NO -------------------------------------+------------------------------------- Reporter: pacak | Owner: (none) Type: bug | Status: new Priority: normal | Milestone: Component: Runtime System | Version: 8.2.1 (Linker) | Resolution: | Keywords: Operating System: Linux | Architecture: Type of failure: Compile-time | Unknown/Multiple crash or panic | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Comment (by pacak): build.mk file used {{{ GhcRTSWays += debug GhcRTSWays += debug_p GhcRTSWays += thr_debug GhcRTSWays += thr_debug_p BUILD_DOCBOOK_HTML = YES DYNAMIC_GHC_PROGRAMS = YES }}} -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/14115#comment:6 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#14115: GHC segfaults trying to use TH code when ghc is compiled as DYNAMIC_GHC_PROGRAMS=NO -------------------------------------+------------------------------------- Reporter: pacak | Owner: (none) Type: bug | Status: new Priority: normal | Milestone: Component: Runtime System | Version: 8.2.1 (Linker) | Resolution: | Keywords: Operating System: Linux | Architecture: Type of failure: Compile-time | Unknown/Multiple crash or panic | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Comment (by pacak): There's no segfaults when this commit 834e350bd9b54bf465f2fef880e18f412fea57d3 + this patch {{{ diff --git a/rts/linker/Elf.c b/rts/linker/Elf.c index df3560476c..efa10fd883 100644 --- a/rts/linker/Elf.c +++ b/rts/linker/Elf.c @@ -98,6 +98,13 @@ # define R_X86_64_PC64 24 # endif +# ifndef R_X86_64_GOTPCRELX +# define R_X86_64_GOTPCRELX 41 +# endif +# ifndef R_X86_64_REX_GOTPCRELX +# define R_X86_64_REX_GOTPCRELX 42 +# endif + /* * Workaround for libc implementations (e.g. eglibc) with incomplete * relocation lists @@ -1471,6 +1478,8 @@ do_Elf_Rela_relocations ( ObjectCode* oc, char* ehdrC, # endif #if x86_64_HOST_ARCH + case R_X86_64_NONE: + break; case R_X86_64_64: *(Elf64_Xword *)P = value; break; }}} are compiled using this build.mk {{{ BuildFlavour = perf GhcRTSWays += debug GhcRTSWays += debug_p GhcRTSWays += thr_debug GhcRTSWays += thr_debug_p BUILD_DOCBOOK_HTML = YES ifneq "$(BuildFlavour)" "" include mk/flavours/$(BuildFlavour).mk endif STRIP_CMD = : DYNAMIC_GHC_PROGRAMS = NO }}} -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/14115#comment:7 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#14115: GHC segfaults trying to use TH code when ghc is compiled as DYNAMIC_GHC_PROGRAMS=NO -------------------------------------+------------------------------------- Reporter: pacak | Owner: (none) Type: bug | Status: new Priority: normal | Milestone: Component: Runtime System | Version: 8.2.1 (Linker) | Resolution: | Keywords: Operating System: Linux | Architecture: Type of failure: Compile-time | Unknown/Multiple crash or panic | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Comment (by pacak): Downloaded source distribution (ghc-8.2.1-src.tar.xz) compiled with either of two build.mk files given in this ticket segfaults. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/14115#comment:8 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#14115: GHC segfaults trying to use TH code when ghc is compiled as DYNAMIC_GHC_PROGRAMS=NO -------------------------------------+------------------------------------- Reporter: pacak | Owner: (none) Type: bug | Status: new Priority: normal | Milestone: Component: Runtime System | Version: 8.2.1 (Linker) | Resolution: | Keywords: Operating System: Linux | Architecture: Type of failure: Compile-time | Unknown/Multiple crash or panic | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Comment (by Phyx-): The define shouldn't be needed, You need a newer glibc version to get the correct behaviour. It needs to be at least `2.23`. See https://ghc.haskell.org/trac/ghc/ticket/12147. The specific relocation can also only be generated by a ld > `2.26`. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/14115#comment:9 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#14115: GHC segfaults trying to use TH code when ghc is compiled as DYNAMIC_GHC_PROGRAMS=NO -------------------------------------+------------------------------------- Reporter: pacak | Owner: (none) Type: bug | Status: new Priority: normal | Milestone: Component: Runtime System | Version: 8.2.1 (Linker) | Resolution: | Keywords: Operating System: Linux | Architecture: Type of failure: Compile-time | Unknown/Multiple crash or panic | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Comment (by pacak): HEAD * e054c5f064 (HEAD -> master, origin/master, origin/HEAD) Bump mtl, parsec, text submodules ben@smart-cactus.org 22 hours ago compiled with this build.mk also segfaults {{{ BuildFlavour = perf GhcRTSWays += debug GhcRTSWays += debug_p GhcRTSWays += thr_debug GhcRTSWays += thr_debug_p BUILD_DOCBOOK_HTML = YES ifneq "$(BuildFlavour)" "" include mk/flavours/$(BuildFlavour).mk endif STRIP_CMD = : DYNAMIC_GHC_PROGRAMS = NO }}} -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/14115#comment:10 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#14115: GHC segfaults trying to use TH code when ghc is compiled as DYNAMIC_GHC_PROGRAMS=NO -------------------------------------+------------------------------------- Reporter: pacak | Owner: (none) Type: bug | Status: new Priority: normal | Milestone: Component: Runtime System | Version: 8.2.1 (Linker) | Resolution: | Keywords: Operating System: Linux | Architecture: Type of failure: Compile-time | Unknown/Multiple crash or panic | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Comment (by pacak): Btw, I'm not 100% sure how exactly version from comment #7 is compiled, using what compiler and so on as it wasn't done by me. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/14115#comment:11 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#14115: GHC segfaults trying to use TH code when ghc is compiled as DYNAMIC_GHC_PROGRAMS=NO -------------------------------------+------------------------------------- Reporter: pacak | Owner: (none) Type: bug | Status: new Priority: normal | Milestone: Component: Runtime System | Version: 8.2.1 (Linker) | Resolution: | Keywords: Operating System: Linux | Architecture: Type of failure: Compile-time | Unknown/Multiple crash or panic | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Comment (by pacak): UPDATE: seems to be working fine with HEAD, so the only version affected is 8.2.1 downloaded and compiled with DYNAMIC_GHC_PROGRAMS = NO -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/14115#comment:12 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#14115: GHC segfaults trying to use TH code when ghc is compiled as DYNAMIC_GHC_PROGRAMS=NO -------------------------------------+------------------------------------- Reporter: pacak | Owner: (none) Type: bug | Status: new Priority: normal | Milestone: Component: Runtime System | Version: 8.2.1 (Linker) | Resolution: | Keywords: Operating System: Linux | Architecture: Type of failure: Compile-time | Unknown/Multiple crash or panic | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Comment (by pacak): Actually... My bad again, HEAD segfaults after all just with lower probability. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/14115#comment:13 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#14115: GHC segfaults trying to use TH code when ghc is compiled as DYNAMIC_GHC_PROGRAMS=NO -------------------------------------+------------------------------------- Reporter: pacak | Owner: (none) Type: bug | Status: new Priority: normal | Milestone: Component: Runtime System | Version: 8.2.1 (Linker) | Resolution: | Keywords: Operating System: Linux | Architecture: Type of failure: Compile-time | Unknown/Multiple crash or panic | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Comment (by bgamari): I tried bisecting this; unfortunately it seems the bisection went off-the rails at some point. Here is the (presumably incorrect, somewhere) log, {{{ git bisect start # good: [54ccf0c957a279c20e1a37a5a462612af8036739] remove dead function 'tcInstBinders' git bisect good 54ccf0c957a279c20e1a37a5a462612af8036739 # bad: [d08b9ccdf2812e8f8fa34d0c89275deee574524c] configure: Ensure that user's LD setting is respected git bisect bad d08b9ccdf2812e8f8fa34d0c89275deee574524c # bad: [927e7810f7dcea295c1f8e93535835e52da0edbb] typo: -XUndeci[d]ableInstances git bisect bad 927e7810f7dcea295c1f8e93535835e52da0edbb # bad: [905dc8bc74bebf5370eb9237cc8756cd9fe871ae] Make ':info Coercible' display an arbitrary string (fixes #12390) git bisect bad 905dc8bc74bebf5370eb9237cc8756cd9fe871ae # bad: [8f8d756c5a29217ff79154caa1696b6e572d186f] rts: Fix uninitialised variable uses git bisect bad 8f8d756c5a29217ff79154caa1696b6e572d186f # bad: [1ef4156e45dcb258f6ef05cfb909547b8e3beb0f] Prevent ApplicativeDo from applying to strict pattern matches (#13875) git bisect bad 1ef4156e45dcb258f6ef05cfb909547b8e3beb0f # bad: [7de2c07d61d8ff952164ee8e6948c1415514ee6d] users-guide: Document FFI safety guarantees git bisect bad 7de2c07d61d8ff952164ee8e6948c1415514ee6d # bad: [58c781da4861faab11e4c5804e07e6892908ef72] Revert "Remove the Windows GCC driver." git bisect bad 58c781da4861faab11e4c5804e07e6892908ef72 # bad: [3b0e7555fafe73b157a96ca48d8ddc04ad81b231] Fix lexically-scoped type variables git bisect bad 3b0e7555fafe73b157a96ca48d8ddc04ad81b231 # first bad commit: [3b0e7555fafe73b157a96ca48d8ddc04ad81b231] Fix lexically-scoped type variables }}} -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/14115#comment:14 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#14115: GHC segfaults trying to use TH code when ghc is compiled as DYNAMIC_GHC_PROGRAMS=NO -------------------------------------+------------------------------------- Reporter: pacak | Owner: (none) Type: bug | Status: new Priority: normal | Milestone: Component: Runtime System | Version: 8.2.1 (Linker) | Resolution: | Keywords: Operating System: Linux | Architecture: Type of failure: Compile-time | Unknown/Multiple crash or panic | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Comment (by bgamari): Simon says that this should in principle be covered by the `extinterp` testsuite way. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/14115#comment:15 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#14115: GHC segfaults trying to use TH code when ghc is compiled as DYNAMIC_GHC_PROGRAMS=NO -------------------------------------+------------------------------------- Reporter: pacak | Owner: (none) Type: bug | Status: new Priority: normal | Milestone: Component: Runtime System | Version: 8.2.1 (Linker) | Resolution: | Keywords: Operating System: Linux | Architecture: Type of failure: Compile-time | Unknown/Multiple crash or panic | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Changes (by bgamari): * cc: JaffaCake (added) Comment: A second attempt at bisection (this time just within `rts/`) reveals that this is due to f9c6d53fe997f1c560cda6f346f4b201711df37c, {{{ git bisect start 'rts' # good: [54ccf0c957a279c20e1a37a5a462612af8036739] remove dead function 'tcInstBinders' git bisect good 54ccf0c957a279c20e1a37a5a462612af8036739 # bad: [d08b9ccdf2812e8f8fa34d0c89275deee574524c] configure: Ensure that user's LD setting is respected git bisect bad d08b9ccdf2812e8f8fa34d0c89275deee574524c # bad: [555e5cc48b6c2608ae8d4bd3b2a5bd2ef63236ab] rts: Address AP_STACK comment suggestion from Simon git bisect bad 555e5cc48b6c2608ae8d4bd3b2a5bd2ef63236ab # bad: [a6f3d1b00e9c37a56cd4db9e519309e94a65d181] rts: Fix isByteArrayPinned#'s treatment of large arrays git bisect bad a6f3d1b00e9c37a56cd4db9e519309e94a65d181 # bad: [f9c6d53fe997f1c560cda6f346f4b201711df37c] Tag the FUN before making a PAP (#13767) git bisect bad f9c6d53fe997f1c560cda6f346f4b201711df37c # good: [9b514dedf090c5e21e3be38d174cf1390e21879f] rts/RetainerProfile: Const-correctness fixes git bisect good 9b514dedf090c5e21e3be38d174cf1390e21879f # first bad commit: [f9c6d53fe997f1c560cda6f346f4b201711df37c] Tag the FUN before making a PAP (#13767) }}} -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/14115#comment:16 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#14115: GHC segfaults trying to use TH code when ghc is compiled as DYNAMIC_GHC_PROGRAMS=NO -------------------------------------+------------------------------------- Reporter: pacak | Owner: (none) Type: bug | Status: new Priority: normal | Milestone: Component: Runtime System | Version: 8.2.1 (Linker) | Resolution: | Keywords: Operating System: Linux | Architecture: Type of failure: Compile-time | Unknown/Multiple crash or panic | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Comment (by RyanGlScott): That commit has been particularly problematic, as it's also responsible for #14036. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/14115#comment:17 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#14115: GHC segfaults trying to use TH code when ghc is compiled as DYNAMIC_GHC_PROGRAMS=NO -------------------------------------+------------------------------------- Reporter: pacak | Owner: (none) Type: bug | Status: patch Priority: normal | Milestone: Component: Runtime System | Version: 8.2.1 (Linker) | Resolution: | Keywords: Operating System: Linux | Architecture: Type of failure: Compile-time | Unknown/Multiple crash or panic | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Phab:D3983 Wiki Page: | -------------------------------------+------------------------------------- Changes (by dfeuer): * status: new => patch * differential: => Phab:D3983 Comment: I think I have a fix for #14036. Hopefully that fixes this too. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/14115#comment:18 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#14115: GHC segfaults trying to use TH code when ghc is compiled as DYNAMIC_GHC_PROGRAMS=NO -------------------------------------+------------------------------------- Reporter: pacak | Owner: (none) Type: bug | Status: patch Priority: normal | Milestone: Component: Runtime System | Version: 8.2.1 (Linker) | Resolution: | Keywords: Operating System: Linux | Architecture: Type of failure: Compile-time | Unknown/Multiple crash or panic | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Phab:D3983 Wiki Page: | -------------------------------------+------------------------------------- Comment (by dfeuer): The commit bgamari identified was definitely problematic, and definitely caused #14036. I just committed a fix for that. However, if the problem in this ticket occurs in the released GHC 8.2.1 (as the ticket text suggests), then there must be something else wrong. pacak, were you using released 8.2.1, or something later? -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/14115#comment:19 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#14115: GHC segfaults trying to use TH code when ghc is compiled as DYNAMIC_GHC_PROGRAMS=NO -------------------------------------+------------------------------------- Reporter: pacak | Owner: (none) Type: bug | Status: patch Priority: normal | Milestone: Component: Runtime System | Version: 8.2.1 (Linker) | Resolution: | Keywords: Operating System: Linux | Architecture: Type of failure: Compile-time | Unknown/Multiple crash or panic | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Phab:D3983 Wiki Page: | -------------------------------------+------------------------------------- Changes (by dfeuer): * cc: dfeuer (added) -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/14115#comment:20 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#14115: GHC segfaults trying to use TH code when ghc is compiled as DYNAMIC_GHC_PROGRAMS=NO -------------------------------------+------------------------------------- Reporter: pacak | Owner: (none) Type: bug | Status: patch Priority: normal | Milestone: Component: Runtime System | Version: 8.2.1 (Linker) | Resolution: | Keywords: Operating System: Linux | Architecture: Type of failure: Compile-time | Unknown/Multiple crash or panic | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Phab:D3983 Wiki Page: | -------------------------------------+------------------------------------- Comment (by pacak): I'm pretty sure I was able to replicate on downloaded 8.2.1 version. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/14115#comment:21 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#14115: GHC segfaults trying to use TH code when ghc is compiled as DYNAMIC_GHC_PROGRAMS=NO -------------------------------------+------------------------------------- Reporter: pacak | Owner: (none) Type: bug | Status: patch Priority: normal | Milestone: Component: Runtime System | Version: 8.2.1 (Linker) | Resolution: | Keywords: Operating System: Linux | Architecture: Type of failure: Compile-time | Unknown/Multiple crash or panic | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Phab:D3983 Wiki Page: | -------------------------------------+------------------------------------- Comment (by dfeuer): Oh, I just saw your earlier comment. We'll have to try reproducing with the very latest HEAD, and if we need to bisect again, stay in an earlier timeframe. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/14115#comment:22 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#14115: GHC segfaults trying to use TH code when ghc is compiled as DYNAMIC_GHC_PROGRAMS=NO -------------------------------------+------------------------------------- Reporter: pacak | Owner: (none) Type: bug | Status: patch Priority: normal | Milestone: Component: Runtime System | Version: 8.2.1 (Linker) | Resolution: | Keywords: Operating System: Linux | Architecture: Type of failure: Compile-time | Unknown/Multiple crash or panic | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Phab:D3983 Wiki Page: | -------------------------------------+------------------------------------- Comment (by pacak): Still the case for 8.2.2rc -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/14115#comment:23 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#14115: GHC segfaults trying to use TH code when ghc is compiled as DYNAMIC_GHC_PROGRAMS=NO -------------------------------------+------------------------------------- Reporter: pacak | Owner: (none) Type: bug | Status: patch Priority: normal | Milestone: Component: Runtime System | Version: 8.2.1 (Linker) | Resolution: | Keywords: Operating System: Linux | Architecture: Type of failure: Compile-time | Unknown/Multiple crash or panic | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Phab:D3983 Wiki Page: | -------------------------------------+------------------------------------- Comment (by bgamari): I suspect that this may be another manifestation of #14328. pacak, are you using `ld.gold`? -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/14115#comment:24 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#14115: GHC segfaults trying to use TH code when ghc is compiled as DYNAMIC_GHC_PROGRAMS=NO -------------------------------------+------------------------------------- Reporter: pacak | Owner: (none) Type: bug | Status: patch Priority: normal | Milestone: Component: Runtime System | Version: 8.2.1 (Linker) | Resolution: | Keywords: Operating System: Linux | Architecture: Type of failure: Compile-time | Unknown/Multiple crash or panic | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Phab:D3983 Wiki Page: | -------------------------------------+------------------------------------- Comment (by pacak): Looks like it, but that's what ghc decided to use on it's own free will. {{{ % egrep ^LD= config.log LD='ld.gold' }}} -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/14115#comment:25 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#14115: GHC segfaults trying to use TH code when ghc is compiled as DYNAMIC_GHC_PROGRAMS=NO -------------------------------------+------------------------------------- Reporter: pacak | Owner: (none) Type: bug | Status: patch Priority: normal | Milestone: Component: Runtime System | Version: 8.2.1 (Linker) | Resolution: | Keywords: Operating System: Linux | Architecture: Type of failure: Compile-time | Unknown/Multiple crash or panic | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Phab:D3983 Wiki Page: | -------------------------------------+------------------------------------- Comment (by bgamari): Indeed compiling with `ld.bfd` instead seems to avoid this. I strongly suspect this is a duplicate of #14328. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/14115#comment:26 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#14115: GHC segfaults trying to use TH code when ghc is compiled as DYNAMIC_GHC_PROGRAMS=NO -------------------------------------+------------------------------------- Reporter: pacak | Owner: (none) Type: bug | Status: patch Priority: normal | Milestone: Component: Runtime System | Version: 8.2.1 (Linker) | Resolution: | Keywords: Operating System: Linux | Architecture: Type of failure: Compile-time | Unknown/Multiple crash or panic | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Phab:D3983 Wiki Page: | -------------------------------------+------------------------------------- Comment (by pacak): Using `ld` as a linker also helped, feel free to close this bug as duplicate. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/14115#comment:27 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#14115: GHC segfaults trying to use TH code when ghc is compiled as DYNAMIC_GHC_PROGRAMS=NO -------------------------------------+------------------------------------- Reporter: pacak | Owner: (none) Type: bug | Status: closed Priority: normal | Milestone: Component: Runtime System | Version: 8.2.1 (Linker) | Resolution: duplicate | Keywords: Operating System: Linux | Architecture: Type of failure: Compile-time | Unknown/Multiple crash or panic | Test Case: Blocked By: | Blocking: Related Tickets: #14328 | Differential Rev(s): Phab:D3983 Wiki Page: | -------------------------------------+------------------------------------- Changes (by dfeuer): * status: patch => closed * resolution: => duplicate * related: => #14328 Comment: Closing as a duplicate. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/14115#comment:28 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler
participants (1)
-
GHC