
#7411: Exceptions are optimized away in certain situations -------------------------------------+------------------------------------- Reporter: SimonHengel | Owner: tdammers Type: bug | Status: new Priority: high | Milestone: 8.8.1 Component: Compiler | Version: 7.6.1 Resolution: | Keywords: seq, deepseq, | evaluate, exceptions Operating System: Linux | Architecture: x86_64 | (amd64) Type of failure: Incorrect result | Test Case: at runtime | simplCore/should_fail/T7411 Blocked By: | Blocking: Related Tickets: #5129 #15225 | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Comment (by tdammers): Did 4 full runs of compiling GHC from scratch and then compiling and running nofib, with different configurations. Here's what happened. 1. "vanilla": compile everything normally (the `prof` build that comes with GHC). Everything works as expected. 2. "nsh": compile everything with `-fno-state-hack` (GHC itself, libraries, nofib). Everything works as expected. 3. "stage1": compile GHC normally, nofib with `-fno-state-hack`, but use stage1 compiler instead of stage2. Everything works as expected. 4. "nofib-nsh": compile GHC normally, nofib with `-fno-state-hack`. GHC segfaults while compiling `Main.hs` from the bernouilli program (which simply happens to be the first one it encounters). Despite passing `-dcore-lint`, I get no linter output. Here's the log: {{{ ------------------------------------------------------------------------ == Recursively making `all' in runstdtest nofib-analyse imaginary spectral real shootout ... PWD = /home/tobias/well-typed/devel/ghc/HEAD/nofib ------------------------------------------------------------------------ ------------------------------------------------------------------------ == make all ; in /home/tobias/well-typed/devel/ghc/HEAD/nofib/runstdtest ------------------------------------------------------------------------ rm -f -f runstdtest echo '#!/usr/bin/perl' >> runstdtest echo '$RM = "rm -f";' >> runstdtest echo '$CONTEXT_DIFF = "diff -U 1";' >> runstdtest cat runstdtest.prl >> runstdtest chmod +x runstdtest Finished making all in runstdtest: 0 ------------------------------------------------------------------------ == make all ; in /home/tobias/well-typed/devel/ghc/HEAD/nofib/nofib-analyse ------------------------------------------------------------------------ make[1]: Nothing to be done for 'all'. Finished making all in nofib-analyse: 0 ------------------------------------------------------------------------ == make all ; in /home/tobias/well-typed/devel/ghc/HEAD/nofib/imaginary ------------------------------------------------------------------------ ------------------------------------------------------------------------ == Recursively making `all' in bernouilli digits-of-e1 digits-of-e2 exp3_8 gen_regexps integrate paraffins primes queens rfib tak wheel-sieve1 wheel- sieve2 x2n1 kahan ... PWD = /home/tobias/well-typed/devel/ghc/HEAD/nofib/imaginary ------------------------------------------------------------------------ ------------------------------------------------------------------------ == make all --no-print-directory; in /home/tobias/well-typed/devel/ghc/HEAD/nofib/imaginary/bernouilli ------------------------------------------------------------------------ HC = /home/tobias/well-typed/devel/ghc/HEAD/inplace/bin/ghc-stage2 HC_OPTS = -O2 -Rghc-timing -H32m -hisuf hi -fno-state-hack -O2 -dcore-lint -rtsopts RUNTEST_OPTS = -ghc-timing ==nofib== bernouilli: time to compile Main follows... /home/tobias/well-typed/devel/ghc/HEAD/inplace/bin/ghc-stage2 -O2 -Rghc- timing -H32m -hisuf hi -fno-state-hack -O2 -dcore-lint -rtsopts -c Main.hs -o Main.o ../../mk/suffix.mk:23: recipe for target 'Main.o' failed make[2]: *** [Main.o] Segmentation fault (core dumped) Failed making all in bernouilli: 1 ../mk/ghc-recurse.mk:65: recipe for target 'all' failed make[1]: *** [all] Error 1 Failed making all in imaginary: 1 mk/ghc-recurse.mk:65: recipe for target 'all' failed make: *** [all] Error 1 }}} Unfortunately I hadn't done a run with GHC stage1 compiled with `-fno- state-hack`; I'll do that next. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/7411#comment:41 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler