Patch committed: Fix demangler crash
H.J. Lu
hjl.tools@gmail.com
Tue Jul 26 16:09:00 GMT 2011
On Tue, Jul 26, 2011 at 7:30 AM, Ian Lance Taylor <iant@google.com> wrote:
> binutils PR 13030 reports a demangler crash on the symbol
> _ZSt10_ConstructI10CellBorderIS0_EEvPT_DpOT0_
>
> As far as I can tell, this symbol is invalid. The final T0_ refers to
> template argument 1, but this zero-based index has no referent since the
> template only has one parameter. This of course suggests a compiler
> bug. CC'ing Jason because this involves template packs which I haven't
> looked into very much.
>
> I committed this patch to avoid the crash in the demangler.
>
> Ian
>
>
> 2011-07-26 Ian Lance Taylor <iant@google.com>
>
> * cp-demangle.c (d_print_init): Initialize pack_index field.
> (d_print_comp): Check for NULL template argument.
> * testsuite/demangle-expected: Add test case.
>
Could you please also check it into binutils?
Thanks.
--
H.J.
More information about the Gcc-patches
mailing list