[compiler-rt] [llvm] [sanitizer_common] Add experimental flag to tweak dlopen(<main program>) (PR #71715)
Vitaly Buka via llvm-commits
llvm-commits at lists.llvm.org
Thu Nov 9 10:54:25 PST 2023
================
@@ -6307,7 +6308,36 @@ INTERCEPTOR(int, fclose, __sanitizer_FILE *fp) {
INTERCEPTOR(void*, dlopen, const char *filename, int flag) {
void *ctx;
COMMON_INTERCEPTOR_ENTER_NOIGNORE(ctx, dlopen, filename, flag);
- if (filename) COMMON_INTERCEPTOR_READ_STRING(ctx, filename, 0);
+
+ if (filename) {
+ COMMON_INTERCEPTOR_READ_STRING(ctx, filename, 0);
+
+# if !SANITIZER_DYNAMIC
----------------
vitalybuka wrote:
`if constexpr (!SANITIZER_DYNAMIC)` may work
https://github.com/llvm/llvm-project/pull/71715
More information about the llvm-commits
mailing list