Skip to main content
Filter by
Sorted by
Tagged with
105 votes
7 answers
127k views

I've added AddressSanitizer flag as follow: set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fsanitize=address") Everything builds and runs fine when using Unix Makefiles. The problem comes when generating ...
ObjSal's user avatar
  • 1,874
56 votes
2 answers
44k views

I want some tool to diagnose use-after-free bugs and uninitialized bugs. I am considering Sanitizer(Memory and/or Address) and Valgrind. But I have very little idea about their advantages and ...
kayas's user avatar
  • 733
39 votes
4 answers
34k views

I'm running OS X, 10.8.5; I've installed llvm 3.4 via homebrew (clang version 3.4 (tags/RELEASE_34/final) ), and I'm building with -fsanitize=address. I can get asan working with simple demo programs,...
Steve Broberg's user avatar
35 votes
3 answers
11k views

I'm working on a program written in C that I occasionally build with address sanitizer, basically to catch bugs. The program prints a banner in the logs when it starts up with info such as: who built ...
fencekicker's user avatar
27 votes
3 answers
22k views

I would like to use clang address sanitizer on OSX Mountain Lion, because Valgrind have problems with memory check on this platform. But when I had the -fsanitize=address during the compilation time (...
Guillaume's user avatar
  • 9,111
26 votes
1 answer
19k views

I've upgraded my Linux development VM from Ubuntu 16.04 to 18.04 recently, and noticed one thing that has changed. This is on x86-64. With 16.04, I've always had this workflow where I'd build the ...
fencekicker's user avatar
23 votes
2 answers
2k views

My project includes a large C++ library and Python bindings (via Boost.Python). The test suite is mostly written on top of the Python bindings, and I would like to run it with sanitizers, starting ...
akim's user avatar
  • 8,921
22 votes
4 answers
56k views

When linking my code compiled with the AddressSanitizer tool, I'm getting many errors of the kind undefined reference to '_asan_init_v4'. clang -fPIC -g -fno-omit-frame-pointer -DNDEBUG -Wl,-z,defs \ ...
vamshi's user avatar
  • 243
21 votes
1 answer
12k views

I compiled my code using -fsanitize=address and am getting this error: ==53702==ERROR: AddressSanitizer: new-delete-type-mismatch on 0x60300000efe0 in thread T0: object passed to delete has wrong ...
mrks's user avatar
  • 8,453
19 votes
2 answers
18k views

Coming from Linux/gcc/clang I find myself working more and more on Windows/Visual Studio. What I am really missing there is the address sanitizer (bounds checking, leaks, use after free,...). I've ...
Frank Meerkötter's user avatar
18 votes
3 answers
6k views

Clang 8 release notes have this promising line: Allow using Address Sanitizer and Undefined Behaviour Sanitizer on MinGW. However, I unable to figure out how to use those properly. I'm using ...
HolyBlackCat's user avatar
18 votes
1 answer
16k views

I'm trying to compile C++ using clang's address sanitizer to output the sanitize results within a core dump, so I added: CXXFLAGS += -fsanitize=address to have the compiler options: /opt/llvm-3.8.0/...
intrigued_66's user avatar
  • 17.5k
17 votes
1 answer
7k views

I am trying to compile a python extension with Address Sanitizer. When I load the extension, I get Traceback (most recent call last): File "test.py", line 2, in <module> from extension ...
Alex's user avatar
  • 971
17 votes
1 answer
892 views

This is dangling pointer|reference example: #include <string> #include <string_view> #include <iostream> std::string foo() { return "test"; } int main() { std::string_view ...
vladon's user avatar
  • 8,429
14 votes
1 answer
28k views

In our build system we have recently integrated ASAN tool (adding -fsanitize=address) to CFLAGS & also while linking , creating library .so files. Note:- We are using GCC 6.3 compiler. We are ...
santosh's user avatar
  • 521
14 votes
1 answer
2k views

I'm trying to use Google's Address Sanitizer with a CUDA project, more precisely with OpenCV cuda functions. However I got an 'out of memory' error on the first cuda call. OpenCV Error: Gpu API call (...
Pluc's user avatar
  • 911
13 votes
2 answers
16k views

I'm trying to get AddressSanitizer to produce line numbers in its stack traces. I've tried on a Mac and a Fedora 19 system and had similar results. Here is a simple program: #include <cstdio> #...
vy32's user avatar
  • 30k
13 votes
4 answers
4k views

Project I have a game project in C++ that I'm currently developing. I compile every source file with -g3 -std=c++2a -Wall ... -fsanitize=address -fsanitize=leak to check for leaks and Segfaults The ...
Leonard's user avatar
  • 406
12 votes
3 answers
3k views

Rust is known as a memory-safe language, but there is a security feature in GCC called AddressSanitizer (ASAN): ./configure CFLAGS="-fsanitize=address -g" CXXFLAGS="-fsanitize=address -g" LDFLAGS="-...
Hessnov's user avatar
  • 367
12 votes
2 answers
16k views

I am trying to suppress a warning from the address sanitizer in clang/gcc My source file looks like this: int foo(){ double bar[] = {7,8}; return bar[3]; } int main(){ return foo(); } and ...
user1928546's user avatar
11 votes
1 answer
914 views

I'm debugging a crash of my OpenCL application. I attempted to use ASan to pin down where the problem originates. But then I discovered that I enable ASan when recompiling, my application cannot find ...
Mary Chang's user avatar
11 votes
1 answer
8k views

For a few days now I get the following issue when starting up the Address Sanitizer within Xcode 7.3. The error messages printed to the Xcode console when the Sanitizer found an issue (that was ...
HelloWorld's user avatar
  • 2,014
10 votes
2 answers
5k views

I read about the Runtime Sanitization in the Apple docs in the new Xcode 7, so I looked for it, and found that it's disabled. I'm using Xcode 7 GM seed. When I go into the Run action of the scheme > ...
Sheamus's user avatar
  • 6,616
10 votes
2 answers
10k views

AddressSanitizer by default throws all errors to shell itself, hence I tried running my ASAN build with following command; >MCTester_ASAN>asan.log ==15619==ERROR: AddressSanitizer: heap-buffer-...
Gayan Pathirage's user avatar
10 votes
0 answers
7k views

My C++ Setup INFO : OS - Windows 10, IDE - VS Code, compiler - MinGw ISSUE : I recently found sanitizers for C++ to catch some runtime errors like out of bound array access with -fsanitize=address and ...
humblefool's user avatar

1
2 3 4 5
13