This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] Check for null result from gdb_demangle


* 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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]