[compiler-rt] Make interceptors fail earlier (PR #171295)

Thurston Dang via llvm-commits llvm-commits at lists.llvm.org
Tue Dec 9 10:27:39 PST 2025


https://github.com/thurstond commented:

https://github.com/llvm/llvm-project/pull/169775 had a better pull request title (it mentions mmap-munmap, which is the focus of this change)

Same overall question: Is the error-reporting necessary? If ASan can't honor a fixed memory mapping for whatever reason, it suffices to return `MAP_FAILED` (this is what HWASan's interceptor does); the shadow is an implementation detail that the user doesn't need to know about.

To elaborate: a sanitizer report usually means the sanitizer found a bug in the user's code. But if the mmap interceptor fails here because the user tried to map over the shadow, that's not really a bug in the user's code. It's bad luck, or arguably a bug in the sanitizer.


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


More information about the llvm-commits mailing list