Reland '[msan] Intercept dladdr1, and refactor dladdr'
authorThurston Dang <thurston@google.com>
Wed, 5 Jul 2023 20:49:42 +0000 (20:49 +0000)
committerThurston Dang <thurston@google.com>
Thu, 6 Jul 2023 16:16:22 +0000 (16:16 +0000)
commit015dabd7672f936cdb5bdcad20fe80b17f05c9ca
tree761cf4877317dd37016e4733e7237419a0e8d221
parent9df70e4a4d0d8209e1a75551ac7c06ed8fb13250
Reland '[msan] Intercept dladdr1, and refactor dladdr'

Reland with -Wcast-qual issue fixed

Original commit message:
This patch adds an msan interceptor for dladdr1 (with support for RTLD_DL_LINKMAP and RTLD_DL_SYMENT) and an accompanying test. It also adds a helper file, msan_dl.cpp, that contains UnpoisonDllAddrInfo (refactored out of the dladdr interceptor) and UnpoisonDllAddr1ExtraInfo.

Reviewed By: vitalybuka

Differential Revision: https://reviews.llvm.org/D154272
compiler-rt/lib/msan/CMakeLists.txt
compiler-rt/lib/msan/msan_dl.cpp [new file with mode: 0644]
compiler-rt/lib/msan/msan_dl.h [new file with mode: 0644]
compiler-rt/lib/msan/msan_interceptors.cpp
compiler-rt/test/msan/dladdr1_test.c [new file with mode: 0644]