Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

No debug information on MacOS with gcc 4.8.1 #223

Closed
ramosian-glider opened this issue Aug 31, 2015 · 7 comments
Closed

No debug information on MacOS with gcc 4.8.1 #223

ramosian-glider opened this issue Aug 31, 2015 · 7 comments

Comments

@ramosian-glider
Copy link
Member

Originally reported on Google Code with ID 223

I'm using MacOS 10.7.5 and gcc 4.8.1, I compiled application with debug information
and no optimizations: -O0 -g3 -fsanitize=address -fno-omit-frame-pointer. When running
application I receive a correct error message (see output.txt) but without any debug
information. It is probably because on mac debug information is stored separately,
thus in case of valgrind one need to use dsymutil:
dsymutil <executable>
valgrind --dsymutil=yes
I could not find a similar option for AddressSanitizer.

Reported by Lykov.Kirill on 2013-09-17 15:15:26


- _Attachment: [checkNoDInfo.cpp](https://storage.googleapis.com/google-code-attachments/address-sanitizer/issue-223/comment-0/checkNoDInfo.cpp)_ - _Attachment: [Makefile](https://storage.googleapis.com/google-code-attachments/address-sanitizer/issue-223/comment-0/Makefile)_ - _Attachment: [output.txt](https://storage.googleapis.com/google-code-attachments/address-sanitizer/issue-223/comment-0/output.txt)_
@ramosian-glider
Copy link
Member Author

Have you tried the asan_symbolize.py script or the ASAN_OPTIONS=symbolize=1 env var?

Reported by glider@chromium.org on 2013-09-17 15:17:09

@ramosian-glider
Copy link
Member Author

ASAN_OPTIONS=symbolize=1 is the default. It just wouldn't work w/o external symbolizer,
and there is none in gcc. So, I think the only option for now is to use asan_symbolize.py
script.

Reported by samsonov@google.com on 2013-09-18 09:10:36

@ramosian-glider
Copy link
Member Author

Please reopen if #2 doesn't help. 
Also please note, that gcc-asan on Mac is not something we actively support.
(gcc-asan on Linux is, and clang-asan on Mac&Linux even much so)

Reported by konstantin.s.serebryany on 2013-10-03 12:23:47

  • Status changed: WontFix

@ramosian-glider
Copy link
Member Author

On my gcc 4.8 or 4.9 on linux I cannot find asan_symbolize.py.
However, if and only if I set "ASAN_OPTIONS=symbolize=1" and "export ASAN_SYMBOLIZER_PATH=/usr/bin/llvm-symbolizer-3.4",
then I get the symbolized report.

If I do "mybin 2>&1 | /usr/bin/asan_symbolize --demangle" (which is also from clang3.4),
I can see the symbols, but without colours and missing some info

Reported by dpinol on 2013-10-31 16:01:33

@ramosian-glider
Copy link
Member Author

> but without colours
asan_symbolize.py doesn't preserve the colors printed by ASan. Running "mybin 2>&1
| cat" will have the same effect.

> and missing some info
Perhaps it's using addr2line instead of llvm-symbolizer, try to set LLVM_SYMBOLIZER_PATH.

Reported by ramosian.glider on 2013-10-31 16:09:11

@ramosian-glider
Copy link
Member Author

I made asan_symbolize.py accept ASAN_SYMBOLIZER_PATH as well as LLVM_SYMBOLIZER_PATH
in r193758.

Reported by ramosian.glider on 2013-10-31 16:13:09

@ramosian-glider
Copy link
Member Author

Adding Project:AddressSanitizer as part of GitHub migration.

Reported by ramosian.glider on 2015-07-30 09:13:42

  • Labels added: ProjectAddressSanitizer

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant