This is the mail archive of the
gdb-prs@sourceware.org
mailing list for the GDB project.
[Bug threads/19942] New: AddressSanitizer: heap-use-after-free in thread_apply_all_command
- From: "qiyao at gcc dot gnu.org" <sourceware-bugzilla at sourceware dot org>
- To: gdb-prs at sourceware dot org
- Date: Wed, 13 Apr 2016 07:40:52 +0000
- Subject: [Bug threads/19942] New: AddressSanitizer: heap-use-after-free in thread_apply_all_command
- Auto-submitted: auto-generated
https://sourceware.org/bugzilla/show_bug.cgi?id=19942
Bug ID: 19942
Summary: AddressSanitizer: heap-use-after-free in
thread_apply_all_command
Product: gdb
Version: HEAD
Status: NEW
Severity: normal
Priority: P2
Component: threads
Assignee: unassigned at sourceware dot org
Reporter: qiyao at gcc dot gnu.org
Target Milestone: ---
When run threadapply.exp, I get the heap-use-after-free reported by
AddressSanitizer,
thread apply all detach^M
^M
Thread 6 (Thread 31754.31759):^M
Detaching from program:
/scratch/yao/gdb/build-git/aarch64-linux-gnu/gdb/testsuite/outputs/gdb.threads/threadapply/threadapply,
process 31754^M
Ending remote debugging.^M
=================================================================^M
^[[1m^[[31m==906==ERROR: AddressSanitizer: heap-use-after-free on address
0x6160000bfdc0 at pc 0x846e5d bp 0x7fff733313d0 sp 0x7fff733313c8^M
^[[1m^[[0m^[[1m^[[34mREAD of size 4 at 0x6160000bfdc0 thread T0^[[1m^[[0m^M
#0 0x846e5c in thread_alive
/home/yao/SourceCode/gnu/gdb/git/gdb/thread.c:741^M
#1 0x84b2d3 in thread_apply_all_command
/home/yao/SourceCode/gnu/gdb/git/gdb/thread.c:1808^M
#2 0x56c42d in do_cfunc
/home/yao/SourceCode/gnu/gdb/git/gdb/cli/cli-decode.c:105^M
#3 0x5742d8 in cmd_func
/home/yao/SourceCode/gnu/gdb/git/gdb/cli/cli-decode.c:1885^M
#4 0xafe9bc in execute_command
/home/yao/SourceCode/gnu/gdb/git/gdb/top.c:468^M
#5 0x86bbe9 in command_handler
/home/yao/SourceCode/gnu/gdb/git/gdb/event-top.c:463^M
#6 0x86c4ae in command_line_handler
/home/yao/SourceCode/gnu/gdb/git/gdb/event-top.c:651^M
.....
^M
^[[1m^[[32m0x6160000bfdc0 is located 64 bytes inside of 576-byte region
[0x6160000bfd80,0x6160000bffc0)^M
^[[1m^[[0m^[[1m^[[35mfreed by thread T0 here:^[[1m^[[0m^M
#0 0x2b44e413e5c7 in __interceptor_free
(/usr/lib/x86_64-linux-gnu/libasan.so.1+0x545c7)^M
#1 0xb8de8c in xfree
/home/yao/SourceCode/gnu/gdb/git/gdb/common/common-utils.c:100^M
#2 0x84501f in free_thread
/home/yao/SourceCode/gnu/gdb/git/gdb/thread.c:207^M
#3 0x845086 in init_thread_list
/home/yao/SourceCode/gnu/gdb/git/gdb/thread.c:223^M
#4 0x80e04f in detach_command
/home/yao/SourceCode/gnu/gdb/git/gdb/infcmd.c:2980^M
#5 0x56c42d in do_cfunc
/home/yao/SourceCode/gnu/gdb/git/gdb/cli/cli-decode.c:105^M
#6 0x5742d8 in cmd_func
/home/yao/SourceCode/gnu/gdb/git/gdb/cli/cli-decode.c:1885^M
#7 0xafe9bc in execute_command
/home/yao/SourceCode/gnu/gdb/git/gdb/top.c:468^M
#8 0x84b3cc in thread_apply_all_command
/home/yao/SourceCode/gnu/gdb/git/gdb/thread.c:1814^M
--
You are receiving this mail because:
You are on the CC list for the bug.