Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This patch is to fix the following heap buffer overflow problem. $ uftrace record --force gcc hello.c $ uftrace replay --no-pager ... ================================================================= ==79233==ERROR: AddressSanitizer: heap-buffer-overflow on address 0x62e00003c3e8 at pc 0x00000047e08e bp 0x7ffec89b7cd0 sp 0x7ffec89b7cc0 READ of size 8 at 0x62e00003c3e8 thread T0 #0 0x47e08d in fstack_check_skip /home/honggyu/uftrace/utils/fstack.c:683 #1 0x47e9af in fstack_skip /home/honggyu/uftrace/utils/fstack.c:780 #2 0x43e24e in print_graph_rstack /home/honggyu/uftrace/cmds/replay.c:987 #3 0x43f49b in command_replay /home/honggyu/uftrace/cmds/replay.c:1172 #4 0x40b7f1 in main /home/honggyu/uftrace/uftrace.c:1184 #5 0x7f8ecb67e82f in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x2082f) #6 0x405bf8 in _start (/home/honggyu/usr/bin/uftrace+0x405bf8) 0x62e00003c3e8 is located 24 bytes to the left of 40960-byte region [0x62e00003c400,0x62e000046400) allocated by thread T0 here: #0 0x7f8eccd2e7fa in __interceptor_calloc (/usr/lib/x86_64-linux-gnu/libasan.so.2+0x987fa) #1 0x479eca in setup_task_handle /home/honggyu/uftrace/utils/fstack.c:61 #2 0x47b0e2 in fstack_setup_task /home/honggyu/uftrace/utils/fstack.c:211 #3 0x47c23b in fstack_setup_filters /home/honggyu/uftrace/utils/fstack.c:443 #4 0x43f266 in command_replay /home/honggyu/uftrace/cmds/replay.c:1144 #5 0x40b7f1 in main /home/honggyu/uftrace/uftrace.c:1184 #6 0x7f8ecb67e82f in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x2082f) SUMMARY: AddressSanitizer: heap-buffer-overflow /home/honggyu/uftrace/utils/fstack.c:683 fstack_check_skip Fixed: namhyung#803 Signed-off-by: Honggyu Kim <[email protected]>
- Loading branch information