This is the mail archive of the
gdb-prs@sourceware.org
mailing list for the GDB project.
[Bug remote/15297] New: CTRl-C with set debug remote often crashes GDB
- From: "jan.kratochvil at redhat dot com" <sourceware-bugzilla at sourceware dot org>
- To: gdb-prs at sourceware dot org
- Date: Fri, 22 Mar 2013 18:08:30 +0000
- Subject: [Bug remote/15297] New: CTRl-C with set debug remote often crashes GDB
- Auto-submitted: auto-generated
http://sourceware.org/bugzilla/show_bug.cgi?id=15297
Bug #: 15297
Summary: CTRl-C with set debug remote often crashes GDB
Product: gdb
Version: HEAD
Status: NEW
Severity: normal
Priority: P2
Component: remote
AssignedTo: unassigned@sourceware.org
ReportedBy: jan.kratochvil@redhat.com
Classification: Unclassified
Host: x86_64-unknown-linux-gnu
async_remote_interrupt and async_remote_interrupt_twice are not signal-safe,
they call functions including stdio.
"set debug remote 1" makes the crash easily reproducible but the code is unsafe
even without it.
#0 __lll_lock_wait_private at
../nptl/sysdeps/unix/sysv/linux/x86_64/lowlevellock.S:95
#1 in _L_lock_12203 at malloc.c:5144
#2 in __GI___libc_malloc at malloc.c:2860
#3 in _IO_vasprintf at vasprintf.c:50
#4 in xstrvprintf at ./common/common-utils.c:130
#5 in vfprintf_unfiltered at utils.c:2341
#6 in fprintf_unfiltered at utils.c:2394
#7 in async_remote_interrupt at remote.c:4942
#8 in call_async_signal_handler at event-loop.c:957
#9 in gdb_call_async_signal_handler at posix-hdep.c:64
#10 in remote_interrupt at remote.c:4981
#11 <signal handler called>
#12 in _int_malloc at malloc.c:3721
#13 in __GI___libc_malloc at malloc.c:2863
#14 in mallochook at mcheck.c:223
#15 in _IO_vasprintf at vasprintf.c:50
#16 in xstrvprintf at ./common/common-utils.c:130
#17 in vfprintf_unfiltered at utils.c:2341
#18 in fprintf_unfiltered at utils.c:2394
#19 in printchar at utils.c:1625
#20 in fputstrn_unfiltered at utils.c:1665
#21 in escape_buffer at remote.c:7099
#22 in getpkt_or_notif_sane_1 at remote.c:7620
#23 in getpkt_or_notif_sane at remote.c:7675
#24 in remote_wait_as at remote.c:5880
#25 in remote_wait at remote.c:5997
#26 in target_wait at target.c:2646
#27 in wait_for_inferior at infrun.c:2732
#28 in proceed at infrun.c:2324
#29 in step_once at infcmd.c:1092
#30 in step_1 at infcmd.c:927
#31 in step_command at infcmd.c:847
#32 in do_cfunc at ./cli/cli-decode.c:113
#33 in cmd_func at ./cli/cli-decode.c:1857
#34 in execute_command at top.c:486
--
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.