[GHC] #11041: EventLog write fails if entire buffer is not written

GHC ghc-devs at haskell.org
Sun Nov 1 18:34:57 UTC 2015


#11041: EventLog write fails if entire buffer is not written
-------------------------------------+-------------------------------------
        Reporter:  sseverance        |                Owner:
            Type:  bug               |               Status:  patch
        Priority:  high              |            Milestone:  8.0.1
       Component:  Runtime System    |              Version:  7.10.2
      Resolution:                    |             Keywords:  eventlog
Operating System:  Unknown/Multiple  |         Architecture:  x86_64
 Type of failure:  Incorrect result  |  (amd64)
  at runtime                         |            Test Case:
      Blocked By:                    |             Blocking:
 Related Tickets:                    |  Differential Rev(s):  Phab:D1415
       Wiki Page:                    |
-------------------------------------+-------------------------------------

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

 In [changeset:"f46f32b922d7ecbee2829937295521f5db1d7997/ghc" f46f32b/ghc]:
 {{{
 #!CommitTicketReference repository="ghc"
 revision="f46f32b922d7ecbee2829937295521f5db1d7997"
 EventLog: Loop fwrite if necessary during flush

 Previously the eventlog flush code would fail if `fwrite` wrote less
 than the requested amount. Like all Unix stream I/O operations, however,
 `fwrite` isn't guaranteed to write the entire buffer. Here we loop as
 long as `fwrite` succeeds in writing anything.

 Fixes #11041.

 Test Plan: Validate with eventlog

 Reviewers: austin, simonmar

 Reviewed By: simonmar

 Subscribers: thomie

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

 GHC Trac Issues: #11041
 }}}

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


More information about the ghc-tickets mailing list