Testing pre-release 1.0.0-3d9cd04, using aderss sanitizer, setup as:
:flags:
:test:
:compile:
- -fsanitize=address
:link:
- -fsanitize=address
When i generate a test case that fails due to a memory leak:
#include <stdlib.h>
void test_mem_leak() {
int* test = malloc(sizeof(int));
}
I see:
👟 Executing
------------
Running test_mem_leak.out...
☠️ ERROR: Test executable `test_mem_leak.out` seems to have crashed
Running Test Suite Reports
--------------------------
Generating artifact .build/artifacts/test/report_junit.xml...
-------------------
FAILED TEST SUMMARY
-------------------
[test/test_mem_leak.c]
Test: test_mem_leak
At line (3): "Test executable crashed"
-----------------------
❌ OVERALL TEST SUMMARY
-----------------------
TESTED: 1
PASSED: 0
FAILED: 1
IGNORED: 0
---------------------
BUILD FAILURE SUMMARY
---------------------
Unit test failures.
I expected the following info from asan to also be included somewhere:
==1==ERROR: LeakSanitizer: detected memory leaks
Direct leak of 4 byte(s) in 1 object(s) allocated from:
#0 0x7f7ecdb4e887 in __interceptor_malloc ../../../../src/libsanitizer/asan/asan_malloc_linux.cpp:145
#1 0x55a35118d39e in test_mem_leak test/test_mem_leak.c:4
#2 0x55a35118d555 in run_test .build/test/runners/test_mem_leak_runner.c:68
#3 0x55a35118d5b8 in main .build/test/runners/test_mem_leak_runner.c:84
#4 0x7f7ecd89ad8f in __libc_start_call_main ../sysdeps/nptl/libc_start_call_main.h:58
SUMMARY: AddressSanitizer: 4 byte(s) leaked in 1 allocation(s).
Testing pre-release 1.0.0-3d9cd04, using aderss sanitizer, setup as:
When i generate a test case that fails due to a memory leak:
I see:
I expected the following info from asan to also be included somewhere: