Skip to content

ASan run twice under fat lto #159629

@PiJoules

Description

@PiJoules

Clang gives the following warning when compiling with ASan and fat LTO:

$ ~/llvm-projects/llvm-project-build-1/bin/clang++ -flto -ffat-lto-objects -c -fsanitize=address  /tmp/test.cc
warning: Redundant instrumentation detected, with module flag: nosanitize_address [-Wbackend-plugin]
1 warning generated.

The warning indicates the pass is being run twice, perhaps one for the LTO'd bitcode and another for the normal IR that would be codegen'd. The warning doesn't appear if -ffat-lto-objects is omitted.

Functionally this doesn't affect ASan instrumentation since the pass will exit early if the module was already instrumented, but I wonder if perhaps this would affect other passes which don't do redundant checks.

Metadata

Metadata

Assignees

Labels

LTOLink time optimization (regular/full LTO or ThinLTO)compiler-rt:asanAddress sanitizer

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions