[GHC] #10383: AArch64: get GHC Calling convention working
GHC
ghc-devs at haskell.org
Wed Jun 3 08:56:23 UTC 2015
#10383: AArch64: get GHC Calling convention working
----------------------------------------+----------------------------------
Reporter: erikd | Owner: erikd
Type: feature request | Status: new
Priority: normal | Milestone: 7.12.1
Component: Compiler | Version: 7.11
Resolution: | Keywords:
Operating System: Unknown/Multiple | Architecture: aarch64
Type of failure: Building GHC failed | Test Case:
Blocked By: | Blocking:
Related Tickets: | Differential Revisions:
----------------------------------------+----------------------------------
Comment (by erikd):
At @rwbarton's suggestion, compiled this program
{{{
main = print $ foldl (+) 0 [1..10000000]
}}}
with `ghc-stage1 -O0` (to thrash the GC) and the resulting program ran
correctly. The problem does not seem to be GC related. Can also compile
this program with
{{{
inplace/bin/ghc-stage1 -O0 -dynamic hello.hs -o hello
}}}
and that too runs fine so this is unlikely to be dynamic library loading.
Running `inplace/bin/ghc-stage2 +RTS -Ds` results in:
{{{
7fb3bc9000: created capset 0 of type 2
7fb3bc9000: created capset 1 of type 3
7fb3bc9000: cap 0: initialised
7fb3bc9000: assigned cap 0 to capset 0
7fb3bc9000: assigned cap 0 to capset 1
7fb3bc9000: allocated 1 more capabilities
7fb3bc9000: new task (taskCount: 1)
7fb3bc9000: returning; I want capability 0
7fb3bc9000: resuming capability 0
7fb3bc9000: cap 0: created thread 1
7fb3bc9000: new bound thread (1)
7fb3bc9000: cap 0: schedule()
7fb3bc9000: cap 0: running thread 1 (ThreadRunGHC)
7fb3bc9000: cap 0: created thread 2
7fb3bc9000: cap 0: thread 1 stopped (yielding)
7fb3bc9000: giving up capability 0
7fb3bc9000: starting new worker on capability 0
7fb3bc9000: new worker task (taskCount: 2)
7fb39ff1f0: cap 0: schedule()
7fb39ff1f0: cap 0: running thread 2 (ThreadRunGHC)
7fb39ff1f0: cap 0: thread 2 stopped (yielding)
7fb39ff1f0: giving up capability 0
7fb39ff1f0: passing capability 0 to bound task 0x7fb3bc9000
7fb3bc9000: woken up on capability 0
7fb3bc9000: resuming capability 0
7fb3bc9000: cap 0: running thread 1 (ThreadRunGHC)
Segmentation fault (core dumped)
}}}
so the crash happens right after it switches threads.
--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/10383#comment:10>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the ghc-tickets
mailing list