[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
Mon May 20 09:54:19 PDT 2024
================
@@ -1071,6 +1071,16 @@ void InitializePlatformCommonFlags(CommonFlags *cf) {
# endif
}
+# if SANITIZER_LINUX
+bool ShouldTreatRuntimeSecurely() {
+ // So we can use the weak definition from sanitizer_getauxval.h
+ if (&getauxval)
+ return getauxval(/* AT_SECURE */ 23) != 0;
+ else
----------------
fmayer wrote:
nit: get rid of the else (https://llvm.org/docs/CodingStandards.html#don-t-use-else-after-a-return)
https://github.com/llvm/llvm-project/pull/92593
More information about the llvm-commits
mailing list