mirror of
https://github.com/corda/corda.git
synced 2025-03-17 17:45:17 +00:00
update Context::executableSize after allocating objectPool
This ensures that, if an exception is thrown later but before the method has been fully compiled, we will know exactly how much memory to free. Previously, we would abort when trying to free the wrong amount due to an assertion failure.
This commit is contained in:
parent
8c1419fb89
commit
49d8ccb1bd
@ -7307,6 +7307,9 @@ finish(MyThread* t, FixedAllocator* allocator, Context* context)
|
||||
FixedSizeOfArray + ((context->objectPoolCount + 1) * BytesPerWord),
|
||||
true);
|
||||
|
||||
context->executableSize = (allocator->base + allocator->offset)
|
||||
- static_cast<uint8_t*>(context->executableStart);
|
||||
|
||||
initArray(t, pool, context->objectPoolCount + 1);
|
||||
mark(t, pool, 0);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user