None
CY
Can sanitizers find the two bugs I wrote in C++?
['Andrew Helwer']
Andrew Helwer
In that same vein of building tools to save us from ourselves, one user suggested building the tree-sitter grammar with the LLVM address & undefined behavior sanitizers enabled. $ test/sanitize/out/parse_tlaplus Test.tla == 929719 == ERROR: AddressSanitizer: heap-buffer-overflow on address 0x602000000031 at pc 0x55ba5836b6f4 bp 0x7ffdd637d2b0 sp 0x7ffdd637ca70 READ of size 2 at 0x602000000031 thread T0 #0 0x55ba5836b6f3 in StrtolFixAndCheck(void*, char const*, char**, char*, int) asan_interceptors.cpp.o #1 0x55ba5836bbd4 in __interceptor_strtol (/home/ahelwer/src/tlaplus/tree-sitter-tlaplus/test/sanitize/out/parse_tlaplus+0xffbd4) (BuildId: 1061028f7f02d346004ffa4692ca74e9d92b5cad) #2 0x55ba5845e1f2 in atoi /usr/include/stdlib.h:364:16 #3 0x55ba5845e1f2 in (anonymous…