[llvm] r292862 - [sanitizer-coverage] emit __sanitizer_cov_trace_pc_guard w/o a preceding 'if' by default. Update the docs, also add deprecation notes around other parts of sanitizer coverage

Kostya Serebryany via llvm-commits llvm-commits at lists.llvm.org
Tue Jan 24 13:23:38 PST 2017


On Tue, Jan 24, 2017 at 1:17 PM, Eric Christopher <echristo at gmail.com>
wrote:

>
>
> On Tue, Jan 24, 2017 at 11:49 AM Kostya Serebryany <kcc at google.com> wrote:
>
>> On Tue, Jan 24, 2017 at 11:45 AM, Eric Christopher <echristo at gmail.com>
>> wrote:
>>
>> This seems problematic in general - we have a bot that is failing due to
>> a particular test. Is this patch necessary for correctness somewhere else?
>>
>>
>> Correctness -- no. Performance -- yes, and in some cases very significant.
>>
>
> OK. Thanks.
>
>
>>
>>
>> Can it be reverted until we can figure out what's going on?
>>
>>
>> Sure we can revert it, but who is going to analyze the problem and how
>> soon?
>>
>
> I'm hoping someone at IBM can take a look at it. I've got limited ability
> to debug it myself at the moment.
>
> Kit: Would you mind terribly?
> Kostya: It might be nice to revert in the mean time if you don't mind?
>

I do mind, sorry.
Again, this functionality is not used by anyone on PPC (afaict) but is
important for libFuzzer users on x86 side.


