Skip to content

Commit fddc82d

Browse files
committed
Merge branch 'master' into slim-postdata
* master: (62 commits) removed unused vars fixed strndup usage in the pgsql ext Fixes to unified stdint usage Fixed bug #65382 (Segfault in closure_030.phpt) Revise pgsql test files Revise pgsql test for Travis CI Add 00version.phpt to get server/protocol/client version. Revise test script description use mysqlnd, some tests fail otherwise ensure notices are not ignored when tests need them Embeds the content of the DTD in the DOCTYPE declaration of the XML files. Adds 2 new xml files which include the dtd path relative to the base directory for the php source code. It fixs the fail on the load of the dtd in the tests modified by this commit. Adds files: error 1 to 5 and variation 1 to 4 Fix #61345: fix install of CGI binary Fix #61345: fix install of CGI binary php.ini-development/production: remove php_zip.dll Update NEWS Update NEWS Fixed possible buffer overflow under Windows. Note: Not a security fix. Fixed Bug #62015 Changed session.auto_start to PHP_INI_PERDIR. It is simply wrong and never worked if the value is changed at runtime Implemented Request #20421 (session_abort() and session_reset() function ... Conflicts: sapi/cli/tests/upload_2G.phpt
2 parents 15c351c + c5674bb commit fddc82d

File tree

177 files changed

+2103
-541
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

177 files changed

+2103
-541
lines changed

Makefile.global

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@ clean:
120120
distclean: clean
121121
rm -f Makefile config.cache config.log config.status Makefile.objects Makefile.fragments libtool main/php_config.h main/internal_functions_cli.c main/internal_functions.c stamp-h sapi/apache/libphp$(PHP_MAJOR_VERSION).module sapi/apache_hooks/libphp$(PHP_MAJOR_VERSION).module buildmk.stamp Zend/zend_dtrace_gen.h Zend/zend_dtrace_gen.h.bak Zend/zend_config.h TSRM/tsrm_config.h
122122
rm -f php5.spec main/build-defs.h scripts/phpize
123-
rm -f ext/date/lib/timelib_config.h ext/mbstring/oniguruma/config.h ext/mbstring/libmbfl/config.h ext/mysqlnd/php_mysqlnd_config.h ext/oci8/oci8_dtrace_gen.h ext/oci8/oci8_dtrace_gen.h.bak
123+
rm -f ext/date/lib/timelib_config.h ext/mbstring/oniguruma/config.h ext/mbstring/libmbfl/config.h ext/oci8/oci8_dtrace_gen.h ext/oci8/oci8_dtrace_gen.h.bak
124124
rm -f scripts/man1/phpize.1 scripts/php-config scripts/man1/php-config.1 sapi/cli/php.1 sapi/cgi/php-cgi.1 ext/phar/phar.1 ext/phar/phar.phar.1
125125
rm -f sapi/fpm/php-fpm.conf sapi/fpm/init.d.php-fpm sapi/fpm/php-fpm.service sapi/fpm/php-fpm.8 sapi/fpm/status.html
126126
rm -f ext/iconv/php_have_bsd_iconv.h ext/iconv/php_have_glibc_iconv.h ext/iconv/php_have_ibm_iconv.h ext/iconv/php_have_iconv.h ext/iconv/php_have_libiconv.h ext/iconv/php_iconv_aliased_libiconv.h ext/iconv/php_iconv_supports_errno.h ext/iconv/php_php_iconv_h_path.h ext/iconv/php_php_iconv_impl.h

UPGRADING

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -93,3 +93,5 @@ PHP X.Y UPGRADE NOTES
9393
11. Other Changes
9494
========================================
9595

96+
- File upload:
97+
Uploads equal or greater than 2GB in size are now accepted.

UPGRADING.INTERNALS

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,9 @@ UPGRADE NOTES - PHP X.Y
4848
========================
4949

5050
a. Unix build system changes
51-
-
51+
- The bison version check is now a blacklist instead of a whitelist.
52+
- The bison binary can be specified through the YACC environment/configure
53+
variable. Previously `bison` was assumed to be in $PATH.
5254

