public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
* [gcc r13-3137] analyzer: fixes to call_summary_replay::dump_to_pp
@ 2022-10-06 19:48 David Malcolm
0 siblings, 0 replies; only message in thread
From: David Malcolm @ 2022-10-06 19:48 UTC (permalink / raw)
To: gcc-cvs
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);
}
}
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2022-10-06 19:48 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-10-06 19:48 [gcc r13-3137] analyzer: fixes to call_summary_replay::dump_to_pp David Malcolm
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).