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

via llvm-commits llvm-commits at lists.llvm.org
Thu May 29 06:02:46 PDT 2025


bernhardu wrote:

> I'm kind of nervous that this patch now involves changes to the core ASan allocator. Indeed, it breaks Linux tests: ...

> "partially freed" (as opposed to "freed") is an unnecessary and potentially confusing distinction IMO. The stack trace will already show it is from realloc.

I added this "partially" because the lower part of the chunk is still valid, it is just the upper part which got "freed".
In the current push I removed this "partially", but there is still a change to asan_allocator to be able to store and retrieve the "freed" stack, while the chunk is not really/completely freed.
And this seems to fail in linux as there is a freed stack returned because I disabled the check, while it should not.

Thanks for looking into it, I fear a chunk which is allocated and "freed" is not fitting the asan_allocator, maybe splitting the chunk into an allocated and into a freed one would be possible ...

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


More information about the llvm-commits mailing list