Skip to content

Commit

Permalink
Temp allocator overwrites data when doing reset on extra allocated pa…
Browse files Browse the repository at this point in the history
…ges. #1462
  • Loading branch information
lerno committed Sep 19, 2024
1 parent 9f51bfc commit 41156cc
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions lib/std/core/allocators/temp_allocator.c3
Original file line number Diff line number Diff line change
Expand Up @@ -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)!!;
Expand Down
1 change: 1 addition & 0 deletions releasenotes.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down

0 comments on commit 41156cc

Please sign in to comment.