Questions tagged [address-sanitizer]

AddressSanitizer (ASAN) is a fast memory error detector for issues such as out-of-bounds access and more.

AddressSanitizer (ASAN) is a fast memory error detector and consists of compile time instrumentation and a runtime library.

See also:

530 questions
0
votes
1 answer

ASAN with gcc-5.2 not intercepting exceptions

I was using the ASAN with gcc-4.8.2 for last 2 years without any issue. We moved to gcc-5.2 to use the new features like LSAN. After building the application with gcc-5.2 its not able to intercept the __cxa_throw anymore leading to a crash, found…
0
votes
1 answer

Interpretation of XCode AddressSanitizer results

I have recently started using the XCode AddressSanitizer, which I think was introduced in XCode 7 (see e.g. Apple WWDC presentation), to help with a difficult to find strange error. The Sanitizer actually found a problem, but I have a hard time…
fishinear
  • 6,101
  • 3
  • 36
  • 84
0
votes
1 answer

what package do I need to use clang with asan for 32 bit?

I get this error when compiling with clang++ and -fsanitize=address -m32: /usr/bin/ld: cannot find /usr/lib/llvm-3.6/bin/../lib/clang/3.6.0/lib/linux/libclang_rt.asan-i386.a: No such file or directory /usr/bin/ld: cannot find…
onqtam
  • 4,356
  • 2
  • 28
  • 50
0
votes
1 answer

Disable Color in Address Sanitizer Output

Is there any chance to disable the terminal color output of Asan? No matter which flags I pass, it prints terminal color codes: Heap left redzone: [1m[31mfa[1m[0m Freed heap region: [1m[35mfd[1m[0m Stack left redzone: …
HelloWorld
  • 2,392
  • 3
  • 31
  • 68
0
votes
0 answers

Xcode 7 indicating heap buffer overflow in NSBitmapImageRep - bitmapData

Just found an issue running my app through the new Address Sanitizer feature in Xcode 7 that I can't quite make any sense of: I'm attempting to initialize a medium-sized (588x375) texture from an NSImage like this NSImage *texture = [[NSBundle…
ATV
  • 4,116
  • 3
  • 23
  • 42
0
votes
1 answer

Is there any way of use asan in gcc 4.7

According to the address-sanitizer home page it comes only with the gcc 4.8 or above. Isn't there anyway of using it with gcc 4.7?
Sujith Gunawardhane
  • 1,251
  • 1
  • 10
  • 24
-1
votes
1 answer

"AddressSanitizer: stack-use-after-scope" when trying to access element of vector of pointers

Why the following code #include #include typedef struct Number { int number = 15; } Number; int main() { std::vector nums(5); for (size_t i = 0; i < nums.size(); ++i) { Number num; nums[i] =…
-1
votes
1 answer

Is an indirect memory leak detected by gcc option -fsanitize=address a concern?

When I test run C++ programs with the option -fsanitize=address I see many locations point to an indirect leak. They are all initiated from libasan.so. The exact error shown below. I am not sure that I am responsible for this leak or not. I was…
Kemin Zhou
  • 6,264
  • 2
  • 48
  • 56
-1
votes
1 answer

DEADLYSIGNAL error when running simple program that allocates static memory

I have the following code: #include int main(void){ int x[20000000]; return 0; } Compiling it as gcc file.c, and running it works flawlessly. However, compiling it as gcc -fsanitize=address -fsanitize=undefined file.c gives the…
user12184817
-1
votes
1 answer

LeetCode C++ Convert char[] to string, throws AddressSanitizer: stack-buffer-overflow error

I'm learning C++, and on LeetCode, converting a char[] to a string gives a AddressSanitizer: stack-buffer-overflow error. string test1() /* Line 70 */ { char test[] = "11"; return string(test); } string test2() /* Line 76 */ { char…
hmmm
  • 3
  • 4
-1
votes
1 answer

Debug address sanitizer double free

Trying to debug an asan (address sanitizer) double free memory issue. I got this stack: ==4108==ERROR: AddressSanitizer: attempting double-free on 0x603000012610 in thread T0: #0 0x7ffffe5212c0 in operator delete(void*)…
Ghita
  • 4,465
  • 4
  • 42
  • 69
-1
votes
1 answer

Why does my code stop crashing after adding aSan library?

I am currently debugging a C code. This is basically a client from a data collection platform and I was getting weird bugs reading from a linked list. The problem basically is that the "next" pointer of the last item changes in some unknown point…
tarek
  • 3
  • 2
-1
votes
1 answer

Heap buffer overflow--is this a false positive of address sanitizer?

I have the following simple program void copy(const int16_t *buffer) { int16_t *b; memcpy(b,buffer,2); return ; } int LLVMFuzzerTestOneInput(const int16_t *buffer) { copy(buffer); return 0; } which I compile with clang (v9) using…
panava
  • 11
  • 1
-1
votes
1 answer

I want to delete a binary tree search but i get an error

I would like to delete a BST, my program works but, I don't know way, AddressSanitizer find an error. void clear_maxlist(max_list* position){ if(position == NULL) return; clear_maxlist(((position)->left)); …
Bob Rob
  • 164
  • 2
  • 10
-2
votes
1 answer

Can you analyze this result from address sanitizer

enter image description here I ran AFL fuzzer to open source program and I ran the program with the output crash from the fuzzing. This is the result of address sanitizer but I am not sure what this error actually is. And where do I have to look…
1 2 3
35
36