5355
b. Windows build system changes
5456
-

Zend/acinclude.m4

Lines changed: 19 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -3,32 +3,41 @@ dnl
33
dnl This file contains local autoconf functions.
44

55
AC_DEFUN([LIBZEND_BISON_CHECK],[
6-
# we only support certain bison versions
7-
bison_version_list="2.4 2.4.1 2.4.2 2.4.3 2.5 2.5.1 2.6 2.6.1 2.6.2 2.6.3 2.6.4 2.6.5 2.7"
6+
# we only support certain bison versions;
7+
# min: 2.4 (i.e. 204, major * 100 + minor for easier comparison)
8+
bison_version_min="204"
9+
# non-working versions, e.g. "3.0 3.2";
10+
# remove "none" when introducing the first incompatible bison version an
11+
# separate any following additions by spaces
12+
bison_version_exclude="none"
813
914
# for standalone build of Zend Engine
1015
test -z "$SED" && SED=sed
1116
1217
bison_version=none
1318
if test "$YACC"; then
1419
AC_CACHE_CHECK([for bison version], php_cv_bison_version, [
15-
bison_version_vars=`bison --version 2> /dev/null | grep 'GNU Bison' | cut -d ' ' -f 4 | $SED -e 's/\./ /' | tr -d a-z`
20+
bison_version_vars=`$YACC --version 2> /dev/null | grep 'GNU Bison' | cut -d ' ' -f 4 | $SED -e 's/\./ /g' | tr -d a-z`
1621
php_cv_bison_version=invalid
1722
if test -n "$bison_version_vars"; then
1823
set $bison_version_vars
1924
bison_version="${1}.${2}"
20-
for bison_check_version in $bison_version_list; do
21-
if test "$bison_version" = "$bison_check_version"; then
22-
php_cv_bison_version="$bison_check_version (ok)"
23-
break
24-
fi
25-
done
25+
bison_version_num="`expr ${1} \* 100 + ${2}`"
26+
if test $bison_version_num -ge $bison_version_min; then
27+
php_cv_bison_version="$bison_version (ok)"
28+
for bison_check_version in $bison_version_exclude; do
29+
if test "$bison_version" = "$bison_check_version"; then
30+
php_cv_bison_version=invalid
31+
break
32+
fi
33+
done
34+
fi
2635
fi
2736
])
2837
fi
2938
case $php_cv_bison_version in
3039
""|invalid[)]
31-
bison_msg="bison versions supported for regeneration of the Zend/PHP parsers: $bison_version_list (found: $bison_version)."
40+
bison_msg="This bison version is not supported for regeneration of the Zend/PHP parsers (found: $bison_version, min: $bison_version_min, excluded: $bison_version_exclude)."
3241
AC_MSG_WARN([$bison_msg])
3342
YACC="exit 0;"
3443
;;

Zend/zend_vm_def.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2684,7 +2684,7 @@ ZEND_VM_HANDLER(59, ZEND_INIT_FCALL_BY_NAME, ANY, CONST|TMP|VAR|CV)
26842684
if (call->object) {
26852685
Z_ADDREF_P(call->object);
26862686
}
2687-
if (OP2_TYPE == IS_VAR && OP2_FREE &&
2687+
if (OP2_TYPE == IS_VAR && OP2_FREE && Z_REFCOUNT_P(function_name) == 1 &&
26882688
call->fbc->common.fn_flags & ZEND_ACC_CLOSURE) {
26892689
/* Delay closure destruction until its invocation */
26902690
call->fbc->common.prototype = (zend_function*)function_name;
@@ -2929,6 +2929,7 @@ ZEND_VM_HANDLER(111, ZEND_RETURN_BY_REF, CONST|TMP|VAR|CV, ANY)
29292929

29302930
ALLOC_ZVAL(ret);
29312931
INIT_PZVAL_COPY(ret, *retval_ptr_ptr);
2932+
zval_copy_ctor(ret);
29322933
*EG(return_value_ptr_ptr) = ret;
29332934
}
29342935
break;

Zend/zend_vm_execute.h

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1267,7 +1267,7 @@ static int ZEND_FASTCALL ZEND_INIT_FCALL_BY_NAME_SPEC_CONST_HANDLER(ZEND_OPCODE
12671267
if (call->object) {
12681268
Z_ADDREF_P(call->object);
12691269
}
1270-
if (IS_CONST == IS_VAR && 0 &&
1270+
if (IS_CONST == IS_VAR && 0 && Z_REFCOUNT_P(function_name) == 1 &&
12711271
call->fbc->common.fn_flags & ZEND_ACC_CLOSURE) {
12721272
/* Delay closure destruction until its invocation */
12731273
call->fbc->common.prototype = (zend_function*)function_name;
@@ -1592,7 +1592,7 @@ static int ZEND_FASTCALL ZEND_INIT_FCALL_BY_NAME_SPEC_TMP_HANDLER(ZEND_OPCODE_H
15921592
if (call->object) {
15931593
Z_ADDREF_P(call->object);
15941594
}
1595-
if (IS_TMP_VAR == IS_VAR && 1 &&
1595+
if (IS_TMP_VAR == IS_VAR && 1 && Z_REFCOUNT_P(function_name) == 1 &&
15961596
call->fbc->common.fn_flags & ZEND_ACC_CLOSURE) {
15971597
/* Delay closure destruction until its invocation */
15981598
call->fbc->common.prototype = (zend_function*)function_name;
@@ -1779,7 +1779,7 @@ static int ZEND_FASTCALL ZEND_INIT_FCALL_BY_NAME_SPEC_VAR_HANDLER(ZEND_OPCODE_H
17791779
if (call->object) {
17801780
Z_ADDREF_P(call->object);
17811781
}
1782-
if (IS_VAR == IS_VAR && (free_op2.var != NULL) &&
1782+
if (IS_VAR == IS_VAR && (free_op2.var != NULL) && Z_REFCOUNT_P(function_name) == 1 &&
17831783
call->fbc->common.fn_flags & ZEND_ACC_CLOSURE) {
17841784
/* Delay closure destruction until its invocation */
17851785
call->fbc->common.prototype = (zend_function*)function_name;
@@ -2004,7 +2004,7 @@ static int ZEND_FASTCALL ZEND_INIT_FCALL_BY_NAME_SPEC_CV_HANDLER(ZEND_OPCODE_HA
20042004
if (call->object) {
20052005
Z_ADDREF_P(call->object);
20062006
}
2007-
if (IS_CV == IS_VAR && 0 &&
2007+
if (IS_CV == IS_VAR && 0 && Z_REFCOUNT_P(function_name) == 1 &&
20082008
call->fbc->common.fn_flags & ZEND_ACC_CLOSURE) {
20092009
/* Delay closure destruction until its invocation */
20102010
call->fbc->common.prototype = (zend_function*)function_name;
@@ -2421,6 +2421,7 @@ static int ZEND_FASTCALL ZEND_RETURN_BY_REF_SPEC_CONST_HANDLER(ZEND_OPCODE_HAND
24212421

24222422
ALLOC_ZVAL(ret);
24232423
INIT_PZVAL_COPY(ret, *retval_ptr_ptr);
2424+
zval_copy_ctor(ret);
24242425
*EG(return_value_ptr_ptr) = ret;
24252426
}
24262427
break;
@@ -7748,6 +7749,7 @@ static int ZEND_FASTCALL ZEND_RETURN_BY_REF_SPEC_TMP_HANDLER(ZEND_OPCODE_HANDLE
77487749

77497750
ALLOC_ZVAL(ret);
77507751
INIT_PZVAL_COPY(ret, *retval_ptr_ptr);
7752+
zval_copy_ctor(ret);
77517753
*EG(return_value_ptr_ptr) = ret;
77527754
}
77537755
break;
@@ -12976,6 +12978,7 @@ static int ZEND_FASTCALL ZEND_RETURN_BY_REF_SPEC_VAR_HANDLER(ZEND_OPCODE_HANDLE
1297612978

1297712979
ALLOC_ZVAL(ret);
1297812980
INIT_PZVAL_COPY(ret, *retval_ptr_ptr);
12981+
zval_copy_ctor(ret);
1297912982
*EG(return_value_ptr_ptr) = ret;
1298012983
}
1298112984
break;
@@ -30634,6 +30637,7 @@ static int ZEND_FASTCALL ZEND_RETURN_BY_REF_SPEC_CV_HANDLER(ZEND_OPCODE_HANDLER
3063430637

3063530638
ALLOC_ZVAL(ret);
3063630639
INIT_PZVAL_COPY(ret, *retval_ptr_ptr);
30640+
zval_copy_ctor(ret);
3063730641
*EG(return_value_ptr_ptr) = ret;
3063830642
}
3063930643
break;

acinclude.m4

Lines changed: 24 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2962,10 +2962,14 @@ dnl DTrace objects
29622962
esac
29632963
29642964
dnl Generate Makefile.objects entries
2965+
dnl The empty $ac_provsrc command stops an implicit circular dependency
2966+
dnl in GNU Make which causes the .d file to be overwritten (Bug 61268)
29652967
cat>>Makefile.objects<<EOF
29662968
2969+
$abs_srcdir/$ac_provsrc:;
2970+
29672971
$ac_bdir[$]ac_hdrobj: $abs_srcdir/$ac_provsrc
2968-
CFLAGS="\$(CFLAGS_CLEAN)" dtrace -h -C -s $ac_srcdir[$]ac_provsrc -o \$[]@ && cp \$[]@ \$[]@.bak && \$(SED) 's,PHP_,DTRACE_,g' \$[]@.bak > \$[]@
2972+
CFLAGS="\$(CFLAGS_CLEAN)" dtrace -h -C -s $ac_srcdir[$]ac_provsrc -o \$[]@.bak && \$(SED) 's,PHP_,DTRACE_,g' \$[]@.bak > \$[]@
29692973
29702974
\$(PHP_DTRACE_OBJS): $ac_bdir[$]ac_hdrobj
29712975
@@ -2974,3 +2978,22 @@ $ac_bdir[$]ac_provsrc.o: \$(PHP_DTRACE_OBJS)
29742978
29752979
EOF
29762980
])
2981+
2982+
dnl
2983+
dnl PHP_CHECK_STDINT_TYPES
2984+
dnl
2985+
AC_DEFUN([PHP_CHECK_STDINT_TYPES], [
2986+
AC_CHECK_SIZEOF([short], 2)
2987+
AC_CHECK_SIZEOF([int], 4)
2988+
AC_CHECK_SIZEOF([long], 4)
2989+
AC_CHECK_SIZEOF([long long], 8)
2990+
AC_CHECK_TYPES([int8, int16, int32, int64, int8_t, int16_t, int32_t, int64_t, uint8, uint16, uint32, uint64, uint8_t, uint16_t, uint32_t, uint64_t, u_int8_t, u_int16_t, u_int32_t, u_int64_t], [], [], [
2991+
#if HAVE_STDINT_H
2992+
# include <stdint.h>
2993+
#endif
2994+
#if HAVE_SYS_TYPES_H
2995+
# include <sys/types.h>
2996+
#endif
2997+
])
2998+
AC_DEFINE([PHP_HAVE_STDINT_TYPES], [1], [Checked for stdint types])
2999+
])

build/libtool.m4

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -193,11 +193,11 @@ AC_PROVIDE_IFELSE([AC_LIBTOOL_WIN32_DLL],
193193
enable_win32_dll=yes, enable_win32_dll=no)
194194
195195
AC_ARG_ENABLE([libtool-lock],
196-
[ --disable-libtool-lock avoid locking (might break parallel builds)])
196+
[ --disable-libtool-lock Avoid locking (might break parallel builds)])
197197
test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
198198
199199
AC_ARG_WITH([pic],
200-
[ --with-pic try to use only PIC/non-PIC objects [default=use both]],
200+
[ --with-pic Try to use only PIC/non-PIC objects [default=use both]],
201201
[pic_mode="$withval"],
202202
[pic_mode=default])
203203
test -z "$pic_mode" && pic_mode=default
@@ -1919,7 +1919,7 @@ fi
19191919
AC_DEFUN([_LT_AC_TAGCONFIG],
19201920
[AC_REQUIRE([LT_AC_PROG_SED])dnl
19211921
AC_ARG_WITH([tags],
1922-
[ --with-tags[=TAGS] include additional configurations [automatic]
1922+
[ --with-tags[=TAGS] Include additional configurations [automatic]
19231923
],
19241924
[tagnames="$withval"])
19251925
@@ -2023,7 +2023,7 @@ AC_DEFUN([AC_ENABLE_SHARED],
20232023
[define([AC_ENABLE_SHARED_DEFAULT], ifelse($1, no, no, yes))dnl
20242024
AC_ARG_ENABLE([shared],
20252025
changequote(<<, >>)dnl
2026-
<< --enable-shared[=PKGS] build shared libraries [default=>>AC_ENABLE_SHARED_DEFAULT],
2026+
<< --enable-shared[=PKGS] Build shared libraries [default=>>AC_ENABLE_SHARED_DEFAULT],
20272027
changequote([, ])dnl
20282028
[p=${PACKAGE-default}
20292029
case $enableval in
@@ -2063,7 +2063,7 @@ AC_DEFUN([AC_ENABLE_STATIC],
20632063
[define([AC_ENABLE_STATIC_DEFAULT], ifelse($1, no, no, yes))dnl
20642064
AC_ARG_ENABLE([static],
20652065
changequote(<<, >>)dnl
2066-
<< --enable-static[=PKGS] build static libraries [default=>>AC_ENABLE_STATIC_DEFAULT],
2066+
<< --enable-static[=PKGS] Build static libraries [default=>>AC_ENABLE_STATIC_DEFAULT],
20672067
changequote([, ])dnl
20682068
[p=${PACKAGE-default}
20692069
case $enableval in
@@ -2103,7 +2103,8 @@ AC_DEFUN([AC_ENABLE_FAST_INSTALL],
21032103
[define([AC_ENABLE_FAST_INSTALL_DEFAULT], ifelse($1, no, no, yes))dnl
21042104
AC_ARG_ENABLE([fast-install],
21052105
changequote(<<, >>)dnl
2106-
<< --enable-fast-install[=PKGS] optimize for fast installation [default=>>AC_ENABLE_FAST_INSTALL_DEFAULT],
2106+
<< --enable-fast-install[=PKGS]
2107+
Optimize for fast installation [default=>>AC_ENABLE_FAST_INSTALL_DEFAULT],
21072108
changequote([, ])dnl
21082109
[p=${PACKAGE-default}
21092110
case $enableval in
@@ -2241,7 +2242,7 @@ fi
22412242
# find the pathname to the GNU or non-GNU linker
22422243
AC_DEFUN([AC_PROG_LD],
22432244
[AC_ARG_WITH([gnu-ld],
2244-
[ --with-gnu-ld assume the C compiler uses GNU ld [default=no]],
2245+
[ --with-gnu-ld Assume the C compiler uses GNU ld [default=no]],
22452246
[test "$withval" = no || with_gnu_ld=yes],
22462247
[with_gnu_ld=no])
22472248
AC_REQUIRE([LT_AC_PROG_SED])dnl

configure.in

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -572,6 +572,9 @@ PHP_CHECK_SIZEOF(intmax_t, 0)
572572
PHP_CHECK_SIZEOF(ssize_t, 8)
573573
PHP_CHECK_SIZEOF(ptrdiff_t, 8)
574574

575+
dnl Check stdint types (must be after header check)
576+
PHP_CHECK_STDINT_TYPES
577+
575578
dnl Check for members of the stat structure
576579
AC_STRUCT_ST_BLKSIZE
577580
dnl AC_STRUCT_ST_BLOCKS will screw QNX because fileblocks.o does not exists
@@ -1006,7 +1009,7 @@ dnl Check if all enabled by default extensions should be disabled
10061009
dnl
10071010

10081011
AC_ARG_ENABLE(all,
1009-
[ --disable-all Disable all extensions which are enabled by default
1012+
[ --disable-all Disable all extensions which are enabled by default
10101013
], [
10111014
PHP_ENABLE_ALL=$enableval
10121015
])

ext/bz2/config.m4

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ dnl $Id$
33
dnl
44

55
PHP_ARG_WITH(bz2, for BZip2 support,
6-
[ --with-bz2[=DIR] Include BZip2 support])
6+
[ --with-bz2[=DIR] Include BZip2 support])
77

88
if test "$PHP_BZ2" != "no"; then
99
if test -r $PHP_BZ2/include/bzlib.h; then

ext/curl/config.m4

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ dnl $Id$
33
dnl
44

55
PHP_ARG_WITH(curl, for cURL support,
6-
[ --with-curl[=DIR] Include cURL support])
6+
[ --with-curl[=DIR] Include cURL support])
77

88
if test "$PHP_CURL" != "no"; then
99
if test -r $PHP_CURL/include/curl/easy.h; then

ext/date/config0.m4

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,4 +22,5 @@ cat > $ext_builddir/lib/timelib_config.h <<EOF
2222
#else
2323
# include <php_config.h>
2424
#endif
25+
#include <php_stdint.h>
2526
EOF

ext/date/lib/timelib_structs.h

Lines changed: 1 addition & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -23,37 +23,7 @@
2323

2424
#include "timelib_config.h"
2525

26-
#ifdef HAVE_SYS_TYPES_H
27-
#include <sys/types.h>
28-
#endif
29-
30-
#if defined(HAVE_INTTYPES_H)
31-
#include <inttypes.h>
32-
#elif defined(HAVE_STDINT_H)
33-
#include <stdint.h>
34-
#endif
35-
36-
#ifdef PHP_WIN32
37-
/* TODO: Remove these hacks/defs once we have the int definitions in main/
38-
rathen than in each 2nd extension and win32/ */
39-
# include "win32/php_stdint.h"
40-
#else
41-
# ifndef HAVE_INT32_T
42-
# if SIZEOF_INT == 4
43-
typedef int int32_t;
44-
# elif SIZEOF_LONG == 4
45-
typedef long int int32_t;
46-
# endif
47-
# endif
48-
49-
# ifndef HAVE_UINT32_T
50-
# if SIZEOF_INT == 4
51-
typedef unsigned int uint32_t;
52-
# elif SIZEOF_LONG == 4
53-
typedef unsigned long int uint32_t;
54-
# endif
55-
# endif
56-
#endif
26+
#include "php_stdint.h"
5727

5828
#include <stdio.h>
5929

ext/dba/config.m4

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -557,10 +557,10 @@ PHP_ARG_WITH(cdb,,
557557
[ --without-cdb[=DIR] DBA: CDB support (bundled)], $php_dba_enable, no)
558558

559559
PHP_ARG_ENABLE(inifile,,
560-
[ --disable-inifile DBA: INI support (bundled)], $php_dba_enable, no)
560+
[ --disable-inifile DBA: INI support (bundled)], $php_dba_enable, no)
561561

562562
PHP_ARG_ENABLE(flatfile,,
563-
[ --disable-flatfile DBA: FlatFile support (bundled)], $php_dba_enable, no)
563+
[ --disable-flatfile DBA: FlatFile support (bundled)], $php_dba_enable, no)
564564

565565
# CDB
566566
if test "$PHP_CDB" = "yes"; then

0 commit comments

Comments
 (0)