This is the mail archive of the gcc-cvs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

r249480 - in /branches/gcc-7-branch/gcc: Change...


Author: jakub
Date: Wed Jun 21 22:17:49 2017
New Revision: 249480

URL: https://gcc.gnu.org/viewcvs?rev=249480&root=gcc&view=rev
Log:
	Backported from mainline
	2017-06-20  Jakub Jelinek  <jakub@redhat.com>

	PR sanitizer/81125
	* ubsan.h (ubsan_encode_value): Workaround buggy clang++ parser
	by removing enum keyword.
	(ubsan_type_descriptor): Likewise.  Formatting fix.

	2017-06-19  Jakub Jelinek  <jakub@redhat.com>

	PR sanitizer/81125
	* ubsan.h (enum ubsan_encode_value_phase): New.
	(ubsan_encode_value): Change second argument to
	enum ubsan_encode_value_phase with default value of
	UBSAN_ENCODE_VALUE_GENERIC.
	* ubsan.c (ubsan_encode_value): Change second argument to
	enum ubsan_encode_value_phase PHASE from bool IN_EXPAND_P,
	adjust uses, for UBSAN_ENCODE_VALUE_GENERIC use just
	create_tmp_var_raw instead of create_tmp_var and use a
	TARGET_EXPR.
	(ubsan_expand_bounds_ifn, ubsan_build_overflow_builtin,
	instrument_bool_enum_load, ubsan_instrument_float_cast): Adjust
	ubsan_encode_value callers.

	PR sanitizer/81111
	* ubsan.c (ubsan_encode_value): If current_function_decl is NULL,
	use create_tmp_var_raw instead of create_tmp_var, mark it addressable
	just by setting TREE_ADDRESSABLE on the result and use a TARGET_EXPR.

	PR sanitizer/81125
	* g++.dg/ubsan/pr81125.C: New test.

	PR sanitizer/81111
	* g++.dg/ubsan/pr81111.C: New test.

Added:
    branches/gcc-7-branch/gcc/testsuite/g++.dg/ubsan/pr81111.C
    branches/gcc-7-branch/gcc/testsuite/g++.dg/ubsan/pr81125.C
Modified:
    branches/gcc-7-branch/gcc/ChangeLog
    branches/gcc-7-branch/gcc/testsuite/ChangeLog
    branches/gcc-7-branch/gcc/ubsan.c
    branches/gcc-7-branch/gcc/ubsan.h


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]