Immediate seg-fault on 32-bit windows build
On 32-bit Windows (built with MSYS), GHC crashes almost immediately when used with -prof
, -debug
, -threaded
or any other "way" flag. Ian boiled it down as follows.
It seems that the commits
0c4a9f38637dfc3bc8fd48e8ba6bf64da51b727b
ecd967612877e1965ddebefe9b83acd837bb413a
introduced the problem, but I'm not sure whether they are the direct cause or just happened to tickle a pre-existing bug. Attached is a self-contained module that goes wrong:
$ inplace/bin/ghc-stage1 -debug --make test -O -fforce-recomp $ ./test +RTS -DS; echo $?
cap 0: initialised
A
Segmentation fault/access violation in generated code
1
Works with 7.4.1:
$ ghc -debug --make test -O -fforce-recomp $ ./test; echo $?
A
[WayDyn]
B
0
It's quite fragile, e.g. if I remove
ghcMode :: (),
from the DynFlags
type then it succeeds.
Trac metadata
Trac field | Value |
---|---|
Version | 7.6.1 |
Type | Bug |
TypeOfFailure | OtherFailure |
Priority | normal |
Resolution | Unresolved |
Component | Compiler |
Test case | |
Differential revisions | |
BlockedBy | |
Related | |
Blocking | |
CC | |
Operating system | |
Architecture |