Closed giulianobelinassi closed 2 years ago
Support for address sanitizer has been added into tools, but there is none support for libpulp.so itself.
So I tried to implement support for libsanitizer in libpulp.so and I couldn't get past a segmentation fault in startup. The crash seems to be either in libsanitizer or during the dynamic link, because adding infinite loops or prints on libpulp constructors also results in a crash. Statically linking libsanitizer into libpulp.so doesn't help either.
Setting breakpoints in _start
and __asan_init
also results in a crash, so either gdb cannot be used for debugging those or the crash is even before the binary starts executing.
However, valgrind works in libpulp.so, so perhaps it is better to just patch the testsuite to support valgrind.
GCC supports address sanitizer by passing
-fsanitize=address
. Test libpulp with that to ensure we haven't any memory problems hidden around awaiting to catch us unguarded.