Fix T9384: fix increacing capabilites number for eventlog.
ClosedPublic

Authored by qnikst on Dec 25 2014, 5:10 PM.

Details

Summary

Event log had inconcistent support for increacing capabilies
number, as header were not inserted in capability buffer. It
resulted in a ghc-events crash (see Trac #9384). This commit
fixes this issue by inserting required header when number
of capabilies grows.

Diff Detail

Repository
rGHC Glasgow Haskell Compiler
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
qnikst updated this revision to Diff 2024.Dec 25 2014, 5:10 PM
qnikst retitled this revision from to Fix T9384: fix increacing capabilites number for eventlog..
qnikst updated this object.
qnikst edited the test plan for this revision. (Show Details)
qnikst added reviewers: simonmar, trofi, Mikolaj.
qnikst updated the Trac tickets for this revision.
qnikst updated this revision to Diff 2025.Dec 25 2014, 5:19 PM
qnikst edited edge metadata.
  1. Indeintation fixed;
  2. Added comment why from=0 case is special.
Mikolaj accepted this revision.Dec 27 2014, 11:24 AM
Mikolaj edited edge metadata.

I can't tell if that covers all problems with eventlogs vs changing the number of capabilities and I haven't tested it, but it looks good. If it just passes the test described in the trac ticket and doesn't cause regression wrt the few tests in the ghc-events package, it's already a very useful fix, especially given its size. I will keep this fix in mind when triaging ghc-events and ThreadScope issues.

This revision is now accepted and ready to land.Dec 27 2014, 11:25 AM
trofi accepted this revision.Dec 28 2014, 3:50 AM
trofi edited edge metadata.
austin accepted this revision.Jan 15 2015, 1:59 PM
austin edited edge metadata.

LGTM.

This revision was automatically updated to reflect the committed changes.