Go to file
Florian Weimer 6545746e3c -fstack-protector-strong: Instrumentation for return slots
This patch fixes a loophole in the -fstack-protector-strong protection.
If a function call uses a return slot, the caller needs stack protector
instrumentation because the return slot is addressable. 

gcc/

2014-05-09  Florian Weimer  <fweimer@redhat.com>

	* cfgexpand.c (stack_protect_decl_p): New function, extracted from
	expand_used_vars.
	(stack_protect_return_slot_p): New function.
	(expand_used_vars): Call stack_protect_decl_p and
	stack_protect_return_slot_p for -fstack-protector-strong.

gcc/testsuite/

2014-05-09  Florian Weimer  <fweimer@redhat.com>

	* gcc.dg/fstack-protector-strong.c: Add coverage for return slots.
	* g++.dg/fstack-protector-strong.C: Likewise.
	* gcc.target/i386/ssp-strong-reg.c: New file.

From-SVN: r210275
2014-05-09 14:23:46 +02:00
boehm-gc tree.h (OMP_CLAUSE_LINEAR_GIMPLE_SEQ): Define. 2014-04-24 23:17:32 +02:00
config re PR target/43538 (config/mt-gnu CXXFLAGS_FOR_TARGET) 2014-04-25 08:03:08 +00:00
contrib config-list.mk (show): New target. 2014-05-09 07:25:21 +00:00
fixincludes Remove obsolete Solaris 9 support 2014-04-22 12:30:59 +00:00
gcc -fstack-protector-strong: Instrumentation for return slots 2014-05-09 14:23:46 +02:00
gnattools
include longlong.h: Use 'defined()' to check __mips16. 2014-05-01 15:07:00 +00:00
INSTALL
intl
libada
libatomic
libbacktrace mmap.c (backtrace_free): If freeing a large aligned block of memory, call munmap rather than holding onto it. 2014-05-09 05:01:08 +00:00
libcilkrts
libcpp files.c (find_file_in_dir): Always try to shorten for DOS non-system headers. 2014-05-09 08:50:22 +00:00
libdecnumber
libffi tree.h (OMP_CLAUSE_LINEAR_GIMPLE_SEQ): Define. 2014-04-24 23:17:32 +02:00
libgcc Don't build libgcc-unwind.map with --disable-shared (PR libgcc/61097) 2014-05-08 12:11:14 +00:00
libgfortran check.c (check_co_minmaxsum, [...]): New. 2014-05-08 18:55:23 +02:00
libgo mksysinfo: Define some more non-trivial TIOC constants. 2014-05-07 22:22:29 +00:00
libgomp gimplify.c (gimplify_adjust_omp_clauses_1): Handle GOVD_FIRSTPRIVATE | GOVD_LASTPRIVATE. 2014-05-02 19:43:40 +02:00
libiberty cp-demangle.c (struct d_component_stack): New structure. 2014-05-08 09:13:44 +00:00
libitm
libjava Remove obsolete Solaris 9 support 2014-04-22 12:30:59 +00:00
libobjc
libquadmath
libsanitizer
libssp
libstdc++-v3 re PR libstdc++/61117 (Manual uses term open source but should say free software) 2014-05-08 20:52:40 +01:00
libvtv
lto-plugin
maintainer-scripts
zlib
.dir-locals.el
.gitignore
ABOUT-NLS
ChangeLog MAINTAINERS (Write After Approval): Add myself. 2014-05-07 15:45:32 +00:00
ChangeLog.tree-ssa
compile
config-ml.in
config.guess * config.sub, config.guess: Import from upstream. 2014-05-01 20:51:11 +00:00
config.rpath
config.sub * config.sub, config.guess: Import from upstream. 2014-05-01 20:51:11 +00:00
configure
configure.ac
COPYING
COPYING3
COPYING3.LIB
COPYING.LIB
COPYING.RUNTIME
depcomp
install-sh
libtool-ldflags
libtool.m4
lt~obsolete.m4
ltgcc.m4
ltmain.sh
ltoptions.m4
ltsugar.m4
ltversion.m4
MAINTAINERS MAINTAINERS (Write After Approval): Add myself. 2014-05-07 15:45:32 +00:00
Makefile.def
Makefile.in
Makefile.tpl
missing
mkdep
mkinstalldirs
move-if-change
README
symlink-tree
ylwrap

This directory contains the GNU Compiler Collection (GCC).

The GNU Compiler Collection is free software.  See the files whose
names start with COPYING for copying permission.  The manuals, and
some of the runtime libraries, are under different terms; see the
individual source files for details.

The directory INSTALL contains copies of the installation information
as HTML and plain text.  The source of this information is
gcc/doc/install.texi.  The installation information includes details
of what is included in the GCC sources and what files GCC installs.

See the file gcc/doc/gcc.texi (together with other files that it
includes) for usage and porting information.  An online readable
version of the manual is in the files gcc/doc/gcc.info*.

See http://gcc.gnu.org/bugs/ for how to report bugs usefully.

Copyright years on GCC source files may be listed using range
notation, e.g., 1987-2012, indicating that every year in the range,
inclusive, is a copyrightable year that could otherwise be listed
individually.