[compiler-rt] [llvm] [sanitizer_common] Add experimental flag to tweak dlopen(<main program>) (PR #71715)
Thurston Dang via llvm-commits
llvm-commits at lists.llvm.org
Thu Nov 9 11:04:31 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
----------------
thurstond wrote:
```
error: use of undeclared identifier 'SANITIZER_DYNAMIC'
if constexpr (!SANITIZER_DYNAMIC) {
^
1 error generated.
```
(It's usually not defined at all.)
https://github.com/llvm/llvm-project/pull/71715
More information about the llvm-commits
mailing list