[compiler-rt] [sanitizer_common] Add experimental flag to tweak dlopen(<main program>) (PR #71715)

Kirill Stoimenov via llvm-commits llvm-commits at lists.llvm.org
Wed Nov 8 10:35:03 PST 2023


================
@@ -6304,10 +6304,38 @@ INTERCEPTOR(int, fclose, __sanitizer_FILE *fp) {
 #endif
 
 #if SANITIZER_INTERCEPT_DLOPEN_DLCLOSE
+// Returns 1 if key is a suffix of str, 0 otherwise
+static int internal_strcmp_suffix(const char *key, const char *str) {
----------------
kstoimenov wrote:

One confusing part for this implementation is that it has the opposite return value convention of strcmp. Maybe rename to internal_is_suffix? Also key can be renamed to suffix. 

https://github.com/llvm/llvm-project/pull/71715


More information about the llvm-commits mailing list