Temp allocator overwrites data when doing reset on extra allocated pages. #1462

This commit is contained in:
Christoffer Lerno
2024-09-19 20:50:14 +02:00
parent 9f51bfcc10
commit 41156cc45d
2 changed files with 2 additions and 0 deletions

View File

@@ -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)!!;

View File

@@ -36,6 +36,7 @@
- Crash invoking a `@body` argument with the wrong number of parameters.
- Fix reordering semantics in struct assignment.
- Regression when passing types as `#expr` arguments. #1461
- Temp allocator overwrites data when doing reset on extra allocated pages. #1462
### Stdlib changes
- Additional init functions for hashmap.