Go to file
Janne Blomqvist 581d232670 PR 60324 Unbounded stack allocations in libgfortran.
2014-11-13  Janne Blomqvist  <jb@gcc.gnu.org>

	PR libfortran/60324
	* configure: Regenerated.
	* configure.ac (AM_CFLAGS): Add Werror=vla.
	* libgfortran.h (gfc_alloca): Remove macro.
	(fc_strdup_notrim): New prototype.
	* intrinsics/access.c (access_func): Use fc_strdup rather than
	stack allocation.
	* intrinsics/chdir.c (chdir_i4_sub): Likewise.
	(chdir_i8_sub): Likewise.
	* intrinsics/chmod.c (chmod_internal): New function, move logic
	here.
	(chmod_func): Call chmod_internal.
	* intrinsics/env.c (getenv): Use fc_strdup rather than stack
	allocation.
	(get_environment_variable_i4): Likewise.
	* intrinsics/execute_command_line.c (execute_command_line):
	Likewise.
	* intrinsics/hostnm.c (hostnm_0): New function, use static buffer
	rather than VLA.
	(hostnm_i4_sub): Call hostnm_0.
	(hostnm_i8_sub): Likewise.
	(hostnm): Likewise.
	* intrinsics/link.c (link_internal): New function, use fc_strdup
	rather than stack allocation.
	(link_i4_sub): Call link_internal.
	(link_i8_sub): Likewise.
	(link_i4): Likewise.
	(link_i8): Likewise.
	* intrinsics/perror.c (perror_sub): Use fc_strdup rather than
	stack allocation.
	* intrinsics/random.c (random_seed_i4): Use static buffer rather
	than VLA, use _Static_assert to make sure it's big enough.
	* intrinsics/rename.c (rename_internal): New function, use
	fc_strdup rather than stack allocation.
	(rename_i4_sub): Call rename_internal.
	(rename_i8_sub): Likewise.
	(rename_i4): Likewise.
	(rename_i8): Likewise.
	* intrinsics/stat.c (stat_i4_sub_0): Use fc_strdup rather than
	stack allocation.
	(stat_i8_sub_0): Likewise.
	* intrinsics/symlink.c (symlnk_internal): New function, use
	fc_strdup rather than stack allocation.
	(symlnk_i4_sub): Call symlnk_internal.
	(symlnk_i8_sub): Likewise.
	(symlnk_i4): Likewise.
	(symlnk_i8): Likewise.
	* intrinsics/system.c (system_sub): Use fc_strdup rather than
	stack allocation.
	* intrinsics/unlink.c (unlink_i4_sub): Likewise.
	* io/file_pos.c (READ_CHUNK): Make it a macro rather than variable.
	* io/list_read.c (nml_get_obj_data): Use fixed stack buffer, fall
	back to xmalloc/free for large sizes.
	* io/read.c (read_f): Likewise.
	* io/transfer.c (MAX_READ): Make it a macro rather than variable.
	(WRITE_CHUNK): Likewise.
	* io/write_float.def (write_float): Use fixed stack buffer, fall
	back to xmalloc/free for large sizes.
	* runtime/string.c (fc_strdup_notrim): New function.

From-SVN: r217480
2014-11-13 14:05:01 +02:00
boehm-gc re PR target/63610 (Fixing the libtool bug for Yosemite (darwin14)) 2014-11-11 20:25:18 +00:00
config
contrib Merger of dmalcolm/jit branch from git 2014-11-11 21:55:52 +00:00
fixincludes
gcc tm.texi.in (SELECT_CC_MODE): Update example. 2014-11-13 11:44:26 +00:00
gnattools
include re PR driver/36312 (should refuse to overwrite input file with output file) 2014-11-11 23:33:25 +00:00
INSTALL
intl
libada
libatomic re PR target/63610 (Fixing the libtool bug for Yosemite (darwin14)) 2014-11-11 20:25:18 +00:00
libbacktrace Merger of dmalcolm/jit branch from git 2014-11-11 21:55:52 +00:00
libcc1 Enable libcc1 on Solaris 2014-11-13 10:22:22 +00:00
libcilkrts re PR target/63610 (Fixing the libtool bug for Yosemite (darwin14)) 2014-11-11 20:25:18 +00:00
libcpp line-map.h: Include EXPR, so that unused variable warnings do not occur. 2014-11-13 10:46:56 +00:00
libdecnumber Merger of dmalcolm/jit branch from git 2014-11-11 21:55:52 +00:00
libffi re PR target/63610 (Fixing the libtool bug for Yosemite (darwin14)) 2014-11-11 20:25:18 +00:00
libgcc divmodhi.S: Add support for the G10 architecture. 2014-11-13 08:34:41 +00:00
libgfortran PR 60324 Unbounded stack allocations in libgfortran. 2014-11-13 14:05:01 +02:00
libgo libgo: Update libtool support to files in current GCC trunk. 2014-11-12 03:51:36 +00:00
libgomp re PR target/63610 (Fixing the libtool bug for Yosemite (darwin14)) 2014-11-11 20:25:18 +00:00
libiberty Cast strtol return to unsigned long 2014-11-12 08:24:30 -08:00
libitm re PR target/63610 (Fixing the libtool bug for Yosemite (darwin14)) 2014-11-11 20:25:18 +00:00
libjava re PR target/63610 (Fixing the libtool bug for Yosemite (darwin14)) 2014-11-11 20:25:18 +00:00
libobjc re PR target/63610 (Fixing the libtool bug for Yosemite (darwin14)) 2014-11-11 20:25:18 +00:00
libquadmath re PR target/63610 (Fixing the libtool bug for Yosemite (darwin14)) 2014-11-11 20:25:18 +00:00
libsanitizer re PR target/63610 (Fixing the libtool bug for Yosemite (darwin14)) 2014-11-11 20:25:18 +00:00
libssp re PR target/63610 (Fixing the libtool bug for Yosemite (darwin14)) 2014-11-11 20:25:18 +00:00
libstdc++-v3 re PR libstdc++/63775 ([C++11] Regex range with leading dash (-) not working) 2014-11-13 07:40:01 +00:00
libvtv re PR target/63610 (Fixing the libtool bug for Yosemite (darwin14)) 2014-11-11 20:25:18 +00:00
lto-plugin re PR target/63610 (Fixing the libtool bug for Yosemite (darwin14)) 2014-11-11 20:25:18 +00:00
maintainer-scripts
zlib Merger of dmalcolm/jit branch from git 2014-11-11 21:55:52 +00:00
.dir-locals.el
.gitignore
ABOUT-NLS
ChangeLog Fix ChangeLog of previous commit, r217438: 2014-11-12 19:45:17 +01:00
ChangeLog.jit Merger of dmalcolm/jit branch from git 2014-11-11 21:55:52 +00:00
ChangeLog.tree-ssa
compile
config-ml.in
config.guess
config.rpath
config.sub
configure
configure.ac
COPYING
COPYING3
COPYING3.LIB
COPYING.LIB
COPYING.RUNTIME
depcomp
install-sh
libtool-ldflags
libtool.m4 re PR target/63610 (Fixing the libtool bug for Yosemite (darwin14)) 2014-11-11 20:25:18 +00:00
lt~obsolete.m4
ltgcc.m4
ltmain.sh
ltoptions.m4
ltsugar.m4
ltversion.m4
MAINTAINERS Merger of dmalcolm/jit branch from git 2014-11-11 21:55:52 +00:00
Makefile.def Makefile.def: Remove CLooG. 2014-11-12 19:42:03 +01:00
Makefile.in Makefile.def: Remove CLooG. 2014-11-12 19:42:03 +01:00
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.