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

via llvm-commits llvm-commits at lists.llvm.org
Mon Nov 4 05:30:21 PST 2024


================
@@ -142,6 +142,26 @@ __declspec(noinline) void *_recalloc_base(void *p, size_t n, size_t elem_size) {
   return _recalloc(p, n, elem_size);
 }
 
+__declspec(noinline) void *_aligned_malloc(size_t alignment, size_t size) {
----------------
zmodem wrote:

Also, we need to actually intercept the system functions by adding these to `ReplaceSystemMalloc()`.

We should also remove the

```
// TODO(timurrrr): Might want to add support for _aligned_* allocation
// functions to detect a bit more bugs.  Those functions seem to wrap malloc().
```

comment now :-)

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


More information about the llvm-commits mailing list