The compile works without errors on the Raspbian system and the program executes correctly giving the hints about where the out of bounds access exists.
However, when I compile the target C program on the Arch system, I see this:
Code: Select all
/usr/bin/ld: cannot find libasan_preinit.o: No such file or directory
/usr/bin/ld: cannot find -lasanThe compile command I use (on both) is:
Code: Select all
gcc array_out_of_bounds_test.c -std=c99 -Wall -Wextra -O2 -fsanitize=address -o /usr/local/bin/array_out_of_bounds_testUsing google, I've seen more than one reference to the library not being installed, so I've come here to find out what to do. I had started by trying to use mudflap, but apparently that is now gone. I'd prefer to work in Arch, but this has me stymied.
Being able to include address sanitize code would help me immensely, I'm working on a large multi-thread application that is failing in a way that suggests out of bounds array access and runtime error/warnings from asan would probably be very helpful.
- Is this just not part of GCC for Arch Linux on ARM8 (Rpi3)?
- Is there some detail I've missed in how I issue my compile or how to compile under Arch?
- Did I not properly install clang on Arch (or is it broken)?