diff options
author | Reid Barton <rwbarton@gmail.com> | 2016-01-27 11:05:59 +0100 |
---|---|---|
committer | Ben Gamari <ben@smart-cactus.org> | 2016-01-27 11:32:15 +0100 |
commit | d50609e8f7a9c3a19d9d75c6133e742c9b584732 (patch) | |
tree | 86d6694c1e504b7c5d3c092957999a09e269eebd /mk | |
parent | 0d92d9cb6d65fd00f9910c3f6f85bc6c68f5543b (diff) | |
download | haskell-d50609e8f7a9c3a19d9d75c6133e742c9b584732.tar.gz |
Test for undef bugs in the LLVM backend when validating
In an attempt to catch bugs involving using undef values, replace
undef literals by values likely to cause crashes or test failures.
We do this only when validating since it is a deoptimization.
This depends on D1857 to catch such bugs in the RTS (such as #11487).
Test Plan:
Did a build with
```
BuildFlavour = quick-llvm
SRC_HC_OPTS_STAGE1 = -fllvm-fill-undef-with-garbage
```
The build crashed when running ghc-stage2, as expected.
Reviewers: austin, bgamari
Reviewed By: bgamari
Subscribers: thomie
Differential Revision: https://phabricator.haskell.org/D1858
Diffstat (limited to 'mk')
-rw-r--r-- | mk/flavours/validate.mk | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/mk/flavours/validate.mk b/mk/flavours/validate.mk index 94892d465f..1a636faea4 100644 --- a/mk/flavours/validate.mk +++ b/mk/flavours/validate.mk @@ -1,4 +1,5 @@ SRC_HC_OPTS = -O0 -H64m +SRC_HC_OPTS_STAGE1 = -fllvm-fill-undef-with-garbage # See Trac 11487 GhcStage1HcOpts = -O GhcStage2HcOpts = -O -dcore-lint GhcLibHcOpts = -O -dcore-lint |