This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH] Check for null result from gdb_demangle
- From: Andrew Burgess <andrew dot burgess at embecosm dot com>
- To: Keith Moyer <kmoy at google dot com>
- Cc: Ali Tamur <tamur at google dot com>, gdb-patches at sourceware dot org
- Date: Tue, 18 Feb 2020 10:39:34 +0000
- Subject: Re: [PATCH] Check for null result from gdb_demangle
- References: <20200213063140.129700-1-tamur@google.com> <20200213105257.GT4020@embecosm.com> <CAPci_NUKqtmXdJWnonjCPfC03_=hu3kwv7ARt_CwLm7tJq8zXw@mail.gmail.com>
* Keith Moyer <kmoy@google.com> [2020-02-13 11:20:46 -0800]:
> On Thu, Feb 13, 2020 at 2:52 AM Andrew Burgess <andrew.burgess@embecosm.com>
> wrote:
>
> > If you are able to find an example of a symbol that triggers the crash
> >
>
> The symbol where I ran into the problem was "<anon>". I see references to
> this in GCC sources, but I'm not entirely clear on when this is emitted
> instead of "<anonymous struct>", "<anonymous union>", "<anonymous>", or
> similar.
>
> then it should be pretty easy to add a test, see for example the last
> > few lines of gdb.cp/demangle.exp for C++ demangling tests. Having a
> > test would help something like this happening again.
> >
>
> Given that the bug here is that this code doesn't check for the possibility
> that gdb_demangle can fail (not that it failed), what kind of test would
> you recommend (and where)?
You're absolutely right. Sorry for the confusion. I withdraw my
request.
Thanks,
Andrew