[GHC] #8309: traceEvent truncates to 512 bytes

GHC ghc-devs at haskell.org
Wed Feb 18 15:47:57 UTC 2015


#8309: traceEvent truncates to 512 bytes
-------------------------------------+-------------------------------------
        Reporter:  duncan            |                   Owner:
            Type:  bug               |                  Status:  patch
        Priority:  normal            |               Milestone:
       Component:  Runtime System    |                 Version:  7.6.3
      Resolution:                    |                Keywords:  eventlog
Operating System:  Unknown/Multiple  |  tracing
 Type of failure:  None/Unknown      |            Architecture:
      Blocked By:                    |  Unknown/Multiple
 Related Tickets:  #3874             |               Test Case:
                                     |                Blocking:
                                     |  Differential Revisions:  Phab:D656
-------------------------------------+-------------------------------------

Comment (by Austin Seipp <austin@…>):

 In [changeset:"a82364c9410d35fa9cb5031d553212267c3628c5/ghc"]:
 {{{
 #!CommitTicketReference repository="ghc"
 revision="a82364c9410d35fa9cb5031d553212267c3628c5"
 Don't truncate traceEvents to 512 bytes (#8309)

 Summary:
 Don't call postLogMsg to post a user msg, because it truncates messages to
 512 bytes.

 Rename traceCap_stderr and trace_stderr to vtraceCap_stderr and
 trace_stderr,
 to signal that they take a va_list (similar to vdebugBelch vs debugBelch).

 See #3874 for the original reason behind traceFormatUserMsg.

 See the commit msg in #9395 (d360d440) for a discussion about using
 null-terminated strings vs strings with an explicit length.

 Test Plan:
 Run `cabal install ghc-events` and inspect the result of `ghc-events show`
 on
 an eventlog file created with `ghc -eventlog Test.hs` and `./Test +RTS
 -l`,
 where Test.hs contains:

 ```
 import Debug.Trace
 main = traceEvent (replicate 510 'a' ++ "bcd") $ return ()
 ```

 Depends on D655.

 Reviewers: austin

 Reviewed By: austin

 Subscribers: thomie

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

 GHC Trac Issues: #8309
 }}}

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


More information about the ghc-tickets mailing list