[GHC] #8877: "if this code is reached, the program will abort" in sparc
#8877: "if this code is reached, the program will abort" in sparc ----------------------------+------------------------------------- Reporter: nomeata | Owner: Type: bug | Status: new Priority: normal | Milestone: Component: Compiler | Version: 7.6.3 Keywords: | Operating System: Unknown/Multiple Architecture: sparc | Type of failure: Runtime crash Difficulty: Unknown | Test Case: Blocked By: | Blocking: Related Tickets: #8857 | ----------------------------+------------------------------------- Hi, sparc, when built with dynamic libraries, fails with a segmentation fault: https://buildd.debian.org/status/fetch.php?pkg=ghc&arch=sparc&ver=7.8.201402... Possible cause indicated by {{{ "inplace/bin/ghc-stage1" -static -H32m -O -lffi -optl-pthread -Iincludes -Iincludes/dist -Iincludes/dist-derivedconstants/header -Iincludes/dist- ghcconstants/header -Irts -Irts/dist/build -DCOMPILING_RTS -package-name rts -optc-DNOSMP -dcmm-lint -i -irts -irts/dist/build -irts/dist/build/autogen -Irts/dist/build -Irts/dist/build/autogen -O2 -c rts/Apply.cmm -o rts/dist/build/Apply.o /tmp/ghc14927_0/ghc14927_2.hc: In function 'stg_PAP_entry': /tmp/ghc14927_0/ghc14927_2.hc:101:30: warning: function called through a non-compatible type [enabled by default] /tmp/ghc14927_0/ghc14927_2.hc:101:30: note: if this code is reached, the program will abort }}} It works without shared libraries (see #8857) -- Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/8877> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler
#8877: "if this code is reached, the program will abort" in unregisterised build -------------------------------------+------------------------------------ Reporter: nomeata | Owner: Type: bug | Status: new Priority: normal | Milestone: Component: Compiler | Version: 7.8.1-rc2 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: Unknown/Multiple Type of failure: Runtime crash | Difficulty: Unknown Test Case: | Blocked By: Blocking: | Related Tickets: #8857 -------------------------------------+------------------------------------ Changes (by trommler): * cc: ptrommler@… (added) * version: 7.6.3 => 7.8.1-rc2 * architecture: sparc => Unknown/Multiple Comment: I see the same on powerpc64 with dynamic libraries enabled: [https://build.opensuse.org/package/live_build_log/home:ptrommler/ghc/openSUS...] Changing architecture accordingly. -- Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/8877#comment:1> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler
#8877: "if this code is reached, the program will abort" in unregisterised build -------------------------------------+------------------------------------- Reporter: nomeata | Owner: Type: bug | Status: closed Priority: normal | Milestone: 7.10.1 Component: Compiler | Version: 7.8.1-rc2 Resolution: fixed | Keywords: Operating System: Unknown/Multiple | Architecture: Type of failure: Runtime crash | Unknown/Multiple Blocked By: | Test Case: Related Tickets: #8857 | Blocking: | Differential Revisions: -------------------------------------+------------------------------------- Changes (by thomie): * cc: slyfox (added) * status: new => closed * resolution: => fixed * milestone: => 7.10.1 Comment: This should be fixed, thanks to the following commits: In commit 78863edbb0751f5c9694ea10c6132a87cfd0ee10: {{{ Author: Sergei Trofimovich <> Date: Wed Aug 27 22:20:33 2014 +0300 Revert "disable shared libs on sparc (linux/solaris) (fixes #8857)" This reverts commit 623883f1ed0ee11cc925c4590fb09565403fd231. The commit a93ab43ab5f40cadbedea2f6342b93c245e91434 driver: pass '-fPIC' option to assembler as well fixes shared libraries on sparc at least on linux. Properly fixes Issue #8857 Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org> }}} In commit fa31e8f4a0f853848d96549a429083941877bf8d: {{{ Author: Sergei Trofimovich <> Date: Sun Dec 14 14:30:12 2014 +0000 powerpc: fix and enable shared libraries by default on linux Summary: And fix things all the way down to it. Namely: - remove 'r30' from free registers, it's an .LCTOC1 register for gcc. generated .plt stubs expect it to be initialised. - fix PicBase computation, which originally forgot to use 'tmp' reg in 'initializePicBase_ppc.fetchPC' - mark 'ForeighTarget's as implicitly using 'PicBase' register (see comment for details) - add 64-bit MO_Sub and test on alloclimit3/4 regtests - fix dynamic label offsets to match with .LCTOC1 offset Signed-off-by: Sergei Trofimovich <siarheit@google.com> Test Plan: validate passes equal amount of vanilla/dyn tests Reviewers: simonmar, erikd, austin Reviewed By: erikd, austin Subscribers: carter, thomie Differential Revision: https://phabricator.haskell.org/D560 GHC Trac Issues: #8024, #9831 }}} -- Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/8877#comment:2> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler
participants (1)
-
GHC