public inbox for gdb-prs@sourceware.org
help / color / mirror / Atom feed
From: "jan.kratochvil at redhat dot com" <sourceware-bugzilla@sourceware.org>
To: gdb-prs@sourceware.org
Subject: [Bug remote/15297] New: CTRl-C with set debug remote often crashes GDB
Date: Fri, 22 Mar 2013 18:08:00 -0000	[thread overview]
Message-ID: <bug-15297-4717@http.sourceware.org/bugzilla/> (raw)

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.


             reply	other threads:[~2013-03-22 18:08 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-03-22 18:08 jan.kratochvil at redhat dot com [this message]
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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=bug-15297-4717@http.sourceware.org/bugzilla/ \
    --to=sourceware-bugzilla@sourceware.org \
    --cc=gdb-prs@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).