[commit: ghc] ghc-7.10: Ensure DynFlags are consistent (5af80e7)

git at git.haskell.org git at git.haskell.org
Sun Aug 16 12:31:05 UTC 2015


Repository : ssh://git@git.haskell.org/ghc

On branch  : ghc-7.10
Link       : http://ghc.haskell.org/trac/ghc/changeset/5af80e79b0b679565ffcfae8ed34188561ef1452/ghc

>---------------------------------------------------------------

commit 5af80e79b0b679565ffcfae8ed34188561ef1452
Author: Ben Gamari <bgamari.foss at gmail.com>
Date:   Thu Aug 6 17:25:46 2015 +0200

    Ensure DynFlags are consistent
    
    While we have always had makeDynFlagsConsistent to enforce a variety of
    consistency invariants on DynFlags, it hasn't been widely used.
    GHC.Main, for instance, ignored it entirely. This leads to issues like
    Trac #10549, where an OPTIONS_GHC pragma introduced an inconsistency,
    leading to a perplexing crash later in compilation.
    
    Here I add consistency checks in GHC.Main.set{Session,Program}DynFlags,
    closing this hole.
    
    Fixes #10549.
    
    Test Plan: Validate with T10549
    
    Reviewers: austin
    
    Subscribers: thomie
    
    Differential Revision: https://phabricator.haskell.org/D1128
    
    GHC Trac Issues: #10549
    
    Cherry-Picked-From: eca9a1a17c12d01636417fb88bda5ee5fe34577f


>---------------------------------------------------------------

5af80e79b0b679565ffcfae8ed34188561ef1452
 compiler/main/DynFlags.hs                          | 36 ++++++++++++++++++++--
 compiler/main/GHC.hs                               | 27 +++-------------
 testsuite/tests/ghc-api/T10052/T10052.stderr       |  2 +-
 .../tests/ghci.debugger/scripts/print007.stderr    |  5 +--
 .../should_compile => ghci/should_fail}/Makefile   |  0
 testsuite/tests/ghci/should_fail/T10549.hs         | 15 +++++++++
 testsuite/tests/ghci/should_fail/T10549.script     |  1 +
 .../should_fail/T10549.stderr}                     |  2 +-
 testsuite/tests/ghci/should_fail/all.T             |  3 ++
 9 files changed, 61 insertions(+), 30 deletions(-)

Diff suppressed because of size. To see it, use:

    git diff-tree --root --patch-with-stat --no-color --find-copies-harder --ignore-space-at-eol --cc 5af80e79b0b679565ffcfae8ed34188561ef1452


More information about the ghc-commits mailing list