[compiler-rt] [win/asan] Don't intercept memset etc. in ntdll (PR #120397)

Hans Wennborg via llvm-commits llvm-commits at lists.llvm.org
Wed Dec 18 07:15:57 PST 2024


zmodem wrote:

> My initial impression was that there are programs that use `ntdll` as their sole C runtime and thus would lose significant coverage by omitting these functions as candidates for interception.

Are such programs common, and do they avoid the regular CRT for size or other reasons? And do we know if they use ASan?

I think it would be fair to say that ASan only supports programs using the regular CRT (https://learn.microsoft.com/en-us/cpp/sanitizers/asan-building?view=msvc-170#fsanitizeaddress-compiler-option _kind of_ says so already: "The code produced with this option works with static and dynamic CRTs (for example, /MD, /MDd, /MT, and /MTd).")

If we can make that assumption, I think we should intercept ntdll as little as possible, and then I think my patch is preferable.

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


More information about the llvm-commits mailing list