[GHC] #7361: Segmentation fault on 5f37e0c71ff4af8539c5aebc739b006b4f0c6ebf
GHC
cvs-ghc at haskell.org
Tue Jan 8 16:46:27 CET 2013
#7361: Segmentation fault on 5f37e0c71ff4af8539c5aebc739b006b4f0c6ebf
---------------------------------+------------------------------------------
Reporter: bgamari | Owner: simonmar
Type: bug | Status: infoneeded
Priority: highest | Milestone: 7.8.1
Component: Compiler | Version: 7.7
Keywords: | Os: Unknown/Multiple
Architecture: Unknown/Multiple | Failure: Runtime crash
Difficulty: Unknown | Testcase:
Blockedby: | Blocking:
Related: |
---------------------------------+------------------------------------------
Changes (by simonmar):
* status: new => infoneeded
Comment:
I reproduced it again today, but the bug still eludes me. The code is
reading and writing beyond the end of a `ByteArray#`, and I can't tell
whether this is a codegen bug or a library bug that has gone unnoticed so
far.
The crash still happens with `-fno-cmm-sink` and with `-fllvm`, which
eliminates the two things that I would be most suspicious of (the Cmm
sinking pass and the native code generator).
The code that writes over the end of the array is
`Data.Random.Source.MWC.$wa`. This function is large and complicated and
the code is TH-generated, so I'm a bit lost here. I tried to follow the
code and couldn't see any codegen bugs though.
The erroneous access happens on the 3rd call, where the arguments are a
normal-looking `MVector`:
{{{
(gdb) p4 0x2aaaac40bde9
0x2aaaac40be00: 0x102
0x2aaaac40bdf8: 0x0
0x2aaaac40bdf0: 0x2aaaac405628
0x2aaaac40bde8: 0x4cc3d0
<vectorzm0zi10zi0zi1_DataziVectorziPrimitiveziMutable_MVector_con_info>
}}}
and an `Int#` value 1.
Maybe someone familiar with `random-source` could add some debugging tests
and try to narrow down the failure?
--
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/7361#comment:21>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the Glasgow-haskell-bugs
mailing list