Files
Odin/base/runtime
KBS e62ed261c5 base/runtime: do not free the original block on a failed heap resize
`base/runtime`: do not free the original block on a failed heap resize

The default heap allocator freed old_ptr when the underlying allocation
failed (allocated_mem == nil). On the realloc path (heap_resize) the original
block is left intact on failure, and on the copy/fresh path old_ptr has not
been copied or freed yet, so freeing it left the caller holding a dangling
pointer. A [dynamic] array whose resize failed therefore double-freed its
data on the next delete (reported as free(): invalid pointer / use-after-free).

Return .Out_Of_Memory without freeing anything; the caller retains ownership
of the original block.

Fixes #7262
2026-08-16 12:54:16 +02:00
..
2026-08-11 15:30:00 +03:00
2025-07-31 16:40:40 +02:00
2026-01-28 11:54:17 +00:00
2026-08-05 20:43:50 -07:00
2025-08-08 13:29:49 +01:00
2024-06-05 20:57:39 +02:00
2026-08-05 19:02:35 +02:00
2026-05-02 15:06:01 +01:00
2025-11-05 13:44:14 +00:00