public inbox for gdb-prs@sourceware.org
help / color / mirror / Atom feed
* [Bug remote/15297] New: CTRl-C with set debug remote often crashes GDB
@ 2013-03-22 18:08 jan.kratochvil at redhat dot com
  2013-03-25 16:10 ` [Bug remote/15297] " tromey at redhat dot com
                   ` (8 more replies)
  0 siblings, 9 replies; 10+ messages in thread
From: jan.kratochvil at redhat dot com @ 2013-03-22 18:08 UTC (permalink / raw)
  To: gdb-prs

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.


^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2023-02-15 21:34 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-03-22 18:08 [Bug remote/15297] New: CTRl-C with set debug remote often crashes GDB jan.kratochvil at redhat dot com
2013-03-25 16:10 ` [Bug remote/15297] " tromey at redhat dot com
2013-03-27 16:36 ` [Bug remote/15297] CTRL-C " jan.kratochvil at redhat dot com
2013-04-12  8:35 ` jan.kratochvil at redhat dot com
2013-04-12  8:36 ` jan.kratochvil at redhat dot com
2013-06-25  7:31 ` jan.kratochvil at redhat dot com
2013-06-25 11:45 ` jan.kratochvil at redhat dot com
2013-07-01 20:37 ` jan.kratochvil at redhat dot com
2013-07-03  5:31 ` jan.kratochvil at redhat dot com
2023-02-15 21:34 ` pedro at palves dot net

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).