Closed lijh8 closed 1 month ago
You need to compile and link your program with asan. In your case, you just linked your program with asan, but not compiled with asan. You should do:
c++ -fsanitize=address -Wall -Warray-bounds -std=c++2a -g -MMD -MP -c -o main.o main.cpp
c++ -fsanitize=address main.o -o main
@Enna1 , thanks a lot!
@Enna1 , hi can you help confirm on this #1818, thanks
Asan will not report index out-of-bound of small offset in builtin array. Only if i increase the index to a rather big out-of-bound offset, it will report this.
What offset value should Asan report out-of-bound on?
Thanks!
Example 1
Example 2