[compiler-rt] [compiler-rt][asan] _aligned_malloc/_aligned_free interception. (PR #82049)

Charlie Barto via llvm-commits llvm-commits at lists.llvm.org
Wed Nov 13 11:01:36 PST 2024


barcharcraz wrote:

Note that I can no longer speak for the asan team at Microsoft, I've moved to a different team. Still, I'm across the hall from them and I'll review things if I have time.

This looks pretty good. We have an implementation of this internally. There should probably be tests of the following:

However, I think things will probably fall apart in programs that use the `_aligned_offset_*` family of functions. These are freed with `_aligned_free` but the pointer passed in _IS NOT ALIGNED_

_aligned_free. Verify behavior is similar between real aligned_free and intercepted w.r.t. stuff allocated with normal malloc
the _dbg variants (these are implemented in terms of the non-debug versions, I think).



https://github.com/llvm/llvm-project/pull/82049


More information about the llvm-commits mailing list