[compiler-rt] [compiler-rt][msan] Ignore addrinfo padding in getaddrinfo interceptor (PR #219124)
Jeewoong Kim via llvm-commits
llvm-commits at lists.llvm.org
Wed Sep 30 17:46:13 PDT 2026
================
@@ -2971,8 +2971,30 @@ INTERCEPTOR(int, getaddrinfo, char *node, char *service,
if (node) COMMON_INTERCEPTOR_READ_RANGE(ctx, node, internal_strlen(node) + 1);
if (service)
COMMON_INTERCEPTOR_READ_RANGE(ctx, service, internal_strlen(service) + 1);
- if (hints)
- COMMON_INTERCEPTOR_READ_RANGE(ctx, hints, sizeof(__sanitizer_addrinfo));
+ if (hints) {
----------------
JeewoongKim wrote:
no, I couldn't find a pre-existing `getaddrinfo` test under compiler-rt/test/sanitizer_common.
There are existing tests under compiler-rt/test/msan/ (getaddrinfo.cpp and getaddrinfo-positive.cpp), but neither covers the case where all `addrinfo` members are initialized while only the padding remains uninitialized.
https://github.com/llvm/llvm-project/pull/219124
More information about the llvm-commits
mailing list