>
> Thanks!
>
> -eric
>
>
>> Note that the functionality tested in this test is not the core asan, but
>> the coverage instrumentation used by libFuzzer,
>> and afaict there are no users of libFuzzer on PPC, so we can just disable
>> the test on PPC and no users will be harmed.
>>
>>
>>
>> -eric
>>
>> On Tue, Jan 24, 2017 at 11:29 AM Kostya Serebryany via llvm-commits <
>> llvm-commits at lists.llvm.org> wrote:
>>
>> Hi Bill,
>>
>> thanks for the report.
>> Unfortunately, I don't have anyone working on the PPC side at the moment
>> and the test passes on x86.
>> So, the only thing I can propose now is to disable this test on PPC.
>> (Maybe it's not that bad, I was going to kill at least some of the
>> related code this year).
>>
>> --kcc
>>
>> On Tue, Jan 24, 2017 at 8:44 AM, Bill Seurer <seurer at linux.vnet.ibm.com>
>> wrote:
>>
>> This broke the powerpc sanitizers.
>>
>> updatellvm 292861
>> ninja
>> ninja check-asan
>> Testing Time: 29.65s
>>   Expected Passes    : 457
>>   Expected Failures  : 1
>>   Unsupported Tests  : 157
>>
>> updatellvm 292862
>> ninja
>> ninja check-asan
>>
>> FAIL: AddressSanitizer-powerpc64le-linux :: TestCases/Posix/coverage-direct.cc
>> (528 of 615)
>> ******************** TEST 'AddressSanitizer-powerpc64le-linux ::
>> TestCases/Posix/coverage-direct.cc' FAILED ********************
>> Script:
>> --
>> /home/seurer/llvm/build/llvm-test2/./bin/clang --driver-mode=g++
>> -fsanitize=address -mno-omit-leaf-frame-pointer -fno-omit-frame-pointer
>> -fno-optimize-sibling-calls -gline-tables-only -m64
>> -fsanitize-coverage=func -DSHARED /home/seurer/llvm/llvm-test2/
>> projects/compiler-rt/test/asan/TestCases/Posix/coverage-direct.cc
>> -shared -o /home/seurer/llvm/build/llvm-test2/projects/compiler-rt/
>> test/asan/POWERPC64LELinuxConfig/TestCases/Posix/Output/lib$(basename
>> /home/seurer/llvm/build/llvm-test2/projects/compiler-rt/test/asan/
>> POWERPC64LELinuxConfig/TestCases/Posix/Output/coverage-direct.cc.tmp).dynamic.so
>> -fPIC
>> /home/seurer/llvm/build/llvm-test2/./bin/clang --driver-mode=g++
>> -fsanitize=address -mno-omit-leaf-frame-pointer -fno-omit-frame-pointer
>> -fno-optimize-sibling-calls -gline-tables-only -m64
>> -fsanitize-coverage=func /home/seurer/llvm/llvm-test2/
>> projects/compiler-rt/test/asan/TestCases/Posix/coverage-direct.cc -ldl
>> -o /home/seurer/llvm/build/llvm-test2/projects/compiler-rt/test/asan/
>> POWERPC64LELinuxConfig/TestCases/Posix/Output/coverage-direct.cc.tmp
>> rm -rf /home/seurer/llvm/build/llvm-test2/projects/compiler-rt/test/asan/
>> POWERPC64LELinuxConfig/TestCases/Posix/Output/coverage-direct
>> mkdir -p /home/seurer/llvm/build/llvm-test2/projects/compiler-rt/
>> test/asan/POWERPC64LELinuxConfig/TestCases/Posix/Output/
>> coverage-direct/normal
>> env ASAN_OPTIONS=coverage=1:coverage_direct=0:coverage_
>> dir=/home/seurer/llvm/build/llvm-test2/projects/compiler-rt/test/asan/
>> POWERPC64LELinuxConfig/TestCases/Posix/Output/coverage-direct/normal:verbosity=1
>>
>> /home/seurer/llvm/build/llvm-test2/projects/compiler-rt/test/asan/
>> POWERPC64LELinuxConfig/TestCases/Posix/Output/coverage-direct.cc.tmp
>> /home/seurer/llvm/build/llvm-test2/projects/compiler-rt/test/asan/
>> POWERPC64LELinuxConfig/TestCases/Posix/Output/lib$(basename
>> /home/seurer/llvm/build/llvm-test2/projects/compiler-rt/test/asan/
>> POWERPC64LELinuxConfig/TestCases/Posix/Output/coverage-direct.cc.tmp).
>> dynamic.so
>> /usr/bin/python2.7 /home/seurer/llvm/llvm-test2/projects/compiler-rt/lib/
>> sanitizer_common/scripts/sancov.py print /home/seurer/llvm/build/llvm-
>> test2/projects/compiler-rt/test/asan/POWERPC64LELinuxConfig/
>> TestCases/Posix/Output/coverage-direct/normal/*.sancov
>> >/home/seurer/llvm/build/llvm-test2/projects/compiler-rt/test/asan/
>> POWERPC64LELinuxConfig/TestCases/Posix/Output/
>> coverage-direct/normal/out.txt
>> mkdir -p /home/seurer/llvm/build/llvm-test2/projects/compiler-rt/
>> test/asan/POWERPC64LELinuxConfig/TestCases/Posix/Output/
>> coverage-direct/direct
>> env ASAN_OPTIONS=coverage=1:coverage_direct=1:coverage_
>> dir=/home/seurer/llvm/build/llvm-test2/projects/compiler-rt/test/asan/
>> POWERPC64LELinuxConfig/TestCases/Posix/Output/coverage-direct/direct:verbosity=1
>>
>> /home/seurer/llvm/build/llvm-test2/projects/compiler-rt/test/asan/
>> POWERPC64LELinuxConfig/TestCases/Posix/Output/coverage-direct.cc.tmp
>> /home/seurer/llvm/build/llvm-test2/projects/compiler-rt/test/asan/
>> POWERPC64LELinuxConfig/TestCases/Posix/Output/lib$(basename
>> /home/seurer/llvm/build/llvm-test2/projects/compiler-rt/test/asan/
>> POWERPC64LELinuxConfig/TestCases/Posix/Output/coverage-direct.cc.tmp).
>> dynamic.so
>> cd /home/seurer/llvm/build/llvm-test2/projects/compiler-rt/test/asan/
>> POWERPC64LELinuxConfig/TestCases/Posix/Output/coverage-direct/direct
>> /usr/bin/python2.7 /home/seurer/llvm/llvm-test2/projects/compiler-rt/lib/
>> sanitizer_common/scripts/sancov.py rawunpack *.sancov.raw
>> /usr/bin/python2.7 /home/seurer/llvm/llvm-test2/projects/compiler-rt/lib/
>> sanitizer_common/scripts/sancov.py print *.sancov >out.txt
>> cd ../..
>> diff -u coverage-direct/normal/out.txt coverage-direct/direct/out.txt
>> /home/seurer/llvm/build/llvm-test2/./bin/clang --driver-mode=g++
>> -fsanitize=address -mno-omit-leaf-frame-pointer -fno-omit-frame-pointer
>> -fno-optimize-sibling-calls -gline-tables-only -m64 -fsanitize-coverage=bb
>> -DSHARED /home/seurer/llvm/llvm-test2/projects/compiler-rt/test/
>> asan/TestCases/Posix/coverage-direct.cc -shared -o
>> /home/seurer/llvm/build/llvm-test2/projects/compiler-rt/test/asan/
>> POWERPC64LELinuxConfig/TestCases/Posix/Output/lib$(basename
>> /home/seurer/llvm/build/llvm-test2/projects/compiler-rt/test/asan/
>> POWERPC64LELinuxConfig/TestCases/Posix/Output/coverage-direct.cc.tmp).dynamic.so
>> -fPIC
>> /home/seurer/llvm/build/llvm-test2/./bin/clang --driver-mode=g++
>> -fsanitize=address -mno-omit-leaf-frame-pointer -fno-omit-frame-pointer
>> -fno-optimize-sibling-calls -gline-tables-only -m64 -fsanitize-coverage=bb
>> -DSO_DIR=\"/home/seurer/llvm/build/llvm-test2/projects/
>> compiler-rt/test/asan/POWERPC64LELinuxConfig/TestCases/Posix/Output\"
>> /home/seurer/llvm/llvm-test2/projects/compiler-rt/test/
>> asan/TestCases/Posix/coverage-direct.cc -ldl -o
>> /home/seurer/llvm/build/llvm-test2/projects/compiler-rt/test/asan/
>> POWERPC64LELinuxConfig/TestCases/Posix/Output/coverage-direct.cc.tmp
>> rm -rf /home/seurer/llvm/build/llvm-test2/projects/compiler-rt/test/asan/
>> POWERPC64LELinuxConfig/TestCases/Posix/Output/coverage-direct
>> mkdir -p /home/seurer/llvm/build/llvm-test2/projects/compiler-rt/
>> test/asan/POWERPC64LELinuxConfig/TestCases/Posix/Output/
>> coverage-direct/normal
>> env ASAN_OPTIONS=coverage=1:coverage_direct=0:coverage_
>> dir=/home/seurer/llvm/build/llvm-test2/projects/compiler-rt/test/asan/
>> POWERPC64LELinuxConfig/TestCases/Posix/Output/coverage-direct/normal:verbosity=1
>>
>> /home/seurer/llvm/build/llvm-test2/projects/compiler-rt/test/asan/
>> POWERPC64LELinuxConfig/TestCases/Posix/Output/coverage-direct.cc.tmp
>> /home/seurer/llvm/build/llvm-test2/projects/compiler-rt/test/asan/
>> POWERPC64LELinuxConfig/TestCases/Posix/Output/lib$(basename
>> /home/seurer/llvm/build/llvm-test2/projects/compiler-rt/test/asan/
>> POWERPC64LELinuxConfig/TestCases/Posix/Output/coverage-direct.cc.tmp).
>> dynamic.so
>> /usr/bin/python2.7 /home/seurer/llvm/llvm-test2/projects/compiler-rt/lib/
>> sanitizer_common/scripts/sancov.py print /home/seurer/llvm/build/llvm-
>> test2/projects/compiler-rt/test/asan/POWERPC64LELinuxConfig/
>> TestCases/Posix/Output/coverage-direct/normal/*.sancov
>> >/home/seurer/llvm/build/llvm-test2/projects/compiler-rt/test/asan/
>> POWERPC64LELinuxConfig/TestCases/Posix/Output/
>> coverage-direct/normal/out.txt
>> mkdir -p /home/seurer/llvm/build/llvm-test2/projects/compiler-rt/
>> test/asan/POWERPC64LELinuxConfig/TestCases/Posix/Output/
>> coverage-direct/direct
>> env ASAN_OPTIONS=coverage=1:coverage_direct=1:coverage_
>> dir=/home/seurer/llvm/build/llvm-test2/projects/compiler-rt/test/asan/
>> POWERPC64LELinuxConfig/TestCases/Posix/Output/coverage-direct/direct:verbosity=1
>>
>> /home/seurer/llvm/build/llvm-test2/projects/compiler-rt/test/asan/
>> POWERPC64LELinuxConfig/TestCases/Posix/Output/coverage-direct.cc.tmp
>> /home/seurer/llvm/build/llvm-test2/projects/compiler-rt/test/asan/
>> POWERPC64LELinuxConfig/TestCases/Posix/Output/lib$(basename
>> /home/seurer/llvm/build/llvm-test2/projects/compiler-rt/test/asan/
>> POWERPC64LELinuxConfig/TestCases/Posix/Output/coverage-direct.cc.tmp).
>> dynamic.so
>> cd /home/seurer/llvm/build/llvm-test2/projects/compiler-rt/test/asan/
>> POWERPC64LELinuxConfig/TestCases/Posix/Output/coverage-direct/direct
>> /usr/bin/python2.7 /home/seurer/llvm/llvm-test2/projects/compiler-rt/lib/
>> sanitizer_common/scripts/sancov.py rawunpack *.sancov.raw
>> /usr/bin/python2.7 /home/seurer/llvm/llvm-test2/projects/compiler-rt/lib/
>> sanitizer_common/scripts/sancov.py print *.sancov >out.txt
>> cd ../..
>> diff -u coverage-direct/normal/out.txt coverage-direct/direct/out.txt
>> /home/seurer/llvm/build/llvm-test2/./bin/clang --driver-mode=g++
>> -fsanitize=address -mno-omit-leaf-frame-pointer -fno-omit-frame-pointer
>> -fno-optimize-sibling-calls -gline-tables-only -m64
>> -fsanitize-coverage=edge -DSHARED /home/seurer/llvm/llvm-test2/
>> projects/compiler-rt/test/asan/TestCases/Posix/coverage-direct.cc
>> -shared -o /home/seurer/llvm/build/llvm-test2/projects/compiler-rt/
>> test/asan/POWERPC64LELinuxConfig/TestCases/Posix/Output/lib$(basename
>> /home/seurer/llvm/build/llvm-test2/projects/compiler-rt/test/asan/
>> POWERPC64LELinuxConfig/TestCases/Posix/Output/coverage-direct.cc.tmp).dynamic.so
>> -fPIC
>> /home/seurer/llvm/build/llvm-test2/./bin/clang --driver-mode=g++
>> -fsanitize=address -mno-omit-leaf-frame-pointer -fno-omit-frame-pointer
>> -fno-optimize-sibling-calls -gline-tables-only -m64
>> -fsanitize-coverage=edge -DSO_DIR=\"/home/seurer/llvm/
>> build/llvm-test2/projects/compiler-rt/test/asan/POWERPC64LELinuxConfig/TestCases/Posix/Output\"
>> /home/seurer/llvm/llvm-test2/projects/compiler-rt/test/
>> asan/TestCases/Posix/coverage-direct.cc -ldl -o
>> /home/seurer/llvm/build/llvm-test2/projects/compiler-rt/test/asan/
>> POWERPC64LELinuxConfig/TestCases/Posix/Output/coverage-direct.cc.tmp
>> rm -rf /home/seurer/llvm/build/llvm-test2/projects/compiler-rt/test/asan/
>> POWERPC64LELinuxConfig/TestCases/Posix/Output/coverage-direct
>> mkdir -p /home/seurer/llvm/build/llvm-test2/projects/compiler-rt/
>> test/asan/POWERPC64LELinuxConfig/TestCases/Posix/Output/
>> coverage-direct/normal
>> env ASAN_OPTIONS=coverage=1:coverage_direct=0:coverage_
>> dir=/home/seurer/llvm/build/llvm-test2/projects/compiler-rt/test/asan/
>> POWERPC64LELinuxConfig/TestCases/Posix/Output/coverage-direct/normal:verbosity=1
>>
>> /home/seurer/llvm/build/llvm-test2/projects/compiler-rt/test/asan/
>> POWERPC64LELinuxConfig/TestCases/Posix/Output/coverage-direct.cc.tmp
>> /home/seurer/llvm/build/llvm-test2/projects/compiler-rt/test/asan/
>> POWERPC64LELinuxConfig/TestCases/Posix/Output/lib$(basename
>> /home/seurer/llvm/build/llvm-test2/projects/compiler-rt/test/asan/
>> POWERPC64LELinuxConfig/TestCases/Posix/Output/coverage-direct.cc.tmp).
>> dynamic.so
>> /usr/bin/python2.7 /home/seurer/llvm/llvm-test2/projects/compiler-rt/lib/
>> sanitizer_common/scripts/sancov.py print /home/seurer/llvm/build/llvm-
>> test2/projects/compiler-rt/test/asan/POWERPC64LELinuxConfig/
>> TestCases/Posix/Output/coverage-direct/normal/*.sancov
>> >/home/seurer/llvm/build/llvm-test2/projects/compiler-rt/test/asan/
>> POWERPC64LELinuxConfig/TestCases/Posix/Output/
>> coverage-direct/normal/out.txt
>> mkdir -p /home/seurer/llvm/build/llvm-test2/projects/compiler-rt/
>> test/asan/POWERPC64LELinuxConfig/TestCases/Posix/Output/
>> coverage-direct/direct
>> env ASAN_OPTIONS=coverage=1:coverage_direct=1:coverage_
>> dir=/home/seurer/llvm/build/llvm-test2/projects/compiler-rt/test/asan/
>> POWERPC64LELinuxConfig/TestCases/Posix/Output/coverage-direct/direct:verbosity=1
>>
>> /home/seurer/llvm/build/llvm-test2/projects/compiler-rt/test/asan/
>> POWERPC64LELinuxConfig/TestCases/Posix/Output/coverage-direct.cc.tmp
>> /home/seurer/llvm/build/llvm-test2/projects/compiler-rt/test/asan/
>> POWERPC64LELinuxConfig/TestCases/Posix/Output/lib$(basename
>> /home/seurer/llvm/build/llvm-test2/projects/compiler-rt/test/asan/
>> POWERPC64LELinuxConfig/TestCases/Posix/Output/coverage-direct.cc.tmp).
>> dynamic.so
>> cd /home/seurer/llvm/build/llvm-test2/projects/compiler-rt/test/asan/
>> POWERPC64LELinuxConfig/TestCases/Posix/Output/coverage-direct/direct
>> /usr/bin/python2.7 /home/seurer/llvm/llvm-test2/projects/compiler-rt/lib/
>> sanitizer_common/scripts/sancov.py rawunpack *.sancov.raw
>> /usr/bin/python2.7 /home/seurer/llvm/llvm-test2/projects/compiler-rt/lib/
>> sanitizer_common/scripts/sancov.py print *.sancov >out.txt
>> cd ../..
>> diff -u coverage-direct/normal/out.txt coverage-direct/direct/out.txt
>> --
>> Exit Code: 1
>>
>> Command Output (stdout):
>> --
>> bar
>> bar
>> bar
>> bar
>> --- coverage-direct/normal/out.txt      2017-01-24 10:20:41.258917000
>> -0600
>> +++ coverage-direct/direct/out.txt      2017-01-24 10:20:41.638917000
>> -0600
>> @@ -1 +1,2 @@
>>  0x10128bb0
>> +0x10128bb0
>>
>> --
>> Command Output (stderr):
>> --
>> ==18701==AddressSanitizer: failed to intercept '__isoc99_printf'
>> ==18701==AddressSanitizer: failed to intercept '__isoc99_sprintf'
>> ==18701==AddressSanitizer: failed to intercept '__isoc99_snprintf'
>> ==18701==AddressSanitizer: failed to intercept '__isoc99_fprintf'
>> ==18701==AddressSanitizer: failed to intercept '__isoc99_vprintf'
>> ==18701==AddressSanitizer: failed to intercept '__isoc99_vsprintf'
>> ==18701==AddressSanitizer: failed to intercept '__isoc99_vsnprintf'
>> ==18701==AddressSanitizer: failed to intercept '__isoc99_vfprintf'
>> ==18701==AddressSanitizer: libc interceptors initialized
>> || `[0x0a0000000000, 0x3fffffffffff]` || HighMem    ||
>> || `[0x034000000000, 0x09ffffffffff]` || HighShadow ||
>> || `[0x024000000000, 0x033fffffffff]` || ShadowGap  ||
>> || `[0x020000000000, 0x023fffffffff]` || LowShadow  ||
>> || `[0x000000000000, 0x01ffffffffff]` || LowMem     ||
>> MemToShadow(shadow): 0x024000000000 0x0247ffffffff 0x026800000000
>> 0x033fffffffff
>> redzone=16
>> max_redzone=2048
>> quarantine_size_mb=256M
>> thread_local_quarantine_size_kb=1024K
>> malloc_context_size=30
>> SHADOW_SCALE: 3
>> SHADOW_GRANULARITY: 8
>> SHADOW_OFFSET: 0x20000000000
>> ==18701==Installed the sigaction for signal 11
>> ==18701==Installed the sigaction for signal 7
>> ==18701==Installed the sigaction for signal 8
>> ==18701==T0: stack [0x3fffdd8c0000,0x3fffde0c0000) size 0x800000;
>> local=0x3fffde0ba450
>> ==18701==AddressSanitizer Init done
>> PID: 18701
>> ==18701== CovDump: /home/seurer/llvm/build/llvm-
>> test2/projects/compiler-rt/test/asan/POWERPC64LELinuxConfig/
>> TestCases/Posix/Output/coverage-direct/normal/
>> coverage-direct.cc.tmp.18701.sancov: 1 PCs written
>> ==18701== CovDump: /home/seurer/llvm/build/llvm-
>> test2/projects/compiler-rt/test/asan/POWERPC64LELinuxConfig/
>> TestCases/Posix/Output/coverage-direct/normal/libcoverage-direct.cc.tmp.
>> dynamic.so.18701.sancov: 1 PCs written
>> /home/seurer/llvm/llvm-test2/projects/compiler-rt/lib/
>> sanitizer_common/scripts/sancov.py: read 1 64-bit PCs from
>> /home/seurer/llvm/build/llvm-test2/projects/compiler-rt/test/asan/
>> POWERPC64LELinuxConfig/TestCases/Posix/Output/coverage-direct/normal/
>> coverage-direct.cc.tmp.18701.sancov
>> /home/seurer/llvm/llvm-test2/projects/compiler-rt/lib/
>> sanitizer_common/scripts/sancov.py: read 1 64-bit PCs from
>> /home/seurer/llvm/build/llvm-test2/projects/compiler-rt/test/asan/
>> POWERPC64LELinuxConfig/TestCases/Posix/Output/coverage-direct/normal/
>> libcoverage-direct.cc.tmp.dynamic.so.18701.sancov
>> /home/seurer/llvm/llvm-test2/projects/compiler-rt/lib/
>> sanitizer_common/scripts/sancov.py: 2 files merged; 2 PCs total
>> ==19909==AddressSanitizer: failed to intercept '__isoc99_printf'
>> ==19909==AddressSanitizer: failed to intercept '__isoc99_sprintf'
>> ==19909==AddressSanitizer: failed to intercept '__isoc99_snprintf'
>> ==19909==AddressSanitizer: failed to intercept '__isoc99_fprintf'
>> ==19909==AddressSanitizer: failed to intercept '__isoc99_vprintf'
>> ==19909==AddressSanitizer: failed to intercept '__isoc99_vsprintf'
>> ==19909==AddressSanitizer: failed to intercept '__isoc99_vsnprintf'
>> ==19909==AddressSanitizer: failed to intercept '__isoc99_vfprintf'
>> ==19909==AddressSanitizer: libc interceptors initialized
>> || `[0x0a0000000000, 0x3fffffffffff]` || HighMem    ||
>> || `[0x034000000000, 0x09ffffffffff]` || HighShadow ||
>> || `[0x024000000000, 0x033fffffffff]` || ShadowGap  ||
>> || `[0x020000000000, 0x023fffffffff]` || LowShadow  ||
>> || `[0x000000000000, 0x01ffffffffff]` || LowMem     ||
>> MemToShadow(shadow): 0x024000000000 0x0247ffffffff 0x026800000000
>> 0x033fffffffff
>> redzone=16
>> max_redzone=2048
>> quarantine_size_mb=256M
>> thread_local_quarantine_size_kb=1024K
>> malloc_context_size=30
>> SHADOW_SCALE: 3
>> SHADOW_GRANULARITY: 8
>> SHADOW_OFFSET: 0x20000000000
>> ==19909==Installed the sigaction for signal 11
>> ==19909==Installed the sigaction for signal 7
>> ==19909==Installed the sigaction for signal 8
>> ==19909==T0: stack [0x3fffe86a0000,0x3fffe8ea0000) size 0x800000;
>> local=0x3fffe8e91da0
>> ==19909==AddressSanitizer Init done
>> PID: 19909
>> /home/seurer/llvm/llvm-test2/projects/compiler-rt/lib/
>> sanitizer_common/scripts/sancov.py: reading map 19909.sancov.map
>> /home/seurer/llvm/llvm-test2/projects/compiler-rt/lib/
>> sanitizer_common/scripts/sancov.py: unpacking 19909.sancov.raw
>> /home/seurer/llvm/llvm-test2/projects/compiler-rt/lib/
>> sanitizer_common/scripts/sancov.py: writing 1 PCs to
>> coverage-direct.cc.tmp.19909.sancov
>> /home/seurer/llvm/llvm-test2/projects/compiler-rt/lib/
>> sanitizer_common/scripts/sancov.py: writing 1 PCs to
>> libcoverage-direct.cc.tmp.dynamic.so.19909.sancov
>> /home/seurer/llvm/llvm-test2/projects/compiler-rt/lib/
>> sanitizer_common/scripts/sancov.py: read 1 64-bit PCs from
>> coverage-direct.cc.tmp.19909.sancov
>> /home/seurer/llvm/llvm-test2/projects/compiler-rt/lib/
>> sanitizer_common/scripts/sancov.py: read 1 64-bit PCs from
>> libcoverage-direct.cc.tmp.dynamic.so.19909.sancov
>> /home/seurer/llvm/llvm-test2/projects/compiler-rt/lib/
>> sanitizer_common/scripts/sancov.py: 2 files merged; 2 PCs total
>> ==27096==AddressSanitizer: failed to intercept '__isoc99_printf'
>> ==27096==AddressSanitizer: failed to intercept '__isoc99_sprintf'
>> ==27096==AddressSanitizer: failed to intercept '__isoc99_snprintf'
>> ==27096==AddressSanitizer: failed to intercept '__isoc99_fprintf'
>> ==27096==AddressSanitizer: failed to intercept '__isoc99_vprintf'
>> ==27096==AddressSanitizer: failed to intercept '__isoc99_vsprintf'
>> ==27096==AddressSanitizer: failed to intercept '__isoc99_vsnprintf'
>> ==27096==AddressSanitizer: failed to intercept '__isoc99_vfprintf'
>> ==27096==AddressSanitizer: libc interceptors initialized
>> || `[0x0a0000000000, 0x3fffffffffff]` || HighMem    ||
>> || `[0x034000000000, 0x09ffffffffff]` || HighShadow ||
>> || `[0x024000000000, 0x033fffffffff]` || ShadowGap  ||
>> || `[0x020000000000, 0x023fffffffff]` || LowShadow  ||
>> || `[0x000000000000, 0x01ffffffffff]` || LowMem     ||
>> MemToShadow(shadow): 0x024000000000 0x0247ffffffff 0x026800000000
>> 0x033fffffffff
>> redzone=16
>> max_redzone=2048
>> quarantine_size_mb=256M
>> thread_local_quarantine_size_kb=1024K
>> malloc_context_size=30
>> SHADOW_SCALE: 3
>> SHADOW_GRANULARITY: 8
>> SHADOW_OFFSET: 0x20000000000
>> ==27096==Installed the sigaction for signal 11
>> ==27096==Installed the sigaction for signal 7
>> ==27096==Installed the sigaction for signal 8
>> ==27096==T0: stack [0x3ffffe510000,0x3ffffed10000) size 0x800000;
>> local=0x3ffffed04100
>> ==27096==AddressSanitizer Init done
>> PID: 27096
>> ==27096== CovDump: /home/seurer/llvm/build/llvm-
>> test2/projects/compiler-rt/test/asan/POWERPC64LELinuxConfig/
>> TestCases/Posix/Output/coverage-direct/normal/
>> coverage-direct.cc.tmp.27096.sancov: 1 PCs written
>> ==27096== CovDump: /home/seurer/llvm/build/llvm-
>> test2/projects/compiler-rt/test/asan/POWERPC64LELinuxConfig/
>> TestCases/Posix/Output/coverage-direct/normal/libcoverage-direct.cc.tmp.
>> dynamic.so.27096.sancov: 1 PCs written
>> /home/seurer/llvm/llvm-test2/projects/compiler-rt/lib/
>> sanitizer_common/scripts/sancov.py: read 1 64-bit PCs from
>> /home/seurer/llvm/build/llvm-test2/projects/compiler-rt/test/asan/
>> POWERPC64LELinuxConfig/TestCases/Posix/Output/coverage-direct/normal/
>> coverage-direct.cc.tmp.27096.sancov
>> /home/seurer/llvm/llvm-test2/projects/compiler-rt/lib/
>> sanitizer_common/scripts/sancov.py: read 1 64-bit PCs from
>> /home/seurer/llvm/build/llvm-test2/projects/compiler-rt/test/asan/
>> POWERPC64LELinuxConfig/TestCases/Posix/Output/coverage-direct/normal/
>> libcoverage-direct.cc.tmp.dynamic.so.27096.sancov
>> /home/seurer/llvm/llvm-test2/projects/compiler-rt/lib/
>> sanitizer_common/scripts/sancov.py: 2 files merged; 1 PCs total
>> ==27521==AddressSanitizer: failed to intercept '__isoc99_printf'
>> ==27521==AddressSanitizer: failed to intercept '__isoc99_sprintf'
>> ==27521==AddressSanitizer: failed to intercept '__isoc99_snprintf'
>> ==27521==AddressSanitizer: failed to intercept '__isoc99_fprintf'
>> ==27521==AddressSanitizer: failed to intercept '__isoc99_vprintf'
>> ==27521==AddressSanitizer: failed to intercept '__isoc99_vsprintf'
>> ==27521==AddressSanitizer: failed to intercept '__isoc99_vsnprintf'
>> ==27521==AddressSanitizer: failed to intercept '__isoc99_vfprintf'
>> ==27521==AddressSanitizer: libc interceptors initialized
>> || `[0x0a0000000000, 0x3fffffffffff]` || HighMem    ||
>> || `[0x034000000000, 0x09ffffffffff]` || HighShadow ||
>> || `[0x024000000000, 0x033fffffffff]` || ShadowGap  ||
>> || `[0x020000000000, 0x023fffffffff]` || LowShadow  ||
>> || `[0x000000000000, 0x01ffffffffff]` || LowMem     ||
>> MemToShadow(shadow): 0x024000000000 0x0247ffffffff 0x026800000000
>> 0x033fffffffff
>> redzone=16
>> max_redzone=2048
>> quarantine_size_mb=256M
>> thread_local_quarantine_size_kb=1024K
>> malloc_context_size=30
>> SHADOW_SCALE: 3
>> SHADOW_GRANULARITY: 8
>> SHADOW_OFFSET: 0x20000000000
>> ==27521==Installed the sigaction for signal 11
>> ==27521==Installed the sigaction for signal 7
>> ==27521==Installed the sigaction for signal 8
>> ==27521==T0: stack [0x3fffcdaf0000,0x3fffce2f0000) size 0x800000;
>> local=0x3fffce2e5b00
>> ==27521==AddressSanitizer Init done
>> PID: 27521
>> /home/seurer/llvm/llvm-test2/projects/compiler-rt/lib/
>> sanitizer_common/scripts/sancov.py: reading map 27521.sancov.map
>> /home/seurer/llvm/llvm-test2/projects/compiler-rt/lib/
>> sanitizer_common/scripts/sancov.py: unpacking 27521.sancov.raw
>> /home/seurer/llvm/llvm-test2/projects/compiler-rt/lib/
>> sanitizer_common/scripts/sancov.py: writing 2 PCs to
>> coverage-direct.cc.tmp.27521.sancov
>> /home/seurer/llvm/llvm-test2/projects/compiler-rt/lib/
>> sanitizer_common/scripts/sancov.py: read 2 64-bit PCs from
>> coverage-direct.cc.tmp.27521.sancov
>> /home/seurer/llvm/llvm-test2/projects/compiler-rt/lib/
>> sanitizer_common/scripts/sancov.py: 1 file merged; 2 PCs total
>>
>> --
>>
>> ********************
>>
>>
>>
>>
>> On 01/23/2017 06:57 PM, Kostya Serebryany via llvm-commits wrote:
>>
>> Author: kcc
>> Date: Mon Jan 23 18:57:31 2017
>> New Revision: 292862
>>
>> URL: http://llvm.org/viewvc/llvm-project?rev=292862&view=rev
>> Log:
>> [sanitizer-coverage] emit __sanitizer_cov_trace_pc_guard w/o a preceding
>> 'if' by default. Update the docs, also add deprecation notes around other
>> parts of sanitizer coverage
>>
>> Modified:
>>     llvm/trunk/lib/Transforms/Instrumentation/SanitizerCoverage.cpp
>>     llvm/trunk/test/Instrumentation/SanitizerCoverage/coverage.ll
>>     llvm/trunk/test/Instrumentation/SanitizerCoverage/coverage2-dbg.ll
>>
>> Modified: llvm/trunk/lib/Transforms/Instrumentation/SanitizerCoverage.cpp
>> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/
>> Transforms/Instrumentation/SanitizerCoverage.cpp?rev=
>> 292862&r1=292861&r2=292862&view=diff
>> ============================================================
>> ==================
>> --- llvm/trunk/lib/Transforms/Instrumentation/SanitizerCoverage.cpp
>> (original)
>> +++ llvm/trunk/lib/Transforms/Instrumentation/SanitizerCoverage.cpp Mon
>> Jan 23 18:57:31 2017
>> @@ -95,7 +95,7 @@ static cl::opt<unsigned> ClCoverageBlock
>>      "sanitizer-coverage-block-threshold",
>>      cl::desc("Use a callback with a guard check inside it if there are"
>>               " more than this number of blocks."),
>> -    cl::Hidden, cl::init(500));
>> +    cl::Hidden, cl::init(0));
>>
>>  static cl::opt<bool>
>>      ClExperimentalTracing("sanitizer-coverage-experimental-tracing",
>>
>> Modified: llvm/trunk/test/Instrumentation/SanitizerCoverage/coverage.ll
>> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Instrumentation/
>> SanitizerCoverage/coverage.ll?rev=292862&r1=292861&r2=292862&view=diff
>> ============================================================
>> ==================
>> --- llvm/trunk/test/Instrumentation/SanitizerCoverage/coverage.ll
>> (original)
>> +++ llvm/trunk/test/Instrumentation/SanitizerCoverage/coverage.ll Mon
>> Jan 23 18:57:31 2017
>> @@ -1,6 +1,6 @@
>>  ; RUN: opt < %s -sancov -sanitizer-coverage-level=0 -S | FileCheck %s
>> --check-prefix=CHECK0
>>  ; RUN: opt < %s -sancov -sanitizer-coverage-level=1 -S | FileCheck %s
>> --check-prefix=CHECK1
>> -; RUN: opt < %s -sancov -sanitizer-coverage-level=2 -S | FileCheck %s
>> --check-prefix=CHECK2
>> +; RUN: opt < %s -sancov -sanitizer-coverage-level=2 -S | FileCheck %s
>> --check-prefix=CHECK_WITH_CHECK
>>  ; RUN: opt < %s -sancov -sanitizer-coverage-level=2
>> -sanitizer-coverage-block-threshold=10 -S | FileCheck %s
>> --check-prefix=CHECK2
>>  ; RUN: opt < %s -sancov -sanitizer-coverage-level=2
>> -sanitizer-coverage-block-threshold=0  -S | FileCheck %s
>> --check-prefix=CHECK_WITH_CHECK
>>  ; RUN: opt < %s -sancov -sanitizer-coverage-level=2
>> -sanitizer-coverage-block-threshold=1  -S | FileCheck %s
>> --check-prefix=CHECK_WITH_CHECK
>>
>> Modified: llvm/trunk/test/Instrumentation/SanitizerCoverage/coverage2-
>> dbg.ll
>> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Instrumentation/
>> SanitizerCoverage/coverage2-dbg.ll?rev=292862&r1=292861&
>> r2=292862&view=diff
>> ============================================================
>> ==================
>> --- llvm/trunk/test/Instrumentation/SanitizerCoverage/coverage2-dbg.ll
>> (original)
>> +++ llvm/trunk/test/Instrumentation/SanitizerCoverage/coverage2-dbg.ll
>> Mon Jan 23 18:57:31 2017
>> @@ -17,8 +17,8 @@ target triple = "x86_64-unknown-linux-gn
>>  ; Check that __sanitizer_cov call has !dgb pointing to the beginning
>>  ; of appropriate basic blocks.
>>  ; CHECK-LABEL:_Z3fooPi
>> -; CHECK: call void @__sanitizer_cov(i32*{{.*}}), !dbg [[A:!.*]]
>> -; CHECK: call void @__sanitizer_cov(i32*{{.*}}), !dbg [[B:!.*]]
>> +; CHECK: call void @__sanitizer_cov{{.*}}(i32*{{.*}}), !dbg [[A:!.*]]
>> +; CHECK: call void @__sanitizer_cov{{.*}}(i32*{{.*}}), !dbg [[B:!.*]]
>>  ; CHECK: ret void
>>  ; CHECK: [[A]] = !DILocation(line: 1, scope: !{{.*}})
>>  ; CHECK: [[B]] = !DILocation(line: 3, column: 5, scope: !{{.*}})
>>
>>
>> _______________________________________________
>> llvm-commits mailing list
>> llvm-commits at lists.llvm.org
>> http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits
>>
>>
>>
>> --
>>
>> -Bill Seurer
>>
>>
>> _______________________________________________
>> llvm-commits mailing list
>> llvm-commits at lists.llvm.org
>> http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits
>>
>>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20170124/328b000d/attachment-0001.html>


More information about the llvm-commits mailing list