Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
live: Fix memory leak in live replay
This fixes a memory leak in live replay as follows: $ make ASAN=1 -j8 $ ./uftrace -L. --no-pager t-abc # DURATION TID FUNCTION 1.227 us [126865] | __monstartup(); 0.940 us [126865] | __cxa_atexit(); [126865] | main() { [126865] | a() { [126865] | b() { [126865] | c() { 0.766 us [126865] | getpid(); 1.791 us [126865] | } /* c */ 2.281 us [126865] | } /* b */ 2.714 us [126865] | } /* a */ 3.200 us [126865] | } /* main */ ================================================================= ==126864==ERROR: LeakSanitizer: detected memory leaks Direct leak of 6 byte(s) in 1 object(s) allocated from: #0 0x7fdc57f5034f in strdup (/usr/lib/x86_64-linux-gnu/libasan.so.2+0x6234f) #1 0x499e74 in __read_rstack /home/honggyu/work/uftrace/utils/fstack.c:2160 #2 0x49a1b0 in peek_rstack /home/honggyu/work/uftrace/utils/fstack.c:2230 #3 0x445b5d in command_replay /home/honggyu/work/uftrace/cmds/replay.c:1163 #4 0x438558 in command_live /home/honggyu/work/uftrace/cmds/live.c:158 #5 0x40b6c2 in main /home/honggyu/work/uftrace/uftrace.c:1166 #6 0x7fdc568d682f in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x2082f) Fixed: namhyung#940 Signed-off-by: Byeonggon Lee <[email protected]>
- Loading branch information