Re: [GHC] #3874: GHC.Exts.traceEvent segfaults
#3874: GHC.Exts.traceEvent segfaults -----------------------------------+-------------------------------- Reporter: cjs | Owner: igloo Type: merge | Status: closed Priority: high | Milestone: 6.12.2 Component: Runtime System | Version: 6.12.1 Resolution: fixed | Keywords: event, eventlog Operating System: Linux | Architecture: x86_64 (amd64) Type of failure: Runtime crash | Test Case: -----------------------------------+-------------------------------- 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/3874#comment:9> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler
participants (1)
-
GHC