[Bug sanitizer/80386] UBSAN: false positive - constant folding and reassosiation before instrumentation
mpolacek at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Tue May 16 19:47:00 GMT 2017
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80386
--- Comment #6 from Marek Polacek <mpolacek at gcc dot gnu.org> ---
Author: mpolacek
Date: Tue May 16 19:25:04 2017
New Revision: 248124
URL: https://gcc.gnu.org/viewcvs?rev=248124&root=gcc&view=rev
Log:
PR sanitizer/80536
PR sanitizer/80386
* cp-gimplify.c (cp_fold): Handle SAVE_EXPR.
* tree.c (save_expr): Don't fold the expression.
* c-c++-common/ubsan/pr80536.c: New test.
* g++.dg/ubsan/pr80386.C: New test.
Added:
trunk/gcc/testsuite/c-c++-common/ubsan/pr80536.c
trunk/gcc/testsuite/g++.dg/ubsan/pr80386.C
Modified:
trunk/gcc/ChangeLog
trunk/gcc/cp/ChangeLog
trunk/gcc/cp/cp-gimplify.c
trunk/gcc/testsuite/ChangeLog
trunk/gcc/tree.c
More information about the Gcc-bugs
mailing list