Commit 2edb4a7b authored by Alexander Vershilov's avatar Alexander Vershilov Committed by Sergei Trofimovich

Trac #9384: fix increasing capabilites number for eventlog.

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 #9384). This commit
fixes this issue by inserting required header when number
of capabilies grows.

Reviewers: simonmar, Mikolaj, trofi, austin

Reviewed By: Mikolaj, trofi, austin

Subscribers: carter, thomie

Differential Revision:

GHC Trac Issues: #9384
parent 11881ec6
......@@ -500,6 +500,15 @@ moreCapEventBufs (nat from, nat to)
for (c = from; c < to; ++c) {
initEventsBuf(&capEventBuf[c], EVENT_LOG_SIZE, c);
// The from == 0 already covered in initEventLogging, so we are interested
// only in case when we are increasing capabilities number
if (from > 0) {
for (c = from; c < to; ++c) {
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment