public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
* [gcc/devel/c++-coroutines] Correct calls to vec::safe_grow in conditionally compiled code.
@ 2020-08-28 19:45 Iain D Sandoe
0 siblings, 0 replies; only message in thread
From: Iain D Sandoe @ 2020-08-28 19:45 UTC (permalink / raw)
To: gcc-cvs
https://gcc.gnu.org/g:1ad755dcbbd56c0524ed4028f790a37a139138c5
commit 1ad755dcbbd56c0524ed4028f790a37a139138c5
Author: Martin Sebor <msebor@redhat.com>
Date: Fri Aug 28 08:31:50 2020 -0600
Correct calls to vec::safe_grow in conditionally compiled code.
gcc/ChangeLog:
* ggc-common.c (gt_pch_save): Add argument to a call.
gcc/jit/ChangeLog:
* jit-recording.c (recording::switch_::make_debug_string): Add argument
to a call.
Diff:
---
gcc/ggc-common.c | 2 +-
gcc/jit/jit-recording.c | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/gcc/ggc-common.c b/gcc/ggc-common.c
index 0d528cf455c..94da02f1185 100644
--- a/gcc/ggc-common.c
+++ b/gcc/ggc-common.c
@@ -506,7 +506,7 @@ gt_pch_save (FILE *f)
if (__builtin_expect (RUNNING_ON_VALGRIND, 0))
{
if (vbits.length () < valid_size)
- vbits.safe_grow (valid_size);
+ vbits.safe_grow (valid_size, true);
get_vbits = VALGRIND_GET_VBITS (state.ptrs[i]->obj,
vbits.address (), valid_size);
if (get_vbits == 3)
diff --git a/gcc/jit/jit-recording.c b/gcc/jit/jit-recording.c
index b73cd76a0a0..a9e6528db69 100644
--- a/gcc/jit/jit-recording.c
+++ b/gcc/jit/jit-recording.c
@@ -6310,7 +6310,7 @@ recording::switch_::make_debug_string ()
{
size_t len = strlen (c->get_debug_string ());
unsigned idx = cases_str.length ();
- cases_str.safe_grow (idx + 1 + len);
+ cases_str.safe_grow (idx + 1 + len, true);
cases_str[idx] = ' ';
memcpy (&(cases_str[idx + 1]),
c->get_debug_string (),
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2020-08-28 19:45 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-08-28 19:45 [gcc/devel/c++-coroutines] Correct calls to vec::safe_grow in conditionally compiled code Iain D Sandoe
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).