-
Notifications
You must be signed in to change notification settings - Fork 1
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
Add an "asan" bazel config to debug crashes #28
Conversation
Ad discussed synchronously, let's add some comments here as to which permutation of compiler + operating system this is for, e.g., Linux + gcc or macOS + clang, etc. Also dropping this in case it's helpful: https://github.com/envoyproxy/envoy/blob/main/.bazelrc#L62 |
@onelxj Ben mentioned you might be interested in this. Sample use of this PR: https://github.com/reboot-dev/respect/pull/69 |
Done (though I don't know if the bazel default is to compile with gcc or llvm/clang):
Thanks! That does a lot of envoy-specific stuff, e.g.:
I'd be curious if the minimal asan config in this PR works across several environments, though I don't have any experience building / running on other OSs. |
2a26689
to
0a990fc
Compare
This allows you to build targets or tests with `--config=asan` and get detailed debugging information for bad memory access. Adding this in dev-tools so it can be easily shared across repos: we'll use this a lot for any C++ development.
0a990fc
to
6eb550f
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Very excited about this! 🎉
Update to a commit that includes 3rdparty/dev-tools#28.
Update to a commit that includes 3rdparty/dev-tools#28.
Update to a commit that includes 3rdparty/dev-tools#28.
Update to a commit that includes 3rdparty/dev-tools#28.
@benh you mentioned that there might be something like a built in Specifically, this command (which relies on the new config introduced by this PR) produces an asan error about a stack-buffer-overflow when run in the respect repo:
Whereas this command runs, but doesn't produce any asan-like output:
Sample output:
|
This allows you to build targets or tests with
--config=asan
and getdetailed debugging information for bad memory access.
Adding this in dev-tools so it can be easily shared across repos: we'll
use this a lot for any C++ development.