Merge remote branch 'origin/maint-0.2.2'

This commit is contained in:
Nick Mathewson 2010-10-20 13:07:25 -04:00
commit ca7d5dc299
2 changed files with 8 additions and 4 deletions

5
changes/bug2031 Normal file
View File

@ -0,0 +1,5 @@
o Minor bugfixes:
- Enable protection of small arrays whenever we build with gcc hardening
features, not only when also building with warnings enabled. Fixes bug
2031; bugfix on 0.2.2.14-alpha. Reported by keb.

View File

@ -116,8 +116,8 @@ AC_ARG_ENABLE(gcc-hardening,
AS_HELP_STRING(--enable-gcc-hardening, enable compiler security checks),
[if test x$enableval = xyes; then
CFLAGS="$CFLAGS -D_FORTIFY_SOURCE=2 -fstack-protector-all"
CFLAGS="$CFLAGS -fwrapv -fPIE -Wstack-protector -Wformat -Wformat-security"
CFLAGS="$CFLAGS -Wpointer-sign"
CFLAGS="$CFLAGS -fwrapv -fPIE -Wstack-protector"
CFLAGS="$CFLAGS --param ssp-buffer-size=1"
LDFLAGS="$LDFLAGS -pie"
fi])
@ -1011,9 +1011,8 @@ if test x$enable_gcc_warnings = xyes || test x$enable_gcc_warnings_advisory = xy
if test x$have_gcc42 = xyes ; then
# These warnings break gcc 4.0.2 and work on gcc 4.2
# XXXX020 Use -fstack-protector.
# XXXX020 See if any of these work with earlier versions.
CFLAGS="$CFLAGS -Waddress -Wmissing-noreturn -Wnormalized=id -Woverride-init -Wstrict-overflow=1 --param ssp-buffer-size=1"
CFLAGS="$CFLAGS -Waddress -Wmissing-noreturn -Wnormalized=id -Woverride-init -Wstrict-overflow=1"
# We used to use -Wstrict-overflow=5, but that breaks us heavily under 4.3.
fi