gcc/gcc/doc
Marek Polacek 0e37a2f33d asan.c (pass_sanopt::execute): Handle IFN_UBSAN_BOUNDS.
* asan.c (pass_sanopt::execute): Handle IFN_UBSAN_BOUNDS.
	* flag-types.h (enum sanitize_code): Add SANITIZE_BOUNDS and or it
	into SANITIZE_UNDEFINED.
	* doc/invoke.texi: Describe -fsanitize=bounds.
	* gimplify.c (gimplify_call_expr): Add gimplification of internal
	functions created in the FEs.
	* internal-fn.c: Move "internal-fn.h" after "tree.h".
	(expand_UBSAN_BOUNDS): New function.
	* internal-fn.def (UBSAN_BOUNDS): New internal function.
	* internal-fn.h: Don't define internal functions here.
	* opts.c (common_handle_option): Add -fsanitize=bounds.
	* sanitizer.def (BUILT_IN_UBSAN_HANDLE_OUT_OF_BOUNDS,
	BUILT_IN_UBSAN_HANDLE_OUT_OF_BOUNDS_ABORT): Add.
	* tree-core.h: Define internal functions here.
	(struct tree_base): Add ifn field.
	* tree-pretty-print.c: Include "internal-fn.h".
	(dump_generic_node): Handle functions without CALL_EXPR_FN.
	* tree.c (get_callee_fndecl): Likewise.
	(build_call_expr_internal_loc): New function.
	* tree.def (CALL_EXPR): Update description.
	* tree.h (CALL_EXPR_IFN): Define.
	(build_call_expr_internal_loc): Declare.
	* ubsan.c (get_ubsan_type_info_for_type): Return 0 for non-arithmetic
	types.
	(ubsan_type_descriptor): Change bool parameter to enum
	ubsan_print_style.  Adjust the code.  Add handling of
	UBSAN_PRINT_ARRAY.
	(ubsan_expand_bounds_ifn): New function.
	(ubsan_expand_null_ifn): Adjust ubsan_type_descriptor call.
	(ubsan_build_overflow_builtin): Likewise.
	(instrument_bool_enum_load): Likewise.
	(ubsan_instrument_float_cast): Likewise.
	* ubsan.h (enum ubsan_print_style): New enum.
	(ubsan_expand_bounds_ifn): Declare.
	(ubsan_type_descriptor): Adjust declaration.  Use a default parameter.
c-family/
	* c-gimplify.c: Include "c-ubsan.h" and "pointer-set.h".
	(ubsan_walk_array_refs_r): New function.
	(c_genericize): Instrument array bounds.
	* c-ubsan.c: Include "internal-fn.h".
	(ubsan_instrument_division): Mark instrumented arrays as having
	side effects.  Adjust ubsan_type_descriptor call.
	(ubsan_instrument_shift): Likewise.
	(ubsan_instrument_vla): Adjust ubsan_type_descriptor call.
	(ubsan_instrument_bounds): New function.
	(ubsan_array_ref_instrumented_p): New function.
	(ubsan_maybe_instrument_array_ref): New function.
	* c-ubsan.h (ubsan_instrument_bounds): Declare.
	(ubsan_array_ref_instrumented_p): Declare.
	(ubsan_maybe_instrument_array_ref): Declare.
testsuite/
	* c-c++-common/ubsan/bounds-1.c: New test.
	* c-c++-common/ubsan/bounds-2.c: New test.
	* c-c++-common/ubsan/bounds-3.c: New test.
	* c-c++-common/ubsan/bounds-4.c: New test.
	* c-c++-common/ubsan/bounds-5.c: New test.
	* c-c++-common/ubsan/bounds-6.c: New test.

