mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-02-21 21:29:41 +00:00
[sancov] Fix unspecified constructor order between sancov and asan.
Sanitizer coverage constructor must run after asan constructor (for each DSO). Bump constructor priority to guarantee that. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@227195 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
145de00800
commit
0b2455c374
@ -59,7 +59,7 @@ static const char *const kSanCovIndirCallName = "__sanitizer_cov_indir_call16";
|
||||
static const char *const kSanCovTraceEnter = "__sanitizer_cov_trace_func_enter";
|
||||
static const char *const kSanCovTraceBB = "__sanitizer_cov_trace_basic_block";
|
||||
static const char *const kSanCovModuleCtorName = "sancov.module_ctor";
|
||||
static const uint64_t kSanCtorAndDtorPriority = 1;
|
||||
static const uint64_t kSanCtorAndDtorPriority = 2;
|
||||
|
||||
static cl::opt<int> ClCoverageLevel("sanitizer-coverage-level",
|
||||
cl::desc("Sanitizer Coverage. 0: none, 1: entry block, 2: all blocks, "
|
||||
|
@ -29,6 +29,10 @@ entry:
|
||||
ret void
|
||||
}
|
||||
|
||||
; CHECK0-NOT: @llvm.global_ctors = {{.*}}{ i32 2, void ()* @sancov.module_ctor }
|
||||
; CHECK1: @llvm.global_ctors = {{.*}}{ i32 2, void ()* @sancov.module_ctor }
|
||||
; CHECK2: @llvm.global_ctors = {{.*}}{ i32 2, void ()* @sancov.module_ctor }
|
||||
|
||||
; CHECK0-NOT: call void @__sanitizer_cov(
|
||||
; CHECK0-NOT: call void @__sanitizer_cov_module_init(
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user