Commit bcd34451 authored by Moritz Angermann's avatar Moritz Angermann Committed by Ben Gamari
Browse files

Do not segfault if no common root can be found

When trying to profile a plugin, ghc mysteriously segfaulted.  Upon
closer examination the segfault happend due to a `->prevStack` lookup
on a NULL pointer.

A new CostCentre: Unknown is introduced that is set, if ccsapp and
ccsfn are of equal depth (e.g. 0), and do not have a common CostCentre
in their stacks.

Reviewers: bgamari, simonmar, austin, erikd

Reviewed By: simonmar

Subscribers: Phyx, thomie

Differential Revision:
parent 7b060e12
......@@ -1399,6 +1399,11 @@ static SymbolAddr* lookupSymbol_ (SymbolName* lbl)
errorBelch("Could not on-demand load symbol '%s'\n", lbl);
return NULL;
// collect any new cost centres & CCSs
// that were defined during runInit
return val;
Supports Markdown
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