[msan] Don't intercept LFS prlimit64/getrlimit64 on musl
authorSam James <sam@gentoo.org>
Sun, 21 May 2023 01:06:14 +0000 (02:06 +0100)
committerSam James <sam@gentoo.org>
Sun, 21 May 2023 01:06:28 +0000 (02:06 +0100)
commitb297fd7974b282b66605547c7adb2eadbf82214f
tree953e4ca947e8524eb33afc6bb91b14939720d68e
parent83e23d25365e140561c71f0a8876f6d39a1a3339
[msan] Don't intercept LFS prlimit64/getrlimit64 on musl

These are aliases on musl and as of 1.2.4, aren't visible by default
(only with -D_LARGEFILE64_SOURCE), and will be removed entirely in a future
release.

This fixes a runtime failure with msan on musl-1.2.4:
```
$ echo 'int main(){}' | clang -x c - -fsanitize=memory -o /dev/null
/usr/bin/x86_64-gentoo-linux-musl-ld.bfd: /usr/lib/llvm/16/bin/../../../../lib/clang/16/lib/linux/libclang_rt.msan-x86_64.a(msan_interceptors.cpp.o): in function `__interceptor_getrlimit64':
[...]
```

Bug: https://bugs.gentoo.org/906603

Reviewed By: MaskRay

Differential Revision: https://reviews.llvm.org/D150925
compiler-rt/lib/msan/msan_interceptors.cpp