public inbox for gcc-cvs@sourceware.org help / color / mirror / Atom feed
From: Andrew Macleod <amacleod@gcc.gnu.org> To: gcc-cvs@gcc.gnu.org Subject: [gcc r12-1539] Avoid loading an undefined value in the ranger_cache constructor. Date: Wed, 16 Jun 2021 17:13:06 +0000 (GMT) [thread overview] Message-ID: <20210616171306.608BF38618BB@sourceware.org> (raw) https://gcc.gnu.org/g:bdfc1207bd20cf1ad81fca121e4f7df4995cc0d6 commit r12-1539-gbdfc1207bd20cf1ad81fca121e4f7df4995cc0d6 Author: Andrew MacLeod <amacleod@redhat.com> Date: Wed Jun 16 13:01:21 2021 -0400 Avoid loading an undefined value in the ranger_cache constructor. Enable_new_values takes a boolean, returning the old value. The constructor for ranger_cache initialized the m_new_value_p field by calling this routine and ignorng the result. This potentially loads the old value uninitialized. * gimple-range-cache.cc (ranger_cache::ranger_cache): Initialize m_new_value_p directly. Diff: --- gcc/gimple-range-cache.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gcc/gimple-range-cache.cc b/gcc/gimple-range-cache.cc index d9a57c294df..37e2acb19f9 100644 --- a/gcc/gimple-range-cache.cc +++ b/gcc/gimple-range-cache.cc @@ -727,7 +727,7 @@ ranger_cache::ranger_cache (gimple_ranger &q) : query (q) if (bb) m_gori.exports (bb); } - enable_new_values (true); + m_new_value_p = true; } ranger_cache::~ranger_cache ()
reply other threads:[~2021-06-16 17:13 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=20210616171306.608BF38618BB@sourceware.org \ --to=amacleod@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).