diff options
author | Daniel Thornburgh <dthorn@google.com> | 2023-07-18 14:51:10 -0700 |
---|---|---|
committer | Daniel Thornburgh <dthorn@google.com> | 2023-07-19 10:59:05 -0700 |
commit | ee252767663c2b22d7806d20a402728286b8e702 (patch) | |
tree | 818a8f22599d7ad0fb1877d8137a1f209a5818c0 /compiler-rt | |
parent | 310a9a4f2881de25101be121fdea114d20e6dc5b (diff) | |
download | llvm-ee252767663c2b22d7806d20a402728286b8e702.zip llvm-ee252767663c2b22d7806d20a402728286b8e702.tar.gz llvm-ee252767663c2b22d7806d20a402728286b8e702.tar.bz2 |
[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
Diffstat (limited to 'compiler-rt')
-rw-r--r-- | compiler-rt/test/ubsan/TestCases/Misc/Linux/sigaction.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/compiler-rt/test/ubsan/TestCases/Misc/Linux/sigaction.cpp b/compiler-rt/test/ubsan/TestCases/Misc/Linux/sigaction.cpp index db17b5d..0ab65bd 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)); |