From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 16790 invoked by alias); 22 Mar 2013 18:08:32 -0000 Mailing-List: contact gdb-prs-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-prs-owner@sourceware.org Received: (qmail 16765 invoked by uid 48); 22 Mar 2013 18:08:31 -0000 From: "jan.kratochvil at redhat dot com" 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 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gdb X-Bugzilla-Component: remote X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: jan.kratochvil at redhat dot com X-Bugzilla-Status: NEW X-Bugzilla-Priority: P2 X-Bugzilla-Assigned-To: unassigned at sourceware dot org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Changed-Fields: Message-ID: X-Bugzilla-URL: http://sourceware.org/bugzilla/ Auto-Submitted: auto-generated Content-Type: text/plain; charset="UTF-8" MIME-Version: 1.0 X-SW-Source: 2013-q1/txt/msg00494.txt.bz2 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 #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.