codechecker icon indicating copy to clipboard operation
codechecker copied to clipboard

report-converter does not work with leak sanitizer when more than one leaks have been detected

Open jimis opened this issue 2 years ago • 1 comments

If more than one leaks have been detected, then report-converter prints:

[INFO] - No 'lsan' results can be found in the given code analyzer output.

To reproduce the issue see new files in #3613.

jimis avatar Mar 02 '22 15:03 jimis

A leak sanitizer output looks like this:


==17727==ERROR: LeakSanitizer: detected memory leaks

Direct leak of 7 byte(s) in 1 object(s) allocated from:
    #0 0x49c2ad in __interceptor_malloc /projects/compiler-rt/lib/asan/asan_malloc_linux.cpp:129:3
    #1 0x4ce525 in main files/lsan2.c:5:9

Direct leak of 5 byte(s) in 1 object(s) allocated from:
    #0 0x49c2ad in __interceptor_malloc /projects/compiler-rt/lib/asan/asan_malloc_linux.cpp:129:3
    #1 0x4ce543 in main files/lsan2.c:7:16

SUMMARY: AddressSanitizer: 12 byte(s) leaked in 2 allocation(s).

AFAICT the output is delimited by ==NNN==ERROR: LeakSanitizer in the start and SUMMARY: AddressSanitizer in the end.

Each such block can contain many leaks, each described by a stacktrace.

jimis avatar Mar 29 '22 19:03 jimis