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

ASAN build binaries on fedora-17 x86_64 segfault #85

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

ASAN build binaries on fedora-17 x86_64 segfault #85

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

Comments

@ramosian-glider
Copy link
Member

Originally reported on Google Code with ID 85

I tried to build various libraries using the latest version of ASAN from the repo, they
build fine, but when the compiled binaries/libraries are run, they segfault.

One common example is firefox ASAN builds from http://people.mozilla.org/~choller/firefox/asan/

When i run them i get the following:
==28728== AddressSanitizer CHECK failed: /builds/slave/moz-toolchain/src/llvm/projects/compiler-rt/lib/asan/asan_interceptors.cc:744
"((was_called_once == false)) != (0)" (0, 0)
==28728== AddressSanitizer CHECK failed: /builds/slave/moz-toolchain/src/llvm/projects/compiler-rt/lib/asan/asan_interceptors.cc:744
"((was_called_once == false)) != (0)" (0, 0)
==28728== AddressSanitizer CHECK failed: /builds/slave/moz-toolchain/src/llvm/projects/compiler-rt/lib/asan/asan_interceptors.cc:744
"((was_called_once == false)) != (0)" (0, 0)
Segmentation fault


Christian Holler looked into this and his binaries are running well on other distributions.

Here are my machine details:
$ uname -a
Linux some.host.name 3.4.0-1.fc17.x86_64 #1 SMP Sun Jun 3 06:35:17 UTC 2012 x86_64
x86_64 x86_64 GNU/Linux

For my local builds i use the following clang version:
$clang --version
clang version 3.2 (trunk 159332)
Target: x86_64-unknown-linux-gnu
Thread model: posix


Reported by sidhpurwala.huzaifa on 2012-06-29 11:06:50

@ramosian-glider
Copy link
Member Author

Do you have a small reproducer? 

Reported by konstantin.s.serebryany on 2012-06-29 11:12:54

@ramosian-glider
Copy link
Member Author

Can you run the program under GDB and provide the backtrace?

Reported by ramosian.glider on 2012-06-29 11:13:10

@ramosian-glider
Copy link
Member Author

I reproduced this in a VM with Fedora 17 (64 bit) and one of the Firefox Debug+Asan
builds. The GDB trace is here (partial): http://decoder.pastebin.mozilla.org/1683698

The full trace is very long, I suspect it's some recursion repeating on the stack.

Reported by decoder.oh on 2012-06-29 11:45:34

@ramosian-glider
Copy link
Member Author

got it. sscanf is hurting us. 
Will fix. 

Reported by konstantin.s.serebryany on 2012-06-29 12:00:07

@ramosian-glider
Copy link
Member Author

I hope this is fixed in LLVM r159424.
Please let us know whether it is actually fixed on your side.
You don't need to rebuild the entire firefox, just re-link it with fresh asan run-time.

Reported by konstantin.s.serebryany on 2012-06-29 13:09:23

  • Status changed: Fixed

@ramosian-glider
Copy link
Member Author

Yeah, we had this problem in DR on Fedora too.  Some genius in glibc decided it would
be good for sscanf to call malloc.  =P

Reported by rnk@google.com on 2012-06-29 14:41:04

@ramosian-glider
Copy link
Member Author

Adding Project:AddressSanitizer as part of GitHub migration.

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

  • 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