[libcxx-commits] [libcxx] [llvm] [libcxx] Remove ASan container overflow checks for SSO strings (PR #194208)
Aiden Grossman via libcxx-commits
libcxx-commits at lists.llvm.org
Tue Apr 28 22:56:18 PDT 2026
boomanaiden154 wrote:
> There is always condition like this in original code:
The GlobalOpt case I looked at that was caused by the JTS enablement was not of this form, and there was no guarantee the pointer taken into the function that was being speculatively loaded was a stack allocation (as far as I could tell).
> I think it's reasonable to suppress those optimizations with Asan if we hit them.
This still seems like the wrong approach to me. We’re still playing whack-a-mole with optimizations if we do this, and it’s still fundamentally unsound, even if it happens to work in practice, which is a situation I would rather avoid.
If we really want to detect OOB memory accesses for short strings under asan, we should probably just have an option that forces the string buffer to be out of line.
https://github.com/llvm/llvm-project/pull/194208
More information about the libcxx-commits
mailing list