This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: dwarf2out suspicious code
- From: Richard Biener <richard dot guenther at gmail dot com>
- To: Nathan Sidwell <nathan at acm dot org>
- Cc: GCC Patches <gcc-patches at gcc dot gnu dot org>, Jan Hubička <honza dot hubicka at gmail dot com>
- Date: Fri, 23 Aug 2019 13:08:43 +0200
- Subject: Re: dwarf2out suspicious code
- References: <f0b3698b-bd2b-c09c-a576-0a4409d99654@acm.org>
On Thu, Aug 22, 2019 at 8:59 PM Nathan Sidwell <nathan@acm.org> wrote:
>
> Honza, Ricard,
>
> I fell over this assert in dwarf2out.c, but the later comment says it
> can happen?? does a checking build fail on LTO?
Huh, certainly loosks odd. So I suggest you try yourself
(with LTO bootstrap?). It was added as a fix for PR45089
though. But that didn't have early debug...
Richard.
> static inline void
> add_AT_die_ref (dw_die_ref die, enum dwarf_attribute attr_kind,
> dw_die_ref targ_die)
> {
> dw_attr_node attr;
> gcc_checking_assert (targ_die != NULL);
>
> /* With LTO we can end up trying to reference something we didn't create
> a DIE for. Avoid crashing later on a NULL referenced DIE. */
> if (targ_die == NULL)
> return;
>
> nathan
> --
> Nathan Sidwell