public inbox for gdb-prs@sourceware.org
help / color / mirror / Atom feed
From: "aburgess at redhat dot com" <sourceware-bugzilla@sourceware.org>
To: gdb-prs@sourceware.org
Subject: [Bug cli/28665] CLI commands that cause crash
Date: Tue, 07 Dec 2021 12:17:40 +0000	[thread overview]
Message-ID: <bug-28665-4717-Up08G4VoPQ@http.sourceware.org/bugzilla/> (raw)
In-Reply-To: <bug-28665-4717@http.sourceware.org/bugzilla/>

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

Andrew Burgess <aburgess at redhat dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Last reconfirmed|                            |2021-12-07
             Status|UNCONFIRMED                 |NEW
     Ever confirmed|0                           |1
                 CC|                            |aburgess at redhat dot com

--- Comment #1 from Andrew Burgess <aburgess at redhat dot com> ---
The `list task 123` problem is a result of "task" being a linespec keyword. 
GDB parses the linespec 'task 123' and stops when it sees the keyword 'task'.

As a result the event_location::u::linespec_location::spec_string is left as
nullptr.

Later in event_location_to_sals, the spec_string is passed to parse_linespec,
which doesn't check for the incoming string being nullptr.

The error will reproduce for any location that starts with a keyword, e.g. 

  (gdb) list if (1)
  **crash**

  (gdb) list thread 1
  **crash**

  (gdb) list -force-condition
  **crash**

This seems to be a long standing issue with the location/linespec parsing, its
present at least as far back as the gdb 8.x series.

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

  reply	other threads:[~2021-12-07 12:17 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-12-07 11:01 [Bug cli/28665] New: " gosebam at gmail dot com
2021-12-07 12:17 ` aburgess at redhat dot com [this message]
2021-12-07 16:03 ` [Bug cli/28665] " simark at simark dot ca
2021-12-07 23:25 ` aburgess at redhat dot com
2022-02-02 16:27 ` cvs-commit at gcc dot gnu.org
2022-02-02 16:28 ` cvs-commit at gcc dot gnu.org
2022-02-02 16:28 ` cvs-commit at gcc dot gnu.org
2022-02-02 16:28 ` cvs-commit at gcc dot gnu.org
2022-02-02 16:30 ` aburgess 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-28665-4717-Up08G4VoPQ@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).