mirror of
https://github.com/Ed94/Odin.git
synced 2026-08-06 15:48:51 +00:00
Disable usage of AddressSanitizer (pt. 2)
This commit is contained in:
@@ -2448,8 +2448,8 @@ compat_allocator_proc :: proc(allocator_data: rawptr, mode: Allocator_Mode,
|
|||||||
@(no_sanitize_address)
|
@(no_sanitize_address)
|
||||||
get_unpoisoned_header :: #force_inline proc(ptr: rawptr) -> Header {
|
get_unpoisoned_header :: #force_inline proc(ptr: rawptr) -> Header {
|
||||||
header := ([^]Header)(ptr)[-1]
|
header := ([^]Header)(ptr)[-1]
|
||||||
a := max(header.alignment, size_of(Header))
|
// a := max(header.alignment, size_of(Header))
|
||||||
sanitizer.address_unpoison(rawptr(uintptr(ptr)-uintptr(a)), a)
|
// sanitizer.address_unpoison(rawptr(uintptr(ptr)-uintptr(a)), a)
|
||||||
return header
|
return header
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -2468,7 +2468,7 @@ compat_allocator_proc :: proc(allocator_data: rawptr, mode: Allocator_Mode,
|
|||||||
alignment = alignment,
|
alignment = alignment,
|
||||||
}
|
}
|
||||||
|
|
||||||
sanitizer.address_poison(raw_data(allocation), a)
|
// sanitizer.address_poison(raw_data(allocation), a)
|
||||||
return
|
return
|
||||||
|
|
||||||
case .Free:
|
case .Free:
|
||||||
@@ -2499,7 +2499,7 @@ compat_allocator_proc :: proc(allocator_data: rawptr, mode: Allocator_Mode,
|
|||||||
alignment = new_alignment,
|
alignment = new_alignment,
|
||||||
}
|
}
|
||||||
|
|
||||||
sanitizer.address_poison(raw_data(allocation), a)
|
// sanitizer.address_poison(raw_data(allocation), a)
|
||||||
return
|
return
|
||||||
|
|
||||||
case .Free_All:
|
case .Free_All:
|
||||||
|
|||||||
Reference in New Issue
Block a user