From: Daniel Thornburgh Date: Tue, 18 Jul 2023 21:51:10 +0000 (-0700) Subject: [sanitizer-common] Run module msan init before early sigaction test X-Git-Tag: upstream/17.0.6~1113 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=ee252767663c2b22d7806d20a402728286b8e702;p=platform%2Fupstream%2Fllvm.git [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 --- 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 #include -__attribute__((constructor(0))) void ctor() { +__attribute__((constructor(1))) void ctor() { fprintf(stderr, "INIT\n"); struct sigaction old; assert(!sigaction(SIGSEGV, nullptr, &old));