mirror of
https://github.com/Ed94/Odin.git
synced 2026-08-06 07:38:48 +00:00
mem: Don't unpoison the header of a Stack allocation
This commit is contained in:
@@ -921,7 +921,7 @@ This procedure allocates `size` bytes of memory, aligned to the boundary
|
|||||||
specified by `alignment`. The allocated memory is not explicitly
|
specified by `alignment`. The allocated memory is not explicitly
|
||||||
zero-initialized. This procedure returns the slice of the allocated memory.
|
zero-initialized. This procedure returns the slice of the allocated memory.
|
||||||
*/
|
*/
|
||||||
@(require_results)
|
@(require_results, no_sanitize_address)
|
||||||
stack_alloc_bytes_non_zeroed :: proc(
|
stack_alloc_bytes_non_zeroed :: proc(
|
||||||
s: ^Stack,
|
s: ^Stack,
|
||||||
size: int,
|
size: int,
|
||||||
@@ -945,7 +945,6 @@ stack_alloc_bytes_non_zeroed :: proc(
|
|||||||
s.curr_offset += padding
|
s.curr_offset += padding
|
||||||
next_addr := curr_addr + uintptr(padding)
|
next_addr := curr_addr + uintptr(padding)
|
||||||
header := (^Stack_Allocation_Header)(next_addr - size_of(Stack_Allocation_Header))
|
header := (^Stack_Allocation_Header)(next_addr - size_of(Stack_Allocation_Header))
|
||||||
sanitizer.address_unpoison(header)
|
|
||||||
header.padding = padding
|
header.padding = padding
|
||||||
header.prev_offset = old_offset
|
header.prev_offset = old_offset
|
||||||
s.curr_offset += size
|
s.curr_offset += size
|
||||||
|
|||||||
Reference in New Issue
Block a user