[llvm-dev] Issue combining SanitizerCoverage with LTO
Roman Lebedev via llvm-dev
llvm-dev at lists.llvm.org
Tue Dec 3 14:01:44 PST 2019
I believe i have reported a related issue in
https://bugs.llvm.org/show_bug.cgi?id=41734
"-fsanitize-coverage=inline-8bit-counters + ThinLTO = lld crash"
On Wed, Dec 4, 2019 at 12:56 AM Eli Friedman via llvm-dev
<llvm-dev at lists.llvm.org> wrote:
>
> An issue was reported to me that involved using “-fsanitize-coverage=trace-pc-guard -flto=thin”.
>
>
>
> Currently, what seems to happen is that the sancov instrumentation gets inserted at compile-time, then at LTO-time some instrumented functions get erased. The associated sancov globals don’t get erased, though. The end result is that some sancov globals have null MD_associated metadata, and the linker prints an error like “incompatible section flags for __sancov_guards”. This seems to happen for any program where a function is erased at link time. For example, the following program:
>
>
>
> void testfn(){}
>
> __attribute((visibility("hidden"))) void testfn2(){}
>
>
>
> I’m not sure how __sancov_guards is supposed to work in this context. Is LTO misbehaving, or is SanitizerCoverage making bad assumptions?
>
>
>
> -Eli
Roman
> _______________________________________________
> LLVM Developers mailing list
> llvm-dev at lists.llvm.org
> https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev
More information about the llvm-dev
mailing list