[compiler-rt] [sanitizer] Disable writes to log files for binaries in a secure context. (PR #92593)

Florian Mayer via llvm-commits llvm-commits at lists.llvm.org
Fri May 17 16:47:44 PDT 2024


================
@@ -104,6 +105,17 @@ void ReportFile::SetReportPath(const char *path) {
     }
   }
 
+  // This is so we can use the weak definition from sanitizer_getauxval.h
+  if (&getauxval && getauxval(/* AT_SECURE */ 23) != 0 && path &&
----------------
fmayer wrote:

I think you need to implement what needs the `getauxval` (e.g. `IsAT_SECURE()`) in `sanitizer_libcdep.cpp` (with a stub for non-linux platforms), and put a stub (that returns `false`) into `sanitizer_common_nolibc.cpp`)

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


More information about the llvm-commits mailing list