handle case of null Stack::pushEvent in CallEvent ctor

This commit is contained in:
Joel Dice 2008-09-30 11:22:46 -06:00
parent 89cc5aa546
commit df75153a85

View File

@ -1363,6 +1363,9 @@ codePromise(Context* c, int offset)
return new (c->zone->allocate(sizeof(CodePromise))) CodePromise(c, offset); return new (c->zone->allocate(sizeof(CodePromise))) CodePromise(c, offset);
} }
void
appendPush(Context* c, Stack* s);
class CallEvent: public Event { class CallEvent: public Event {
public: public:
CallEvent(Context* c, Value* address, unsigned flags, CallEvent(Context* c, Value* address, unsigned flags,
@ -1399,6 +1402,9 @@ class CallEvent: public Event {
(c, 0, ~0, (static_cast<uint64_t>(mask) << 32) | mask)); (c, 0, ~0, (static_cast<uint64_t>(mask) << 32) | mask));
for (Stack* s = stack; s; s = s->next) { for (Stack* s = stack; s; s = s->next) {
if (s->pushEvent == 0) {
appendPush(c, s);
}
s->pushEvent->active = true; s->pushEvent->active = true;
addRead(c, s->value, s->size * BytesPerWord, virtualSite addRead(c, s->value, s->size * BytesPerWord, virtualSite
(c, 0, ~0, (static_cast<uint64_t>(mask) << 32) | mask)); (c, 0, ~0, (static_cast<uint64_t>(mask) << 32) | mask));