From 450e6917b2fc87dc2d719aad4b94e4b3583a1614 Mon Sep 17 00:00:00 2001 From: jakubtomsu <66876057+jakubtomsu@users.noreply.github.com> Date: Wed, 6 May 2026 20:57:19 +0200 Subject: [PATCH] use context.assertion_failure_proc in tracking allocator bad free callback --- core/mem/tracking_allocator.odin | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/core/mem/tracking_allocator.odin b/core/mem/tracking_allocator.odin index 01080075e..d6462faf1 100644 --- a/core/mem/tracking_allocator.odin +++ b/core/mem/tracking_allocator.odin @@ -130,11 +130,11 @@ the tracking allocator to the old behavior, where the bad_free_array was used. */ @(no_sanitize_address) tracking_allocator_bad_free_callback_panic :: proc(t: ^Tracking_Allocator, memory: rawptr, location: runtime.Source_Code_Location) { - runtime.print_caller_location(location) - runtime.print_string(" Tracking allocator error: Bad free of pointer ") - runtime.print_uintptr(uintptr(memory)) - runtime.print_string("\n") - runtime.trap() + buf: [256]byte + offset := 0 + _ = runtime.write_string(&offset, buf[:], "Tracking allocator error: Bad free of pointer ") + _ = runtime.write_u64(&offset, buf[:], u64(uintptr(memory))) + panic(string(buf[:offset]), loc = location) } /*