mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 990807 - Valgrind detects leak - 4 bytes and/or 32 bytes are definitely lost (direct), r=dougc
This commit is contained in:
parent
f45c8b3b74
commit
021b5a9222
@ -760,6 +760,10 @@ struct AssemblerBufferWithConstantPool : public AssemblerBuffer<SliceSize, Inst>
|
||||
IonSpew(IonSpew_Pools, "[%d]***Offset was still out of range!***", id, codeOffset - magicAlign);
|
||||
IonSpew(IonSpew_Pools, "[%d] Too complicated; bailingp", id);
|
||||
this->fail_bail();
|
||||
// only free up to the current offset
|
||||
for (int pi = poolIdx; pi < numPoolKinds; pi++)
|
||||
delete[] outcastEntries[pi];
|
||||
delete[] preservedEntries;
|
||||
return;
|
||||
} else {
|
||||
preservedEntries[idx] = true;
|
||||
@ -783,12 +787,15 @@ struct AssemblerBufferWithConstantPool : public AssemblerBuffer<SliceSize, Inst>
|
||||
}
|
||||
poolOffset += p->numEntries * p->immSize;
|
||||
delete[] preservedEntries;
|
||||
preservedEntries = nullptr;
|
||||
}
|
||||
// bind the current pool to the perforation point.
|
||||
Pool **tmp = &perforatedNode->data;
|
||||
*tmp = static_cast<Pool*>(this->LifoAlloc_.alloc(sizeof(Pool) * numPoolKinds));
|
||||
if (tmp == nullptr) {
|
||||
this->fail_oom();
|
||||
for (int pi = 0; pi < numPoolKinds; pi++)
|
||||
delete[] outcastEntries[pi];
|
||||
return;
|
||||
}
|
||||
// The above operations may have changed the size of pools!
|
||||
@ -804,6 +811,8 @@ struct AssemblerBufferWithConstantPool : public AssemblerBuffer<SliceSize, Inst>
|
||||
for (int poolIdx = 0; poolIdx < numPoolKinds; poolIdx++) {
|
||||
if (!pools[poolIdx].reset(this->LifoAlloc_)) {
|
||||
this->fail_oom();
|
||||
for (int pi = 0; pi < numPoolKinds; pi++)
|
||||
delete[] outcastEntries[pi];
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user