public inbox for gdb-prs@sourceware.org
help / color / mirror / Atom feed
From: "cvs-commit at gcc dot gnu.org" <sourceware-bugzilla@sourceware.org>
To: gdb-prs@sourceware.org
Subject: [Bug gdb/26761] thread.c:95: internal-error: thread_info* inferior_thread(): Assertion `current_thread_ != nullptr' failed
Date: Mon, 27 Feb 2023 23:21:33 +0000	[thread overview]
Message-ID: <bug-26761-4717-bZGaEMsAX5@http.sourceware.org/bugzilla/> (raw)
In-Reply-To: <bug-26761-4717@http.sourceware.org/bugzilla/>

https://sourceware.org/bugzilla/show_bug.cgi?id=26761

--- Comment #17 from cvs-commit at gcc dot gnu.org <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Kevin Buettner <kevinb@sourceware.org>:

https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=b1ffd1124a8c5170a9e06b867a886b1138d28514

commit b1ffd1124a8c5170a9e06b867a886b1138d28514
Author: Kevin Buettner <kevinb@redhat.com>
Date:   Mon Feb 27 16:11:37 2023 -0700

    Catch gdb_exception_error instead of gdb_exception (in many places)

    As described in the previous commit for this series, I became
    concerned that there might be instances in which a QUIT (due to either
    a SIGINT or SIGTERM) might not cause execution to return to the top
    level.  In some (though very few) instances, it is okay to not
    propagate the exception for a Ctrl-C / SIGINT, but I don't think that
    it is ever okay to swallow the exception caused by a SIGTERM.
    Allowing that to happen would definitely be a deviation from the
    current behavior in which GDB exits upon receipt of a SIGTERM.

    I looked at all cases where an exception handler catches a
    gdb_exception.  Handlers which did NOT need modification were those
    which satisifed one or more of the following conditions:

      1) There is no call path to maybe_quit() in the try block.  I used a
         static analysis tool to help make this determination.  In
         instances where the tool didn't provide an answer of "yes, this
         call path can result in maybe_quit() being called", I reviewed it
         by hand.

      2) The catch block contains a throw for conditions that it
         doesn't want to handle; these "not handled" conditions
         must include the quit exception and the new "forced quit" exception.

      3) There was (also) a catch for gdb_exception_quit.

    Any try/catch blocks not meeting the above conditions could
    potentially swallow a QUIT exception.

    My first thought was to add catch blocks for gdb_exception_quit and
    then rethrow the exception.  But Pedro pointed out that this can be
    handled without adding additional code by simply catching
    gdb_exception_error instead.  That's what this patch series does.

    There are some oddball cases which needed to be handled differently,
    plus the extension languages, but those are handled in later patches.

    Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=26761
    Tested-by: Tom de Vries <tdevries@suse.de>
    Approved-by: Pedro Alves <pedro@palves.net>

-- 
You are receiving this mail because:
You are on the CC list for the bug.

  parent reply	other threads:[~2023-02-27 23:21 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-10-20 16:07 [Bug gdb/26761] New: " vries at gcc dot gnu.org
2020-10-20 16:07 ` [Bug gdb/26761] " vries at gcc dot gnu.org
2020-11-25 21:05 ` marcdufresne at laposte dot net
2020-12-13 13:12 ` ddresser at bmc dot com
2020-12-14 19:04 ` simark at simark dot ca
2020-12-14 19:06 ` simark at simark dot ca
2021-02-17 22:34 ` Minima2014 at iCloud dot com
2021-09-16  1:17 ` parke.nexus at gmail dot com
2021-09-19  2:10 ` simark at simark dot ca
2021-09-19  3:43 ` parke.nexus at gmail dot com
2022-09-29 10:02 ` vries at gcc dot gnu.org
2022-09-29 12:07 ` vries at gcc dot gnu.org
2022-09-29 14:24 ` simark at simark dot ca
2022-09-29 14:42 ` vries at gcc dot gnu.org
2022-09-29 14:43 ` vries at gcc dot gnu.org
2022-09-29 15:22 ` vries at gcc dot gnu.org
2022-12-15 14:56 ` tromey at sourceware dot org
2023-02-27 23:21 ` cvs-commit at gcc dot gnu.org
2023-02-27 23:21 ` cvs-commit at gcc dot gnu.org
2023-02-27 23:21 ` cvs-commit at gcc dot gnu.org [this message]
2023-02-27 23:21 ` cvs-commit at gcc dot gnu.org
2023-02-27 23:21 ` cvs-commit at gcc dot gnu.org
2023-02-27 23:21 ` cvs-commit at gcc dot gnu.org
2023-02-27 23:21 ` cvs-commit at gcc dot gnu.org
2023-02-27 23:21 ` cvs-commit at gcc dot gnu.org
2023-03-09 22:44 ` kevinb at redhat dot com

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-26761-4717-bZGaEMsAX5@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).