public inbox for gcc-cvs@sourceware.org help / color / mirror / Atom feed
From: David Malcolm <dmalcolm@gcc.gnu.org> To: gcc-cvs@gcc.gnu.org Subject: [gcc r13-3137] analyzer: fixes to call_summary_replay::dump_to_pp Date: Thu, 6 Oct 2022 19:48:05 +0000 (GMT) [thread overview] Message-ID: <20221006194805.578553858D37@sourceware.org> (raw) https://gcc.gnu.org/g:30d6356773a838366f6272f7e9900bacb31c44de commit r13-3137-g30d6356773a838366f6272f7e9900bacb31c44de Author: David Malcolm <dmalcolm@redhat.com> Date: Thu Oct 6 15:46:20 2022 -0400 analyzer: fixes to call_summary_replay::dump_to_pp gcc/analyzer/ChangeLog: * call-summary.cc (call_summary_replay::dump_to_pp): Bulletproof against NULL caller regions/svalues. Signed-off-by: David Malcolm <dmalcolm@redhat.com> Diff: --- gcc/analyzer/call-summary.cc | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/gcc/analyzer/call-summary.cc b/gcc/analyzer/call-summary.cc index bc50562b5ec..12ef82d18d6 100644 --- a/gcc/analyzer/call-summary.cc +++ b/gcc/analyzer/call-summary.cc @@ -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:48 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: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=20221006194805.578553858D37@sourceware.org \ --to=dmalcolm@gcc.gnu.org \ --cc=gcc-cvs@gcc.gnu.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe 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).