[commit: ghc] ghc-7.10: Trac #9384: fix increasing capabilites number for eventlog. (87697aa)
git at git.haskell.org
git at git.haskell.org
Mon Jan 19 13:58:23 UTC 2015
Repository : ssh://git@git.haskell.org/ghc
On branch : ghc-7.10
Link : http://ghc.haskell.org/trac/ghc/changeset/87697aadda4b5a11c23c48f7e5f011b6daf9e470/ghc
>---------------------------------------------------------------
commit 87697aadda4b5a11c23c48f7e5f011b6daf9e470
Author: Alexander Vershilov <alexander.vershilov at gmail.com>
Date: Sun Jan 18 10:58:57 2015 +0000
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: https://phabricator.haskell.org/D592
GHC Trac Issues: #9384
(cherry picked from commit 2edb4a7bd5b892ddfac75d0b549d6682a0be5c02)
>---------------------------------------------------------------
87697aadda4b5a11c23c48f7e5f011b6daf9e470
rts/eventlog/EventLog.c | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/rts/eventlog/EventLog.c b/rts/eventlog/EventLog.c
index ef96f3c..f830ec1 100644
--- a/rts/eventlog/EventLog.c
+++ b/rts/eventlog/EventLog.c
@@ -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) {
+ postBlockMarker(&capEventBuf[c]);
+ }
+ }
+
}
More information about the ghc-commits
mailing list