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 - Crash while printing static variables without global symbols.


SÅawomir Wojtasiak <slawomir.wojtasiak@fcml-lib.com> writes:

> I've found a bug related to the variable printing functionality for C++
> language. The bug showed itself when GDB tried to print a static
> variable and global symbol describing that variable wasn't found in
> object files. I've added a simple sanity checking just to prevent
> accessing an empty pointer in such a case, by skipping
> 'cp_print_static_field' (gdb/cp-varprint.c:329) function.

Thanks for your patch, however the way you post your patch isn't
friendly to people to review it.  You can use 'git send-email'
to send your patch to gdb-patches@, instead of sending a .tgz, so that
people can read your patch in their mailer, and review it easily.

Could you please provide a reproducer, a cpp file, and steps cause gdb
crash, and after your patch, the crash disappeared?  We can convert it
to a dejagnu test case for gdb later.

>
> Attached archive consists of the following files:
> 0001-This-fix-prevents-crashes-while-accessing-static-var.patch - commit
> as git format-path
>
> 0001-This-fix-prevents-crashes-while-accessing-static-var.diff - plain
> diff.
>
> ChangeLog - Change log entry.

We include changelog entry in the git commit message too, please take a
look at https://sourceware.org/gdb/wiki/ContributionChecklist

-- 
Yao (éå)


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