Bug 1250844
Summary: | GCC and libasan missing asan_symbolize | ||||||
---|---|---|---|---|---|---|---|
Product: | [Fedora] Fedora | Reporter: | Jeffrey Walton <noloader> | ||||
Component: | gcc | Assignee: | Jakub Jelinek <jakub> | ||||
Status: | CLOSED NOTABUG | QA Contact: | Fedora Extras Quality Assurance <extras-qa> | ||||
Severity: | unspecified | Docs Contact: | |||||
Priority: | unspecified | ||||||
Version: | 22 | CC: | davejohansen, jakub, jwakely, law, mpolacek, noloader | ||||
Target Milestone: | --- | ||||||
Target Release: | --- | ||||||
Hardware: | x86_64 | ||||||
OS: | Linux | ||||||
Whiteboard: | |||||||
Fixed In Version: | Doc Type: | Bug Fix | |||||
Doc Text: | Story Points: | --- | |||||
Clone Of: | Environment: | ||||||
Last Closed: | 2016-02-01 21:51:04 UTC | Type: | Bug | ||||
Regression: | --- | Mount Type: | --- | ||||
Documentation: | --- | CRM: | |||||
Verified Versions: | Category: | --- | |||||
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |||||
Cloudforms Team: | --- | Target Upstream Version: | |||||
Embargoed: | |||||||
Attachments: |
|
Description
Jeffrey Walton
2015-08-06 06:56:25 UTC
>
> Searching for the following resulted in 0 hits:
>
> $ find /usr -name asan_symbolize
> /usr/local/bin/asan_symbolize
> $ find /usr -name asan_symbolize.py
> /usr/local/bin/asan_symbolize.py
> $
My pad, these should have been empty. The files are present above because I copied them from another machine.
You don't need to do that with gcc, libsanitizer in gcc uses libbacktrace to symbolize the output already. (In reply to Jakub Jelinek from comment #2) > You don't need to do that with gcc, libsanitizer in gcc uses libbacktrace to > symbolize the output already. Thanks Jakub. I keep hitting problems like below. Are you certain GCC goes not need a symbolizer for Asan? ********** These are from a log file, so line numbers are added in front of the actual error reported by the tools. 41205:==1317== ERROR: AddressSanitizer: stack-buffer-overflow on address 0xbec57b18 at pc 0x38c651 bp 0xbec579e0 sp 0xbec579e4 41499:==1321== ERROR: AddressSanitizer: stack-buffer-overflow on address 0xbedbae9c at pc 0x6553f bp 0xbedbae68 sp 0xbedbae6c 41740:==2793== ERROR: AddressSanitizer: stack-buffer-overflow on address 0xbea67b18 at pc 0x38cbc5 bp 0xbea679e0 sp 0xbea679e4 42034:==2797== ERROR: AddressSanitizer: stack-buffer-overflow on address 0xbef0fe9c at pc 0x66117 bp 0xbef0fe68 sp 0xbef0fe6c ********** $ uname -a Linux cubietruck 3.4.39 #35 SMP PREEMPT Tue Sep 15 17:17:33 CST 2015 armv7l armv7l armv7l GNU/Linux $ g++ --version g++ (Ubuntu/Linaro 4.8.2-19ubuntu1) 4.8.2 Copyright (C) 2013 Free Software Foundation, Inc.
> These are from a log file, so line numbers are added in front of the actual
> error reported by the tools.
>
> 41205:==1317== ERROR: AddressSanitizer: stack-buffer-overflow on address
> 0xbec57b18 at pc 0x38c651 bp 0xbec579e0 sp 0xbec579e4
>
>
> 41499:==1321== ERROR: AddressSanitizer: stack-buffer-overflow on address
> 0xbedbae9c at pc 0x6553f bp 0xbedbae68 sp 0xbedbae6c
>
>
> 41740:==2793== ERROR: AddressSanitizer: stack-buffer-overflow on address
> 0xbea67b18 at pc 0x38cbc5 bp 0xbea679e0 sp 0xbea679e4
>
>
> 42034:==2797== ERROR: AddressSanitizer: stack-buffer-overflow on address
> 0xbef0fe9c at pc 0x66117 bp 0xbef0fe68 sp 0xbef0fe6c
For completeness, the program being tested always uses -g2 (release build) and -g3 (debug build). -g is never omitted.
(In reply to Jeffrey Walton from comment #3) > (In reply to Jakub Jelinek from comment #2) > > You don't need to do that with gcc, libsanitizer in gcc uses libbacktrace to > > symbolize the output already. > > Thanks Jakub. > > I keep hitting problems like below. Are you certain GCC goes not need a > symbolizer for Asan? > I don't know what is different about things on my CubieTruck5 (Linaro, GCC 4.8.2), but I had to use asan_symbolize provided by Clang/Asan to get symbols for a GCC/Asan finding. Also see http://lists.linaro.org/pipermail/linaro-toolchain/2016-June/005786.html (start of thread) and http://lists.linaro.org/pipermail/linaro-toolchain/2016-July/005795.html (end of thread). The 005795 link includes an attachment for asan_symbolize from Clang, which can be used to get symbols from GCC/Asan findings. (In reply to Jeffrey Walton from comment #5) > I don't know what is different about things on my CubieTruck5 (Linaro, GCC > 4.8.2), but I had to use asan_symbolize provided by Clang/Asan to get > symbols for a GCC/Asan finding. Everything is different in this regard between 4.8.x and 4.9.x. Only the latter has libbacktrace symbolization built in, the former doesn't have any symbolization. Created attachment 1175375 [details] asan_symbolize for GCC 4.8 Attached is an asan_symbolize which can be used for GCC 4.8. The shebang is '/usr/bin/env python'. Someone may want to change it to '/usr/bin/env python2'. Alternately, run '2to3' on it and fix the three issues that surface. Also see http://github.com/google/sanitizers/issues/372. |