public inbox for
 help / color / mirror / Atom feed
From: David Malcolm <>
Cc: David Malcolm <>
Subject: [committed] analyzer: fixes to call_summary_replay::dump_to_pp
Date: Thu,  6 Oct 2022 15:50:38 -0400	[thread overview]
Message-ID: <> (raw)

Successfully bootstrapped & regrtested on x86_64-pc-linux-gnu.
Pushed to trunk as r13-3137-g30d6356773a838.

	* (call_summary_replay::dump_to_pp): Bulletproof
	against NULL caller regions/svalues.

Signed-off-by: David Malcolm <>
 gcc/analyzer/ | 10 ++++++++--
 1 file changed, 8 insertions(+), 2 deletions(-)

diff --git a/gcc/analyzer/ b/gcc/analyzer/
index bc50562b5ec..12ef82d18d6 100644
--- a/gcc/analyzer/
+++ b/gcc/analyzer/
@@ -845,14 +845,20 @@ call_summary_replay::dump_to_pp (pretty_printer *pp, bool simple) const
   for (auto summary_reg : summary_regs)
       pp_string (pp, "reg in summary: ");
-      summary_reg->dump_to_pp (pp, simple);
+      if (summary_reg)
+	summary_reg->dump_to_pp (pp, simple);
+      else
+	pp_string (pp, "(null)");
       pp_newline (pp);
       const region *caller_reg
 	= *((const_cast<region_map_t &>
 	     (m_map_region_from_summary_to_caller)).get (summary_reg));
       pp_string (pp, " reg in caller: ");
-      caller_reg->dump_to_pp (pp, simple);
+      if (caller_reg)
+	caller_reg->dump_to_pp (pp, simple);
+      else
+	pp_string (pp, "(null)");
       pp_newline (pp);

                 reply	other threads:[~2022-10-06 19:50 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \ \ \ \

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).