mirror of
https://github.com/c3lang/c3c.git
synced 2026-02-27 12:01:16 +00:00
Temp allocator overwrites data when doing reset on extra allocated pages. #1462
This commit is contained in:
@@ -68,6 +68,7 @@ fn void TempAllocator.reset(&self, usz mark) @dynamic
|
||||
TempAllocatorPage *last_page = self.last_page;
|
||||
while (last_page && last_page.mark > mark)
|
||||
{
|
||||
self.used = last_page.mark;
|
||||
TempAllocatorPage *to_free = last_page;
|
||||
last_page = last_page.prev_page;
|
||||
self._free_page(to_free)!!;
|
||||
|
||||
Reference in New Issue
Block a user