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

On mac asan_symbolize script does not symbolicate frames coming from a dynamic library #92

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

Comments

@ramosian-glider
Copy link
Member

Originally reported on Google Code with ID 92

By code inspection, asan does not attempt to symbolicate the frames coming from a dynamic
library:
    if filetype == "DYLIB":
      load_addr = "0x0"
    if DEBUG:
      print "atos -o %s -arch %s -l %s" % (binary, arch, load_addr)
    pipes[binary] = subprocess.Popen(["atos", "-o", binary, "-arch", arch, "-l", load_addr],
                         stdin=subprocess.PIPE, stdout=subprocess.PIPE,)


I also tested this out on a toy example; here the use-after-free happens in a dylib:

da0603a-dhcp178:bin zaks$ ./a.out 2>&1 | /Users/zaks/workspace/llvmgit/llvm/projects/compiler-rt/lib/asan/scripts/asan_symbolize.py=================================================================
==59636== ERROR: AddressSanitizer heap-use-after-free on address 0x0001067c4b80 at
pc 0x1062caf03 bp 0x7fff63e608b0 sp 0x7fff63e608a8
READ of size 4 at 0x0001067c4b80 thread T0
atos -o /Applications/Xcode.app/Contents/Developer/Toolchains/iOS6.0.xctoolchain/usr/bin/ex.dylib
-arch x86_64 -l 0x0
    #0 0x1062caf02 in 0x00000f03 (in ex.dylib)
atos -o /Applications/Xcode.app/Contents/Developer/Toolchains/iOS6.0.xctoolchain/usr/bin/./a.out
-arch x86_64 -l 0x104261000
got symbolicator for /Applications/Xcode.app/Contents/Developer/Toolchains/iOS6.0.xctoolchain/usr/bin/a.out,
base address 100000000
    #1 0x104262584 in start (in a.out) + 52
    #2 0x1

> What version of the product are you using? On what operating system?
TOT clang; Lion


Reported by zaks.anna on 2012-07-18 17:26:30

@ramosian-glider
Copy link
Member Author

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

  • Labels added: ProjectAddressSanitizer

@ramosian-glider
Copy link
Member Author

Adding Project:AddressSanitizer as part of GitHub migration.

Reported by ramosian.glider on 2015-07-30 09:06:55

@kcc
Copy link
Contributor

kcc commented Dec 1, 2015

We mostly don't care about asan_symbolize

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

2 participants