llvm-project
78c5d680 - [asan] Add size/alignment checks for free_[aligned_]sized (#189216)

Commit
166 days ago
[asan] Add size/alignment checks for free_[aligned_]sized (#189216) Historically, alignment and size weren't taken into account when freeing allocations since `free` just takes a pointer. With `free_sized` and `free_aligned_sized`, we can do these size and alignment checks in asan now. This adds a new report type specifically for these functions. Checking is hidden behind a new env flag `free_size_mismatch` which is enabled by default, but downstream users can opt out of it. The bulk of this PR was generated by gemini but thoroughly reviewed and edited by me to the best of my ability.
Author
Parents
Loading