[compiler-rt] ee25276 - [sanitizer-common] Run module msan init before early sigaction test
Daniel Thornburgh via llvm-commits
llvm-commits at lists.llvm.org
Wed Jul 19 10:59:11 PDT 2023
Author: Daniel Thornburgh
Date: 2023-07-19T10:59:05-07:00
New Revision: ee252767663c2b22d7806d20a402728286b8e702
URL: https://github.com/llvm/llvm-project/commit/ee252767663c2b22d7806d20a402728286b8e702
DIFF: https://github.com/llvm/llvm-project/commit/ee252767663c2b22d7806d20a402728286b8e702.diff
LOG: [sanitizer-common] Run module msan init before early sigaction test
MSAN wrappers can be inserted for e.g. the access to stderr in the
constructor of the test, which can segfault if the constructor function
runs before these data structures have been initialized.
Reviewed By: dvyukov
Differential Revision: https://reviews.llvm.org/D155648
Added:
Modified:
compiler-rt/test/ubsan/TestCases/Misc/Linux/sigaction.cpp
Removed:
################################################################################
diff --git a/compiler-rt/test/ubsan/TestCases/Misc/Linux/sigaction.cpp b/compiler-rt/test/ubsan/TestCases/Misc/Linux/sigaction.cpp
index db17b5df7ac669..0ab65bd30d92cc 100644
--- a/compiler-rt/test/ubsan/TestCases/Misc/Linux/sigaction.cpp
+++ b/compiler-rt/test/ubsan/TestCases/Misc/Linux/sigaction.cpp
@@ -11,7 +11,7 @@
#include <signal.h>
#include <stdio.h>
-__attribute__((constructor(0))) void ctor() {
+__attribute__((constructor(1))) void ctor() {
fprintf(stderr, "INIT\n");
struct sigaction old;
assert(!sigaction(SIGSEGV, nullptr, &old));
More information about the llvm-commits
mailing list