From-SVN: r211859
2014-06-20 21:20:51 +00:00
..
include Update copyright years in gcc/ 2014-01-02 22:23:26 +00:00
aarch64-acle-intrinsics.texi [AArch64] Implement CRC32 ACLE intrinsics. 2014-06-11 09:17:18 +00:00
arm-acle-intrinsics.texi [ARM][doc] Improve description of AArch32 CRC32 intrinsics. 2014-06-10 09:50:22 +00:00
arm-neon-intrinsics.texi Neon intrinsics TLC - remove ML 2014-05-08 14:35:40 +00:00
avr-mmcu.texi avr-mcus.def: Add new avr25 devices attiny441, attiny828 and attiny841. 2014-06-03 20:26:09 +04:00
bugreport.texi re PR other/59055 (gcc.texinfo warnings) 2014-04-11 14:47:20 +02:00
cfg.texi Update copyright years in gcc/ 2014-01-02 22:23:26 +00:00
collect2.texi Update copyright years in gcc/ 2014-01-02 22:23:26 +00:00
compat.texi Update copyright years in gcc/ 2014-01-02 22:23:26 +00:00
configfiles.texi Update copyright years in gcc/ 2014-01-02 22:23:26 +00:00
configterms.texi Update copyright years in gcc/ 2014-01-02 22:23:26 +00:00
contrib.texi * doc/contrib.texi: Add myself as Andes nds32 port contributor. 2014-03-26 02:59:36 +00:00
contribute.texi Update copyright years in gcc/ 2014-01-02 22:23:26 +00:00
cpp.texi gnat_ugn.texi: Bump @copying's copyright year. 2014-01-02 22:25:41 +01:00
cppenv.texi Update copyright years in gcc/ 2014-01-02 22:23:26 +00:00
cppinternals.texi gnat_ugn.texi: Bump @copying's copyright year. 2014-01-02 22:25:41 +01:00
cppopts.texi Update copyright years in gcc/ 2014-01-02 22:23:26 +00:00
extend.texi re PR testsuite/61415 (PowerPC test gcc.target/powerpc/tfmode_off.c fails if -mlong-double-64) 2014-06-13 13:42:53 -05:00
fragments.texi Update copyright years in gcc/ 2014-01-02 22:23:26 +00:00
frontends.texi Update copyright years in gcc/ 2014-01-02 22:23:26 +00:00
gcc.texi re PR other/59055 (gcc.texinfo warnings) 2014-04-11 14:47:20 +02:00
gccint.texi gnat_ugn.texi: Bump @copying's copyright year. 2014-01-02 22:25:41 +01:00
gcov.texi Update copyright years in gcc/ 2014-01-02 22:23:26 +00:00
generic.texi Merge in wide-int. 2014-05-06 16:25:05 +00:00
gimple.texi Add a class hierarchy diagram to gimple.texi 2014-04-28 21:02:28 +00:00
gnu.texi
gty.texi use templates instead of gengtype for typed allocation functions 2014-05-17 23:07:23 +00:00
headerdirs.texi Update copyright years in gcc/ 2014-01-02 22:23:26 +00:00
hostconfig.texi Update copyright years in gcc/ 2014-01-02 22:23:26 +00:00
implement-c.texi re PR c/57773 (-Wpedantic incorrect warning for enum bit-field) 2014-01-06 18:53:01 +00:00
implement-cxx.texi Update copyright years in gcc/ 2014-01-02 22:23:26 +00:00
install-old.texi Update copyright years in gcc/ 2014-01-02 22:23:26 +00:00
install.texi Non-host system configuration for linker plugins. 2014-06-13 16:32:16 +02:00
install.texi2html Update copyright years in gcc/ 2014-01-02 22:23:26 +00:00
interface.texi Update copyright years in gcc/ 2014-01-02 22:23:26 +00:00
invoke.texi asan.c (pass_sanopt::execute): Handle IFN_UBSAN_BOUNDS. 2014-06-20 21:20:51 +00:00
languages.texi Update copyright years in gcc/ 2014-01-02 22:23:26 +00:00
libgcc.texi Update copyright years in gcc/ 2014-01-02 22:23:26 +00:00
loop.texi loop.texi: Remove section on the removed lambda framework. 2014-03-18 12:28:04 +00:00
lto.texi lto.texi (fresolution): Fix typo. 2014-03-18 12:35:28 +00:00
makefile.texi Update copyright years in gcc/ 2014-01-02 22:23:26 +00:00
md.texi md.texi (Standard Names): Use @itemx for grouped items. 2014-06-18 15:01:32 +00:00
objc.texi Update copyright years in gcc/ 2014-01-02 22:23:26 +00:00
optinfo.texi optinfo.texi: Fix order of nodes. 2014-02-13 21:43:53 +00:00
options.texi opts.h (CL_PCH_IGNORE): Define. 2014-03-03 21:51:58 +00:00
passes.texi gengtype-state.c (fatal_reading_state): Bring offline. 2014-05-24 17:12:28 +00:00
plugins.texi plugin.def: Improve comment for PLUGIN_INCLUDE_FILE. 2014-03-18 19:16:52 +00:00
portability.texi Update copyright years in gcc/ 2014-01-02 22:23:26 +00:00
rtl.texi Merge in wide-int. 2014-05-06 16:25:05 +00:00
service.texi Update copyright years in gcc/ 2014-01-02 22:23:26 +00:00
sourcebuild.texi re PR testsuite/61415 (PowerPC test gcc.target/powerpc/tfmode_off.c fails if -mlong-double-64) 2014-06-13 13:42:53 -05:00
standards.texi Update copyright years in gcc/ 2014-01-02 22:23:26 +00:00
tm.texi Update definition of call_fusage_contains_non_callee_clobbers 2014-06-20 18:28:12 +00:00
tm.texi.in re PR target/61300 (powerpc64le miscompile with K&R-style function definition at -O0) 2014-06-06 10:34:22 +09:30
tree-ssa.texi Makefile.in (TREE_FLOW_H): Remove. 2014-01-09 21:02:43 +00:00
trouble.texi Update copyright years in gcc/ 2014-01-02 22:23:26 +00:00