[compiler-rt] [win/asan] Improve SharedReAlloc with HEAP_REALLOC_IN_PLACE_ONLY. (PR #132558)

via llvm-commits llvm-commits at lists.llvm.org
Sat Jul 26 07:52:53 PDT 2025


bernhardu wrote:

Sorry for the delay.
This last push takes a step back and does no longer touch the core allocator.

The main motivation for this pull request is to avoid to return a different pointer while IN_PLACE is requested.
This achieves this patch by simply returning the same pointer or null on failure, but in both cases it does not
modifiy the original allocation.
Therefore applications which rely on the address of the allocation not changing no longer get a heap-use-after-free.
But it won't therefore not catch accesses to the "freed" part of a shrunk allocation.

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


More information about the llvm-commits mailing list