[GHC] #9399: CPP does not process test case enum01.hs correctly

GHC ghc-devs at haskell.org
Sat Oct 3 11:04:19 UTC 2015


#9399: CPP does not process test case enum01.hs correctly
-------------------------------------+-------------------------------------
        Reporter:  jrp               |                Owner:
            Type:  bug               |               Status:  new
        Priority:  normal            |            Milestone:
       Component:  Test Suite        |              Version:  7.11
      Resolution:                    |             Keywords:  cpp
Operating System:  Windows           |         Architecture:  x86_64
 Type of failure:  GHC rejects       |  (amd64)
  valid program                      |            Test Case:  enum01.hs
      Blocked By:                    |             Blocking:
 Related Tickets:  #365              |  Differential Rev(s):  Phab:D957
-------------------------------------+-------------------------------------

Comment (by Ben Gamari <ben@…>):

 In [changeset:"b6f76b9aaca49df0fb06d8bad2f7edc5b5b8c095/ghc" b6f76b9/ghc]:
 {{{
 #!CommitTicketReference repository="ghc"
 revision="b6f76b9aaca49df0fb06d8bad2f7edc5b5b8c095"
 Prevent GHC from silently dying when preprocessor is not found

 The Windows preprocessor code calls `runInteractiveProcess` but does
 not check if an exception is thrown.
 `runInteractiveProcess` calls `CreateProcess` which when given a format
 the system loader does not know about
 will throw an exception. This is what makes #9399 fail.

 Ultimately we should not use any `CreateProcess` based calls but
 instead `ShellExecuteEx` as  this would allow
 us to run applications that the shell knows about instead of just the
 loader. More details on #365.

 This patch removes `PhaseFailed` and throws `ProgramError` instead.
 `PhaseFailed` was largely unneeded since it never gave
 very useful information aside from the `errorcode` which was almost
 always `1`. `IOErrors` have also been eliminated and `GhcExceptions`
 thrown in their place wherever possible.

 Updates haddock submodule.

 Test Plan:
 `./validate` to make sure anything didn't break and
 `make TESTS="T365"` to test that an error is now properly thrown

 Reviewers: austin, thomie, bgamari

 Reviewed By: thomie, bgamari

 Subscribers: #ghc_windows_task_force

 Differential Revision: https://phabricator.haskell.org/D1256

 GHC Trac Issues: #365
 }}}

--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/9399#comment:16>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler


More information about the ghc-tickets mailing list