Go to file
Ian Lance Taylor 798c183f7f compiler, runtime: Fix unexpected GC interfering with closure passing.
The Go frontend passes closures through to functions using the
functions __go_set_closure and __go_get_closure.  The
expectation is that there are no function calls between
set_closure and get_closure.  However, it turns out that there
can be function calls if some of the function arguments
require type conversion to an interface type.  Converting to
an interface type can allocate memory, and that can in turn
trigger a garbage collection, and that can in turn call pool
cleanup functions that may call __go_set_closure.  So the
called function can see the wrong closure value, which is bad.

This patch fixes the problem in two different ways.  First, we
move all type conversions in function arguments into temporary
variables so that they can not appear before the call to
__go_set_closure.  (This required shifting the flatten phase
after the simplify_thunk phase, since the latter expects to
work with unconverted argument types.)  Second, we fix the
memory allocation function to preserve the closure value
across any possible garbage collection.

A test case is the libgo database/sql check run with the
environment variable GOGC set to 1.

From-SVN: r213932
2014-08-13 22:31:44 +00:00
INSTALL
boehm-gc Enable Java on Cygwin-64 2014-05-13 16:23:11 +00:00
config re PR target/47230 (gcc fails to bootstrap on alpha in stage2 with "relocation truncated to fit: GPREL16 against ...") 2014-07-26 17:11:14 +02:00
contrib texi2pod.pl (postprocess): Move command process for '@sc' to the front of '@dfn'. 2014-08-11 07:29:41 +00:00
fixincludes inclhack.def (complier_h_tradcpp): Remove. 2014-08-12 11:05:24 +00:00
gcc compiler, runtime: Fix unexpected GC interfering with closure passing. 2014-08-13 22:31:44 +00:00
gnattools Makefile.in (TOOLS_FLAGS_TO_PASS_CROSS): Robustify. 2014-02-23 16:30:11 +00:00
include [PR lto/61334] Declare prototype for strnlen, if needed. 2014-06-10 11:45:00 +02:00
intl
libada Makefile.in: Add CFLAGS_FOR_TARGET to GNATLIBCFLAGS_FOR_C. 2014-08-12 19:47:09 +00:00
libatomic configure.tgt (alpha*): Add -mfp-trap-mode=sui to XCFLAGS. 2014-07-18 08:34:20 +02:00
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 configure.ac: Move pthread affinity test to the place where '-pthread' passed to CFLAGS. 2014-08-12 11:06:44 +00:00
libcpp re PR c/51849 (-Wc99-compat would be considered useful) 2014-08-10 06:10:49 +00:00
libdecnumber
libffi ffi.c: Do not include stdlib.h. 2014-07-25 11:01:45 +02:00
libgcc crtstuff.c: Undef caddr_t. 2014-08-13 22:23:16 +00:00
libgfortran * runtime/memory.c (xmallocarray): Avoid division for the common case. 2014-08-04 17:46:33 +02:00
libgo compiler, runtime: Fix unexpected GC interfering with closure passing. 2014-08-13 22:31:44 +00:00
libgomp task.c (GOMP_taskgroup_end): If taskgroup->num_children is not zero... 2014-08-04 17:45:50 +02:00
libiberty demangler-fuzzer.c: New file. 2014-08-13 15:56:38 +00:00
libitm libitm: Improve aarch64 _ITM_beginTransaction 2014-07-24 19:58:06 -07:00
libjava libffi.exp (load_gcc_lib): Register loaded libs. 2014-05-20 08:20:06 +00:00
libobjc re PR libobjc/61920 (libobjc has undefined symbols on powerpc*-linux-gnu) 2014-07-27 13:15:17 +00:00
libquadmath
libsanitizer sanitizer_common_interceptors.inc: Cherry pick upstream r211008. 2014-06-23 19:03:07 +00:00
libssp
libstdc++-v3 re PR libstdc++/61841 (broken std::thread on Hurd) 2014-08-13 19:40:10 +01:00
libvtv
lto-plugin Allow overriding the libiberty used for building the LTO plugin. 2014-06-13 16:30:46 +02:00
maintainer-scripts * update_web_docs_svn: Simplify build of gnat_ugn. 2014-08-01 21:00:14 +02:00
zlib
.dir-locals.el
.gitignore Ignore gcc_update output 2014-06-18 17:47:18 -07:00
ABOUT-NLS
COPYING
COPYING.LIB
COPYING.RUNTIME
COPYING3
COPYING3.LIB
ChangeLog Add myself to Write After Approval list. 2014-08-01 14:40:24 +00:00
ChangeLog.tree-ssa
MAINTAINERS Add myself to Write After Approval list. 2014-08-01 14:40:24 +00:00
Makefile.def Non-host system configuration for linker plugins. 2014-06-13 16:32:16 +02:00
Makefile.in Non-host system configuration for linker plugins. 2014-06-13 16:32:16 +02:00
Makefile.tpl Allow for overriding a module's srcdir. 2014-06-13 16:32:03 +02:00
README
compile
config-ml.in * config-ml.in: Robustify ac_configure_args parsing. 2014-06-13 16:32:29 +02:00
config.guess * config.sub, config.guess: Import from upstream. 2014-05-01 20:51:11 +00:00
config.rpath
config.sub Import config.sub from upstream. No changes to config.guess. 2014-07-28 17:53:25 +00:00
configure re PR target/47230 (gcc fails to bootstrap on alpha in stage2 with "relocation truncated to fit: GPREL16 against ...") 2014-07-26 17:11:14 +02:00
configure.ac re PR target/47230 (gcc fails to bootstrap on alpha in stage2 with "relocation truncated to fit: GPREL16 against ...") 2014-07-26 17:11:14 +02:00
depcomp
install-sh
libtool-ldflags re PR sanitizer/56781 (boostrap-asan failure: fixincl fails to link (missing -lasan)) 2014-04-17 14:23:28 +02:00
libtool.m4
ltgcc.m4
ltmain.sh Ensure libgcc_s unwinder is always used on 64-bit Solaris 10+/x86 (PR target/59788) 2014-02-04 09:31:38 +00:00
ltoptions.m4
ltsugar.m4
ltversion.m4
lt~obsolete.m4
missing
mkdep
mkinstalldirs
move-if-change
symlink-tree
ylwrap

README

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.