We weren't reading in shadowed labels properly. The local variable *sl also turned out to ...
13 years, 10 months ago
(2011-06-14 17:59:35 UTC)
#1
We weren't reading in shadowed labels properly.
The local variable *sl also turned out to be useless, the compiler just didn't
mention it until now as it was "used" by the bad VEC_iterate call.
This doesn't fix any currently exposed pph bugs, but does help with me with
the patch I'm currently writting.
This was tested with a bootstrap build and pph regression testing.
2011-06-14 Gabriel Charette <gchare@google.com>
* pph-streamer-in.c (pph_in_binding_level): Fix read
of shadowed_labels.
(pph_in_binding_level): Removed *sl.
Index: pph-streamer-in.c
===================================================================
--- pph-streamer-in.c (revision 174998)
+++ pph-streamer-in.c (working copy)
@@ -427,7 +427,6 @@
pph_in_binding_level (pph_stream *stream)
{
unsigned i, num, ix;
- cp_label_binding *sl;
struct cp_binding_level *bl;
struct bitpack_d bp;
enum pph_record_marker marker;
@@ -461,7 +460,7 @@
num = pph_in_uint (stream);
bl->shadowed_labels = NULL;
- for (i = 0; VEC_iterate (cp_label_binding, bl->shadowed_labels, i, sl); i++)
+ for (i = 0; i < num; i++)
{
cp_label_binding *sl = pph_in_label_binding (stream);
VEC_safe_push (cp_label_binding, gc, bl->shadowed_labels, sl);
--
This patch is available for review at http://codereview.appspot.com/4589054
Issue 4589054: [pph] pph_in_binding_level fixing shadowed_labels read
(Closed)
Created 13 years, 10 months ago by Gabriel Charette
Modified 13 years, 10 months ago
Reviewers: Lawrence Crowl, Diego Novillo
Base URL: svn://gcc.gnu.org/svn/gcc/branches/pph/gcc/cp/
Comments: 0