uftrace
uftrace copied to clipboard
memory leaks in t157
$ make ASAN=1
$ cd tests
$ ./runtest.py -vdp -O0 157
Start 1 tests with 1 worker
Test case pg
------------------------: O0
build command: gcc -o t-abc -fno-inline -fno-builtin -fno-ipa-cp -fno-omit-frame-pointer -D_FORTIFY_SOURCE=0 -pg -O0 s-abc.c
prerun command: /home/honggyu/work/uftrace/git/uftrace/uftrace script --no-pager --no-event --libmcount-path=/home/honggyu/work/uftrace/git/uftrace -S /home/honggyu/work/uftrace/git/uftrace/scripts/count.py --record t-abc
test command: /home/honggyu/work/uftrace/git/uftrace/uftrace script --no-pager --no-event --libmcount-path=/home/honggyu/work/uftrace/git/uftrace -F main -S /home/honggyu/work/uftrace/git/uftrace/scripts/count.py t-abc
=================================================================
==21151==ERROR: LeakSanitizer: detected memory leaks
Direct leak of 292384 byte(s) in 133 object(s) allocated from:
#0 0x7f427122eca8 in malloc (/usr/lib/x86_64-linux-gnu/libasan.so.5+0x10bca8)
#1 0x7f426b120424 (<unknown module>)
Direct leak of 768 byte(s) in 1 object(s) allocated from:
#0 0x7f427122f0de in realloc (/usr/lib/x86_64-linux-gnu/libasan.so.5+0x10c0de)
#1 0x7f426b1f20be (<unknown module>)
Direct leak of 716 byte(s) in 1 object(s) allocated from:
#0 0x7f427122eca8 in malloc (/usr/lib/x86_64-linux-gnu/libasan.so.5+0x10bca8)
#1 0x7f426b2185e6 (<unknown module>)
Direct leak of 640 byte(s) in 1 object(s) allocated from:
#0 0x7f427122eca8 in malloc (/usr/lib/x86_64-linux-gnu/libasan.so.5+0x10bca8)
#1 0x7f426b1208df (<unknown module>)
Direct leak of 536 byte(s) in 1 object(s) allocated from:
#0 0x7f427122eca8 in malloc (/usr/lib/x86_64-linux-gnu/libasan.so.5+0x10bca8)
#1 0x7f426b120e47 (<unknown module>)
Direct leak of 140 byte(s) in 4 object(s) allocated from:
#0 0x7f427122eca8 in malloc (/usr/lib/x86_64-linux-gnu/libasan.so.5+0x10bca8)
#1 0x7f426b1f1fbc (<unknown module>)
Direct leak of 32 byte(s) in 1 object(s) allocated from:
#0 0x7f427122eca8 in malloc (/usr/lib/x86_64-linux-gnu/libasan.so.5+0x10bca8)
#1 0x7f426b18f8f4 (<unknown module>)
Indirect leak of 107818 byte(s) in 112 object(s) allocated from:
#0 0x7f427122eca8 in malloc (/usr/lib/x86_64-linux-gnu/libasan.so.5+0x10bca8)
#1 0x7f426b120424 (<unknown module>)
SUMMARY: AddressSanitizer: 403034 byte(s) leaked in 254 allocation(s).
t157_script_python: -pg -O0 returns 1
157 script_python : NZ
I'm not sure about this one. It seems the python runtime leaks the memory and we might not have the control.
I found the same memory leaks in many tests. It might be from the same reason.