Commit Graph
3 Commits
Author SHA1 Message Date
Lucas Perlind 7502e7f2bc make asan procs contextless 2025-04-24 19:56:40 +10:00
Lucas Perlind 4a0be1f3a8 make vet happy 2025-04-24 16:02:31 +10:00
Lucas Perlind ab0b26e876 Add more asan support to the odin runtime and begin sanitizing
allocators

This adds various bindings to the asan runtime which can be used
to poison/unpoison memory handed out by various allocators. This
means we can catch use after free memory bugs when using operations
such as free_all during runtime.

Asan poisoning are added for the follow allocators in mem:
Arena (including temporary arenas)
Scratch
Stack
Small_Stack

Additionally a bug in the stack allocator was fixed to disallow freeing
in the middle of the stack (caught by the asan!).

I plan on adding support for all the allocators in core. This is just
a good starting point and were some of the easiest ones to implement
asan for.
2025-04-24 15:17:51 +10:00