From: Jason Merrill Date: Wed, 19 Nov 2014 19:03:20 +0000 (-0500) Subject: re PR c++/63928 (use after free in cp/constexpr.c) X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=3bdf0a9ba51c25ab13d5f37e311d77c12aca55ae;p=gcc.git re PR c++/63928 (use after free in cp/constexpr.c) PR c++/63928 * constexpr.c (cxx_eval_store_expression): Return init, not *valp. From-SVN: r217790 --- diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index 13a9965cee8..ac4d2a53f25 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -1,3 +1,8 @@ +2014-11-19 Jason Merrill + + PR c++/63928 + * constexpr.c (cxx_eval_store_expression): Return init, not *valp. + 2014-11-19 Paolo Carlini PR c++/55425 diff --git a/gcc/cp/constexpr.c b/gcc/cp/constexpr.c index d98d9b9259e..77f5159a0fd 100644 --- a/gcc/cp/constexpr.c +++ b/gcc/cp/constexpr.c @@ -2554,7 +2554,7 @@ cxx_eval_store_expression (const constexpr_ctx *ctx, tree t, else if (addr) return target; else - return *valp; + return init; } /* Evaluate a ++ or -- expression. */