Compare commits

..
110 Commits
Author SHA1 Message Date
Remi Collet ba2fe0c96b Update versions for PHP 7.2.5 2018-04-24 14:55:20 +00:00
Remi Collet b14bfacb92 Update NEWS for PHP 7.2.5 2018-04-24 14:55:20 +00:00
Remi Collet 4bd28cf296 clean 2018-04-24 09:41:13 +02:00
Remi Collet ac0f7f7342 add NEWS entries 2018-04-24 09:18:41 +02:00
Stanislav Malyshev ebbef8503f Merge branch 'PHP-7.1' into PHP-7.2
* PHP-7.1:
  Fix tsrm_ls
  Fix #76129 - remove more potential unfiltered outputs for phar
  Fix test
  Fix bug #76248 - Malicious LDAP-Server Response causes Crash
  Fix bug #76249 - fail on invalid sequences
  Fix #76130: Heap Buffer Overflow (READ: 1786) in exif_iif_add_value
  Fix bug #75981: prevent reading beyond buffer start

(cherry picked from commit 4c06d929c0)
2018-04-24 09:10:12 +02:00
Remi Collet 64513c8571 Update NEWS for 7.2.5 2018-04-11 05:35:38 +00:00
Remi Collet 81f414ef23 Update NEWS for PHP 7.2.5RC1 2018-04-11 05:19:35 +00:00
George Wang 043ac320a0 Merge branch 'PHP-7.1' into PHP-7.2 2018-04-10 16:49:29 -04:00
George Wang 5b529bbc94 Updated LiteSpeed SAPI to 7.1 . 2018-04-10 16:48:04 -04:00
Xinchen Hui 22a8ea2a0a Update NEWS 2018-04-10 16:33:31 +08:00
Xinchen Hui 474895915e Merge branch 'PHP-7.1' into PHP-7.2
* PHP-7.1:
  Fixed bug #76143 (Memory corruption: arbitrary NUL overwrite)
2018-04-10 16:32:28 +08:00
Xinchen Hui 8cfb648761 Fixed bug #76143 (Memory corruption: arbitrary NUL overwrite) 2018-04-10 16:32:08 +08:00
Anatol Belski e01f88df7c Merge branch 'PHP-7.1' into PHP-7.2
* PHP-7.1:
  Group common flags
2018-04-05 16:45:41 +02:00
Anatol Belski 09d7ffabcd Group common flags 2018-04-05 16:44:12 +02:00
Anatol Belski 7768f5e2de Merge branch 'PHP-7.1' into PHP-7.2
* PHP-7.1:
  Rename var
2018-04-05 14:54:14 +02:00
Anatol Belski ed5aabe8b7 Rename var 2018-04-05 14:52:40 +02:00
George Wang 1e1695e8de Merge branch 'PHP-7.1' into PHP-7.2 2018-04-03 11:47:41 -04:00
George Wang 37e1d7c776 [BUGFIX] allow php_admin_value to override value set in php.ini without restriction, like adding an extra directory to open_basedir. 2018-04-03 11:46:24 -04:00
Anatol Belski 2115878aaa Merge branch 'PHP-7.1' into PHP-7.2
* PHP-7.1:
  Sync fix for bug #72498 for 32-bit
2018-04-03 17:25:13 +02:00
Anatol Belski 821f13fd79 Sync fix for bug #72498 for 32-bit 2018-04-03 17:24:13 +02:00
Anatol Belski 062f93c93e [ci skip] Update NEWS 2018-04-03 11:29:38 +02:00
Anatol Belski 5cd94db8bb Merge branch 'PHP-7.1' into PHP-7.2
* PHP-7.1:
  [ci skip] Update NEWS
2018-04-03 11:29:08 +02:00
Anatol Belski c3fa86867b [ci skip] Update NEWS 2018-04-03 11:28:19 +02:00
Anatol Belski 22e8a3c347 Merge branch 'PHP-7.1' into PHP-7.2
* PHP-7.1:
  Fix shared ext/intl compilation
2018-04-03 10:43:17 +02:00
Anatol Belski 2bd299f731 Fix shared ext/intl compilation 2018-04-03 10:42:14 +02:00
Rasmus Lerdorf aaae3637e0 Better explanation for the opcache.max_wasted_percentage ini setting
since it was pretty confusing before
2018-03-30 13:24:17 -07:00
Christoph M. Becker 76f421dd3a Merge branch 'PHP-7.1' into PHP-7.2
* PHP-7.1:
  Fix #52070: imagedashedline() - dashed line sometimes is not visible
2018-03-30 19:29:10 +02:00
Christoph M. Becker 9c37d95627 Fix #52070: imagedashedline() - dashed line sometimes is not visible
We finally remove the inadvertent leftover from the synchronization
with GD 2.0.12.
2018-03-30 19:22:23 +02:00
Jakub Zelenka 8b642af484 Merge branch 'PHP-7.1' into PHP-7.2 2018-03-30 17:58:29 +01:00
Jakub Zelenka 2688023c7f Update NEWS with FPM fixes 2018-03-30 17:56:17 +01:00
Jakub Zelenka 0be5b9e6b0 Prevent modifying of getenv result 2018-03-30 17:20:19 +01:00
Jacob Hipps 008eb1461c 68440: ensure backwards compatibility with FPM_SOCKETS var; fix sockname size 2018-03-30 17:20:19 +01:00
Jacob Hipps 77bf9245d2 Fix bug #68440: [sapi/fpm] use multiple FPM_SOCKETS env vars to prevent hitting MAX_ARG_STRLEN with a large number of pools 2018-03-30 17:20:19 +01:00
Anatol Belski 35e3d597f5 Merge branch 'PHP-7.1' into PHP-7.2
* PHP-7.1:
  Fix clang build, ref buf #76153
2018-03-30 14:16:44 +02:00
Anatol Belski 8b104d7893 Fix clang build, ref buf #76153
Clang only allows -std=c++11 for C++ source.
2018-03-30 14:14:35 +02:00
Anatol Belski 99194d1831 Merge branch 'PHP-7.1' into PHP-7.2
* PHP-7.1:
  Update binary SDK version for AppVeyor
2018-03-29 17:00:47 +02:00
Anatol Belski e324f82d3c Update binary SDK version for AppVeyor 2018-03-29 16:59:42 +02:00
Anatol Belski 9510611cdd Merge branch 'PHP-7.1' into PHP-7.2
* PHP-7.1:
  Adjust tests for ICU 61.1 compatibility
2018-03-29 14:13:48 +02:00
Anatol Belski 398f56dbc8 Adjust tests for ICU 61.1 compatibility 2018-03-29 14:12:19 +02:00
Ferenc Kovacs 87a9fc3b85 Merge branch 'PHP-7.1' into PHP-7.2 2018-03-28 23:21:04 +02:00
Ferenc Kovacs c8e55a6fd4 Merge branch 'PHP-7.0' into PHP-7.1 2018-03-28 23:19:30 +02:00
Ferenc Kovacs 01f42b836c Merge branch 'PHP-5.6' into PHP-7.0 2018-03-28 23:17:59 +02:00
Ferenc Kovacs cb981e39c2 [ci skip] 5.6.36 will be next 2018-03-28 23:14:30 +02:00
Anatol Belski 4e39968e4d Merge branch 'PHP-7.1' into PHP-7.2
* PHP-7.1:
  Fixed bug #76153 Intl compilation fails with icu4c 61.1
2018-03-28 18:04:09 +02:00
Anatol Belski 710284cbc4 Fixed bug #76153 Intl compilation fails with icu4c 61.1
Additionally, ICU >= 59.1 requires C++11, so add the flags. Some
refactoring is needed to comply with the latest recommended build
options, such as automatic icu namespace addition.
2018-03-28 18:01:44 +02:00
Joe Watkins fc6cbc3eaa Merge branch 'PHP-7.1' into PHP-7.2
* PHP-7.1:
  Fixed #75996: Add the right urls to the header of mt_rand.
2018-03-27 22:09:42 +02:00
TATAR Balazs Janos ac4d9fd055 Fixed #75996: Add the right urls to the header of mt_rand. 2018-03-27 22:09:08 +02:00
Joe Watkins 3e267ca91b Merge branch 'PHP-7.1' into PHP-7.2
* PHP-7.1:
  Fix #76131 some arginfo params are different from the documentation
2018-03-27 21:58:24 +02:00
Gabriel Caruso 63934ea71e Fix #76131 some arginfo params are different from the documentation 2018-03-27 21:56:46 +02:00
Anatol Belski a492fe213a Merge branch 'PHP-7.1' into PHP-7.2
* PHP-7.1:
  Update libs_versions.txt
2018-03-27 19:46:25 +02:00
Anatol Belski cdf72523f3 Update libs_versions.txt 2018-03-27 19:44:17 +02:00
Anatol Belski c529e9f602 Merge branch 'PHP-7.1' into PHP-7.2
* PHP-7.1:
  [ci skip] Fix release date
2018-03-27 16:04:38 +02:00
Anatol Belski 6229e42ae5 Merge branch 'PHP-7.0' into PHP-7.1
* PHP-7.0:
  [ci skip] Fix release date
2018-03-27 16:03:54 +02:00
Anatol Belski 1e4273d881 [ci skip] Fix release date 2018-03-27 16:02:19 +02:00
Anatol Belski 8b2bfaab66 Merge branch 'PHP-7.1' into PHP-7.2
* PHP-7.1:
  7.0.30 next
2018-03-27 15:02:46 +02:00
Anatol Belski 04c0497ed7 Merge branch 'PHP-7.0' into PHP-7.1
* PHP-7.0:
  7.0.30 next
2018-03-27 15:02:07 +02:00
Anatol Belski 48f835efbf 7.0.30 next 2018-03-27 15:00:54 +02:00
Anatol Belski 8b20e86491 [skip ci] Update NEWS 2018-03-27 14:29:03 +02:00
Anatol Belski d83a75bb00 Merge branch 'PHP-7.1' into PHP-7.2
* PHP-7.1:
  [ci skip] Update NEWS
  [ci skip] Update NEWS
  [ci skip] Update NEWS
2018-03-27 14:28:20 +02:00
Anatol Belski 631ed7288c [ci skip] Update NEWS 2018-03-27 14:27:44 +02:00
Anatol Belski ad148c5ac2 Merge branch 'PHP-7.0' into PHP-7.1
* PHP-7.0:
  [ci skip] Update NEWS
  [ci skip] Update NEWS
2018-03-27 14:26:36 +02:00
Anatol Belski ca51458081 [ci skip] Update NEWS 2018-03-27 14:26:06 +02:00
Anatol Belski e2b7392b96 Merge branch 'PHP-5.6' into PHP-7.0
* PHP-5.6:
  [ci skip] Update NEWS
2018-03-27 14:25:24 +02:00
Anatol Belski 2885f62816 [ci skip] Update NEWS 2018-03-27 14:24:43 +02:00
Anatol Belski 600b6277f8 Merge branch 'PHP-7.1' into PHP-7.2
* PHP-7.1:
  Do not set PR_SET_DUMPABLE by default
  Do not set PR_SET_DUMPABLE by default
2018-03-27 14:20:53 +02:00
Anatol Belski 6b39c81957 Merge branch 'PHP-7.0' into PHP-7.1
* PHP-7.0:
  Do not set PR_SET_DUMPABLE by default
  Do not set PR_SET_DUMPABLE by default
2018-03-27 14:20:10 +02:00
Jakub Zelenka 276d19feaa Do not set PR_SET_DUMPABLE by default 2018-03-27 14:19:36 +02:00
Anatol Belski eac822e897 Merge branch 'PHP-5.6' into PHP-7.0
* PHP-5.6:
  Do not set PR_SET_DUMPABLE by default
2018-03-27 14:19:22 +02:00
Jakub Zelenka d20bebfe13 Do not set PR_SET_DUMPABLE by default 2018-03-27 14:18:01 +02:00
Anatol Belski 35f832a007 Merge branch 'PHP-7.1' into PHP-7.2
* PHP-7.1:
  Fix phpize build when DEFINE() is involved
2018-03-26 13:38:55 +02:00
Anatol Belski 5b2c30d7e6 Fix phpize build when DEFINE() is involved 2018-03-26 13:33:55 +02:00
Anatol Belski 86aecd8801 Merge branch 'PHP-7.1' into PHP-7.2
* PHP-7.1:
  Sync version for VC++ 15.7
2018-03-25 12:59:59 +02:00
Anatol Belski 84f565ec71 Sync version for VC++ 15.7 2018-03-25 12:59:15 +02:00
Nikita Popov 3306577797 Followup fix for bug #75729
The case of overloaded substr() with 3 arguments was not handled.
2018-03-24 13:15:59 +01:00
Derick Rethans c72c4c5271 Updated to version 2018.4 (2018d) 2018-03-24 11:26:16 +00:00
Derick Rethans ab5dcc83a1 Empty merge 2018-03-24 11:26:16 +00:00
Derick Rethans 869ca9b733 Updated to version 2018.4 (2018d) 2018-03-24 11:26:15 +00:00
Michael Heimpold 25ba60b147 Fixed bug #75722: Rework valgrind detection
As described in bug report #75722, the configure script (acinclude.m4)
currently searches for the valgrind header file and enables valgrind
support if found.

When cross-compiling the searched paths are invalid for the target
platform because they belong to the host system. At the moment, there is
no way to tell the build system a dedicated path where to look for the
header file.

This leads to the issue, that when cross-compiling eg. for ARMv5 platform,
that valgrind header file is detected - e.g. because host system is amd64 -
and support is enabled - but target platform will never support valgrind
(valgrind requires e.g. at least ARMv7).

This change reworks the detection so that user could manually opt-in
valgrind support and optionally specify a directory where the build system
should look for the header file using the --with-valgrind option.
2018-03-23 22:02:17 +01:00
Tom Van Looy 7f4327bc24 Fix expat_compat.h path used in #include
Using ext/xml/expat_compat.h does not work if the extension is
compiled out-of-tree.
2018-03-23 22:01:25 +01:00
Thomas Petazzoni 2842aa2a07 main/php_ini.c: build empty php_load_zend_extension_cb() when !HAVE_LIBDL
Commit 0782a7fc63 ("Fixed bug #74866
extension_dir = "./ext" now use current directory for base") modified
the php_load_zend_extension_cb() function to use php_load_shlib(), and
pass a handle to the newly introduced zend_load_extension_handle()
function instead of passing the extension path to
zend_load_extension().

While doing so, it introduced a call to php_load_shlib() from code
that is built even when HAVE_LIBDL is not defined. However,
php_load_shlib() is not implemented when HAVE_LIBDL is not defined,
for obvious reasons.

It turns out that zend_load_extension_handle() anyway doesn't do
anything when ZEND_EXTENSIONS_SUPPORT is defined to 0, and
ZEND_EXTENSIONS_SUPPORT is not defined when HAVE_LIBDL is not defined
(Zend/zend_portability.h).

Fixes the following build failure when building on a system that
doesn't have libdl:

main/php_ini.o: In function `php_load_zend_extension_cb':
php_ini.c:(.text+0x478): undefined reference to `php_load_shlib'
php_ini.c:(.text+0x4b0): undefined reference to `php_load_shlib'
collect2: error: ld returned 1 exit status

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
2018-03-23 21:13:45 +01:00
atvoicu 17ed2f21cf Add missing skip prefix for some SKIPIF messages 2018-03-23 18:56:36 +01:00
Anatol Belski 7b8861204e Merge branch 'PHP-7.1' into PHP-7.2
* PHP-7.1:
  Update SDK version for AppVeyor
2018-03-21 13:17:44 +01:00
Anatol Belski 6c30014600 Update SDK version for AppVeyor 2018-03-21 13:15:29 +01:00
Christoph M. Becker 8f5c34cd39 Merge branch 'PHP-7.1' into PHP-7.2
* PHP-7.1:
  Fix #76113: mbstring does not build with Oniguruma 6.8.1
2018-03-20 16:53:17 +01:00
Christoph M. Becker 4072b27870 Fix #76113: mbstring does not build with Oniguruma 6.8.1
As of Oniguruma 6.8.1, the regex structure has been moved from the
public `oniguruma.h` to the private `regint.h`.  Thus, it is no longer
possible to directly access the struct's members, and actually, there
is no need to, since there are respective accessor functions available
at least of 2.3.1.
2018-03-20 16:42:28 +01:00
Christoph M. Becker cd2912af5e Merge branch 'PHP-7.1' into PHP-7.2
* PHP-7.1:
  Fix #75944: Wrong cp1251 detection
2018-03-19 14:34:09 +01:00
Christoph M. Becker 47461368ca Fix #75944: Wrong cp1251 detection
`\xFF` is a valid character of CP-1251.
2018-03-19 14:24:27 +01:00
Stanislav Malyshev 13a33f7c7b Merge branch 'PHP-7.1' into PHP-7.2
* PHP-7.1:
  Set tests exit status by defaul - also in other instance.
2018-03-19 01:17:36 -07:00
Stanislav Malyshev f46da1da7d Set tests exit status by defaul - also in other instance. 2018-03-19 01:17:14 -07:00
Stanislav Malyshev 077b7705af Merge branch 'PHP-7.1' into PHP-7.2
* PHP-7.1:
  Set tests exit status by default.
2018-03-18 15:06:08 -07:00
Stanislav Malyshev f19c94b555 Set tests exit status by default.
Use REPORT_EXIT_STATUS=0 or REPORT_EXIT_STATUS=no to prevent it.

Based on discussion in https://www.mail-archive.com/internals@lists.php.net/msg94141.html
2018-03-18 15:04:50 -07:00
Anatol Belski 615ca3c99d Merge branch 'PHP-7.1' into PHP-7.2
* PHP-7.1:
  Sync test with newer output
2018-03-16 18:56:08 +01:00
Anatol Belski dfc07f038b Sync test with newer output
Czech Republic vs. newer Czechia
2018-03-16 18:54:55 +01:00
Xinchen Hui 4758164ac5 Fixed bug #76094 (Access violation when using opcache) 2018-03-15 11:17:00 +08:00
Anatol Belski 84881c654e Merge branch 'PHP-7.1' into PHP-7.2
* PHP-7.1:
  Reduce var scope
2018-03-14 23:10:24 +01:00
Anatol Belski efd0e7222b Reduce var scope 2018-03-14 22:59:54 +01:00
Anatol Belski 783778b9d3 Merge branch 'PHP-7.1' into PHP-7.2
* PHP-7.1:
  Fix stack use after scope
2018-03-14 22:23:04 +01:00
Anatol Belski 7bcd55c264 Fix stack use after scope 2018-03-14 22:21:43 +01:00
Anatol Belski 1e31ac079b Merge branch 'PHP-7.1' into PHP-7.2
* PHP-7.1:
  Upgrade binary SDK version for AppVeyor
2018-03-14 12:01:01 +01:00
Anatol Belski 77c202a2e6 Upgrade binary SDK version for AppVeyor 2018-03-14 11:59:37 +01:00
Dmitry Stogov 975d144027 Fixed user-opcode support 2018-03-14 09:41:25 +03:00
Dmitry Stogov 2db6d8e415 Merge branch 'PHP-7.1' into PHP-7.2
* PHP-7.1:
  Fixed use-after-free
2018-03-14 09:14:16 +03:00
Dmitry Stogov b6a41ad5ba Fixed use-after-free 2018-03-14 09:11:48 +03:00
Joe Watkins a18a11cf80 Merge branch 'PHP-7.1' into PHP-7.2
* PHP-7.1:
  bump versions
2018-03-14 05:59:18 +01:00
Joe Watkins d2b47e8065 bump versions 2018-03-14 05:58:42 +01:00
Christoph M. Becker 7448b03300 Merge branch 'PHP-7.1' into PHP-7.2
* PHP-7.1:
  Fix #74139: mail.add_x_header default inconsistent with docs [ci skip]
2018-03-13 23:56:31 +01:00
Christoph M. Becker 25f324fad7 Fix #74139: mail.add_x_header default inconsistent with docs [ci skip]
mail.add_x_header actually defaults to `Off`, so we should use this
default in the provided `php.ini`s.
2018-03-13 23:54:42 +01:00
Christoph M. Becker b2622ed838 Merge branch 'PHP-7.1' into PHP-7.2
* PHP-7.1:
  Fix #76088: ODBC functions are not available by default on Windows
2018-03-13 14:33:20 +01:00
Christoph M. Becker cab354debd Fix #76088: ODBC functions are not available by default on Windows 2018-03-13 14:30:43 +01:00
Remi Collet d660d6d31b next is 7.2.5 2018-03-13 12:49:25 +01:00
85 changed files with 1681 additions and 1651 deletions

No files matched your search

+1 -1
View File
@@ -23,7 +23,7 @@ environment:
PHP_BUILD_CACHE_BASE_DIR: c:\build-cache
PHP_BUILD_OBJ_DIR: c:\obj
PHP_BUILD_CACHE_SDK_DIR: c:\build-cache\sdk
PHP_BUILD_SDK_BRANCH: php-sdk-2.1.1
PHP_BUILD_SDK_BRANCH: php-sdk-2.1.3
PHP_BUILD_CRT: vc15
# ext and env setup for tests
#MYSQL_TEST_PASSWD: Password12!
+63 -1
View File
@@ -1,6 +1,64 @@
PHP NEWS
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
15 Mar 2018, PHP 7.2.4RC1
26 Apr 2018, PHP 7.2.5
- Core:
. Fixed bug #75722 (Convert valgrind detection to configure option).
(Michael Heimpold)
- Date:
. Fixed bug #76131 (mismatch arginfo for date_create). (carusogabriel)
- Exif:
. Fixed bug#76130 (Heap Buffer Overflow (READ: 1786) in exif_iif_add_value).
(Stas)
- FPM:
. Fixed bug #68440 (ERROR: failed to reload: execvp() failed: Argument list
too long). (Jacob Hipps)
. Fixed incorrect write to getenv result in FPM reload. (Jakub Zelenka)
- GD:
. Fixed bug #52070 (imagedashedline() - dashed line sometimes is not visible).
(cmb)
- intl:
. Fixed bug #76153 (Intl compilation fails with icu4c 61.1). (Anatol)
- iconv:
. Fixed bug #76249 (stream filter convert.iconv leads to infinite loop on
invalid sequence). (Stas)
- ldap:
. Fixed bug #76248 (Malicious LDAP-Server Response causes Crash). (Stas)
- mbstring:
. Fixed bug #75944 (Wrong cp1251 detection). (dmk001)
. Fixed bug #76113 (mbstring does not build with Oniguruma 6.8.1).
(chrullrich, cmb)
- ODBC:
. Fixed bug #76088 (ODBC functions are not available by default on Windows).
(cmb)
- Opcache:
. Fixed bug #76094 (Access violation when using opcache). (Laruence)
- Phar:
. Fixed bug #76129 (fix for CVE-2018-5712 may not be complete). (Stas)
- phpdbg:
. Fixed bug #76143 (Memory corruption: arbitrary NUL overwrite). (Laruence)
- SPL:
. Fixed bug #76131 (mismatch arginfo for splarray constructor).
(carusogabriel)
- standard:
. Fixed bug #74139 (mail.add_x_header default inconsistent with docs). (cmb)
. Fixed bug #75996 (incorrect url in header for mt_rand). (tatarbj)
29 Mar 2018, PHP 7.2.4
- Core:
. Fixed bug #76025 (Segfault while throwing exception in error_handler).
@@ -8,6 +66,10 @@ PHP NEWS
. Fixed bug #76044 ('date: illegal option -- -' in ./configure on FreeBSD).
(Anatol)
- FPM:
. Fixed bug #75605 (Dumpable FPM child processes allow bypassing opcache
access controls). (Jakub Zelenka)
- FTP:
. Fixed ftp_pasv arginfo. (carusogabriel)
+1 -1
View File
@@ -1,7 +1,7 @@
--TEST--
Bug #43450 (Memory leak on some functions with implicit object __toString() call)
--SKIPIF--
<?php if (!function_exists('memory_get_usage')) die('memory_get_usage() not installed'); ?>
<?php if (!function_exists('memory_get_usage')) die('skip memory_get_usage() not installed'); ?>
--INI--
opcache.enable_cli=0
--FILE--
+1 -1
View File
@@ -69301,7 +69301,7 @@ ZEND_API int zend_vm_call_opcode_handler(zend_execute_data* ex)
LOAD_OPLINE();
#if defined(ZEND_VM_FP_GLOBAL_REG) && defined(ZEND_VM_IP_GLOBAL_REG)
#if (ZEND_VM_KIND == ZEND_VM_KIND_HYBRID)
handler = (opcode_handler_t)zend_vm_get_opcode_handler_func(opline->opcode, opline);
handler = (opcode_handler_t)zend_vm_get_opcode_handler_func(zend_user_opcodes[opline->opcode], opline);
handler(ZEND_OPCODE_HANDLER_ARGS_PASSTHRU);
if (EXPECTED(opline != &hybrid_halt_op)) {
#else
+1 -1
View File
@@ -2599,7 +2599,7 @@ function gen_vm($def, $skel) {
out($f,"#if defined(ZEND_VM_FP_GLOBAL_REG) && defined(ZEND_VM_IP_GLOBAL_REG)\n");
if (ZEND_VM_KIND == ZEND_VM_KIND_HYBRID) {
out($f,"#if (ZEND_VM_KIND == ZEND_VM_KIND_HYBRID)\n");
out($f, "\thandler = (opcode_handler_t)zend_vm_get_opcode_handler_func(opline->opcode, opline);\n");
out($f, "\thandler = (opcode_handler_t)zend_vm_get_opcode_handler_func(zend_user_opcodes[opline->opcode], opline);\n");
out($f, "\thandler(ZEND_OPCODE_HANDLER_ARGS_PASSTHRU);\n");
out($f, "\tif (EXPECTED(opline != &hybrid_halt_op)) {\n");
out($f,"#else\n");
+3 -20
View File
@@ -2237,6 +2237,9 @@ AC_DEFUN([PHP_SETUP_ICU],[
ICU_LIBS=`$ICU_CONFIG --ldflags --ldflags-icuio`
PHP_EVAL_INCLINE($ICU_INCS)
PHP_EVAL_LIBLINE($ICU_LIBS, $1)
ICU_CXXFLAGS=`$ICU_CONFIG --cxxflags`
ICU_CXXFLAGS="$ICU_CXXFLAGS -DU_USING_ICU_NAMESPACE=1"
fi
])
@@ -3249,23 +3252,3 @@ AC_DEFUN([PHP_CHECK_BUILTIN_SSUBLL_OVERFLOW], [
dnl Load the AX_CHECK_COMPILE_FLAG macro from the autoconf archive.
m4_include([build/ax_check_compile_flag.m4])
dnl PHP_CHECK_VALGRIND
AC_DEFUN([PHP_CHECK_VALGRIND], [
AC_MSG_CHECKING([for valgrind])
SEARCH_PATH="/usr/local /usr"
SEARCH_FOR="/include/valgrind/valgrind.h"
for i in $SEARCH_PATH ; do
if test -r $i/$SEARCH_FOR; then
VALGRIND_DIR=$i
fi
done
if test -z "$VALGRIND_DIR"; then
AC_MSG_RESULT([not found])
else
AC_MSG_RESULT(found in $VALGRIND_DIR)
AC_DEFINE(HAVE_VALGRIND, 1, [ ])
fi
])
+31 -3
View File
@@ -107,8 +107,8 @@ int zend_sprintf(char *buffer, const char *format, ...);
PHP_MAJOR_VERSION=7
PHP_MINOR_VERSION=2
PHP_RELEASE_VERSION=4
PHP_EXTRA_VERSION="RC1"
PHP_RELEASE_VERSION=5
PHP_EXTRA_VERSION=""
PHP_VERSION="$PHP_MAJOR_VERSION.$PHP_MINOR_VERSION.$PHP_RELEASE_VERSION$PHP_EXTRA_VERSION"
PHP_VERSION_ID=`expr [$]PHP_MAJOR_VERSION \* 10000 + [$]PHP_MINOR_VERSION \* 100 + [$]PHP_RELEASE_VERSION`
@@ -753,7 +753,35 @@ if test "x$php_crypt_r" = "x1"; then
PHP_CRYPT_R_STYLE
fi
PHP_CHECK_VALGRIND
dnl Check valgrind support
PHP_ARG_WITH(valgrind, [whether to enable valgrind support],
[ --with-valgrind=DIR Enable valgrind support], yes, no)
if test "$PHP_VALGRIND" != "no"; then
AC_MSG_CHECKING([for valgrind header])
if test "$PHP_VALGRIND" = "yes"; then
SEARCH_PATH="/usr/local /usr"
else
SEARCH_PATH="$PHP_VALGRIND"
fi
SEARCH_FOR="/include/valgrind/valgrind.h"
for i in $SEARCH_PATH ; do
if test -r $i/$SEARCH_FOR; then
VALGRIND_DIR=$i
fi
done
if test -z "$VALGRIND_DIR"; then
AC_MSG_RESULT([not found])
else
AC_MSG_RESULT(found in $VALGRIND_DIR)
AC_DEFINE(HAVE_VALGRIND, 1, [ ])
fi
fi
dnl General settings.
dnl -------------------------------------------------------------------------
+2 -2
View File
@@ -1012,13 +1012,13 @@ PHP_FUNCTION(variant_date_from_timestamp)
tzset();
ttstamp = timestamp;
tmv = localtime(&ttstamp);
#if ZEND_ENABLE_ZVAL_LONG64
/* Invalid after 23:59:59, December 31, 3000, UTC */
if (!tmv) {
php_error_docref(NULL, E_WARNING, "Invalid timestamp " ZEND_LONG_FMT, timestamp);
RETURN_FALSE;
}
#endif
memset(&systime, 0, sizeof(systime));
systime.wDay = tmv->tm_mday;
-1
View File
@@ -3,7 +3,6 @@ Bug #72498 variant_date_from_timestamp null dereference
--SKIPIF--
<?php # vim:ft=php
if (!extension_loaded("com_dotnet")) print "skip COM/.Net support not present";
if (PHP_INT_SIZE != 8) print "skip 64-bit only";
?>
--FILE--
<?php
+796 -791
View File
File diff suppressed because it is too large. Load diff
+5 -5
View File
@@ -162,7 +162,7 @@ ZEND_END_ARG_INFO()
ZEND_BEGIN_ARG_INFO_EX(arginfo_date_create, 0, 0, 0)
ZEND_ARG_INFO(0, time)
ZEND_ARG_INFO(0, object)
ZEND_ARG_INFO(0, timezone)
ZEND_END_ARG_INFO()
ZEND_BEGIN_ARG_INFO_EX(arginfo_date_create_from_format, 0, 0, 2)
@@ -2042,9 +2042,9 @@ static int date_interval_has_property(zval *object, zval *member, int type, void
}
return retval;
}
prop = date_interval_read_property(object, member, BP_VAR_IS, cache_slot, &rv);
if (prop != &EG(uninitialized_zval)) {
if (type == 2) {
retval = 1;
@@ -2062,7 +2062,7 @@ static int date_interval_has_property(zval *object, zval *member, int type, void
}
return retval;
}
/* }}} */
@@ -2435,7 +2435,7 @@ static HashTable *date_object_get_debug_info_timezone(zval *object, int *is_temp
*is_temp = 1;
ht = zend_array_dup(props);
ZVAL_LONG(&zv, tzobj->type);
zend_hash_str_update(ht, "timezone_type", sizeof("timezone_type")-1, &zv);
+1 -1
View File
@@ -2112,7 +2112,7 @@ static void exif_iif_add_value(image_info_type *image_info, int section_index, c
case TAG_FMT_UNDEFINED:
if (value) {
if (tag == TAG_MAKER_NOTE) {
length = MIN(length, (int) strlen(value));
length = (int) php_strnlen(value, length);
}
/* do not recompute length here */
+20
View File
@@ -0,0 +1,20 @@
--TEST--
Bug #76130 (Heap Buffer Overflow (READ: 1786) in exif_iif_add_value)
--DESCRIPTION--
This test is meant to exhibit memory issues with the `-m` option. Since a lot of
notices and warnings are to be expected anyway, we suppress these, since the are
not relevant for this test.
--INI--
error_reporting=E_ALL & ~E_WARNING & ~E_NOTICE
--SKIPIF--
<?php
if (!extension_loaded('exif')) die('skip exif extension not available');
?>
--FILE--
<?php
exif_read_data(__DIR__ . '/bug76130_1.jpg');
exif_read_data(__DIR__ . '/bug76130_2.jpg');
?>
===DONE===
--EXPECT--
===DONE===
Binary file not shown.
Binary file not shown.
+1 -1
View File
@@ -7,7 +7,7 @@ if (2147483647 == PHP_INT_MAX) {
die('skip ot supported on this system');
}
if (disk_free_space(__DIR__) < 10*1024*1024*1024) {
die('not enough disk space');
die('skip Not enough disk space');
}
?>
--FILE--
-1
View File
@@ -1338,7 +1338,6 @@ void gdImageDashedLine (gdImagePtr im, int x1, int y1, int x2, int y2, int color
} else {
wid = 1;
}
wid = (int)(thick * sin(atan2(dy, dx)));
vert = 1;
d = 2 * dy - dx;
+25
View File
@@ -0,0 +1,25 @@
--TEST--
Bug #52070 (imagedashedline() - dashed line sometimes is not visible)
--SKIPIF--
<?php
if (!extension_loaded('gd')) die('skip gd extension not available');
?>
--FILE--
<?php
$im = imagecreate(1200, 800);
$background_color = imagecolorallocate($im, 40, 40, 40);
$color = imagecolorallocate($im, 255, 255, 255);
imagedashedline($im, 800, 400, 300, 400, $color);
imagedashedline($im, 800, 400, 300, 800, $color);
imagedashedline($im, 800, 400, 400, 800, $color);
imagedashedline($im, 800, 400, 500, 800, $color);
imagedashedline($im, 800, 400, 600, 800, $color);
imagedashedline($im, 800, 400, 700, 800, $color);
imagedashedline($im, 800, 400, 800, 800, $color);
include_once __DIR__ . '/func.inc';
test_image_equals_file(__DIR__ . '/bug52070.png', $im);
?>
===DONE===
--EXPECT--
The images are equal.
===DONE===
Binary file not shown.

After

Width:  |  Height:  |  Size: 2.2 KiB

+3
View File
@@ -2642,6 +2642,9 @@ static int php_iconv_stream_filter_append_bucket(
tcnt = 0;
break;
}
} else {
php_error_docref(NULL, E_WARNING, "iconv stream filter (\"%s\"=>\"%s\"): invalid multibyte sequence", self->from_charset, self->to_charset);
goto out_failure;
}
break;
+18
View File
@@ -0,0 +1,18 @@
--TEST--
Bug #76249 (stream filter convert.iconv leads to infinite loop on invalid sequence)
--SKIPIF--
<?php extension_loaded('iconv') or die('skip iconv extension is not available'); ?>
--FILE--
<?php
$fh = fopen('php://memory', 'rw');
fwrite($fh, "abc");
rewind($fh);
stream_filter_append($fh, 'convert.iconv.ucs-2/utf8//IGNORE', STREAM_FILTER_READ, []);
$a = stream_get_contents($fh);
var_dump(strlen($a));
?>
DONE
--EXPECTF--
Warning: stream_get_contents(): iconv stream filter ("ucs-2"=>"utf8//IGNORE"): invalid multibyte sequence in %sbug76249.php on line %d
int(3)
DONE
+21 -12
View File
@@ -9,6 +9,7 @@ if test "$PHP_INTL" != "no"; then
PHP_SETUP_ICU(INTL_SHARED_LIBADD)
PHP_SUBST(INTL_SHARED_LIBADD)
PHP_REQUIRE_CXX()
INTL_COMMON_FLAGS="$ICU_INCS -Wno-write-strings -D__STDC_LIMIT_MACROS -DZEND_ENABLE_STATIC_TSRMLS_CACHE=1"
if test "$icu_version" -ge "4002"; then
icu_spoof_src=" spoofchecker/spoofchecker_class.c \
spoofchecker/spoofchecker.c\
@@ -20,7 +21,6 @@ if test "$PHP_INTL" != "no"; then
PHP_NEW_EXTENSION(intl, php_intl.c \
intl_error.c \
intl_convert.c \
intl_convertcpp.cpp \
collator/collator.c \
collator/collator_class.c \
collator/collator_sort.c \
@@ -32,8 +32,6 @@ if test "$PHP_INTL" != "no"; then
collator/collator_is_numeric.c \
collator/collator_error.c \
common/common_error.c \
common/common_enum.cpp \
common/common_date.cpp \
converter/converter.c \
formatter/formatter.c \
formatter/formatter_main.c \
@@ -53,17 +51,12 @@ if test "$PHP_INTL" != "no"; then
dateformat/dateformat_attr.c \
dateformat/dateformat_data.c \
dateformat/dateformat_format.c \
dateformat/dateformat_format_object.cpp \
dateformat/dateformat_parse.c \
dateformat/dateformat_create.cpp \
dateformat/dateformat_attrcpp.cpp \
dateformat/dateformat_helpers.cpp \
msgformat/msgformat.c \
msgformat/msgformat_attr.c \
msgformat/msgformat_class.c \
msgformat/msgformat_data.c \
msgformat/msgformat_format.c \
msgformat/msgformat_helpers.cpp \
msgformat/msgformat_parse.c \
grapheme/grapheme_string.c \
grapheme/grapheme_util.c \
@@ -73,6 +66,18 @@ if test "$PHP_INTL" != "no"; then
transliterator/transliterator.c \
transliterator/transliterator_class.c \
transliterator/transliterator_methods.c \
uchar/uchar.c \
idn/idn.c \
$icu_spoof_src, $ext_shared,,$INTL_COMMON_FLAGS,cxx)
PHP_INTL_CXX_SOURCES="intl_convertcpp.cpp \
common/common_enum.cpp \
common/common_date.cpp \
dateformat/dateformat_format_object.cpp \
dateformat/dateformat_create.cpp \
dateformat/dateformat_attrcpp.cpp \
dateformat/dateformat_helpers.cpp \
msgformat/msgformat_helpers.cpp \
timezone/timezone_class.cpp \
timezone/timezone_methods.cpp \
calendar/calendar_class.cpp \
@@ -83,10 +88,14 @@ if test "$PHP_INTL" != "no"; then
breakiterator/breakiterator_methods.cpp \
breakiterator/rulebasedbreakiterator_methods.cpp \
breakiterator/codepointiterator_internal.cpp \
breakiterator/codepointiterator_methods.cpp \
uchar/uchar.c \
idn/idn.c \
$icu_spoof_src, $ext_shared,,$ICU_INCS -Wno-write-strings -D__STDC_LIMIT_MACROS -DZEND_ENABLE_STATIC_TSRMLS_CACHE=1,cxx)
breakiterator/codepointiterator_methods.cpp"
PHP_INTL_CXX_FLAGS="$INTL_COMMON_FLAGS $ICU_CXXFLAGS"
if test "$ext_shared" = "no"; then
PHP_ADD_SOURCES(PHP_EXT_DIR(intl), $PHP_INTL_CXX_SOURCES, $PHP_INTL_CXX_FLAGS)
else
PHP_ADD_SOURCES_X(PHP_EXT_DIR(intl), $PHP_INTL_CXX_SOURCES, $PHP_INTL_CXX_FLAGS, shared_objects_intl, yes)
fi
PHP_ADD_BUILD_DIR($ext_builddir/collator)
PHP_ADD_BUILD_DIR($ext_builddir/converter)
PHP_ADD_BUILD_DIR($ext_builddir/common)
+1 -1
View File
@@ -130,7 +130,7 @@ if (PHP_INTL != "no") {
ADD_FLAG("LIBS_INTL", "iculx.lib");
}
ADD_FLAG("CFLAGS_INTL", "/EHsc");
ADD_FLAG("CFLAGS_INTL", "/EHsc /D U_USING_ICU_NAMESPACE=1");
AC_DEFINE("HAVE_INTL", 1, "Internationalization support enabled");
} else {
WARNING("intl not enabled; libraries and/or headers not found");
+2 -1
View File
@@ -1,7 +1,8 @@
--TEST--
numfmt_format() icu >= 56.1
numfmt_format() icu >= 56.1 && icu < 61.1
--SKIPIF--
<?php if( !extension_loaded( 'intl' ) ) print 'skip'; ?>
<?php if (version_compare(INTL_ICU_VERSION, '61.1') >= 0) die('skip for ICU < 61.1'); ?>
<?php if (version_compare(INTL_ICU_VERSION, '56.1') < 0) die('skip for ICU >= 56.1'); ?>
--FILE--
<?php
+130
View File
@@ -0,0 +1,130 @@
--TEST--
numfmt_format() icu >= 61.1
--SKIPIF--
<?php if( !extension_loaded( 'intl' ) ) print 'skip'; ?>
<?php if (version_compare(INTL_ICU_VERSION, '61.1') < 0) die('skip for ICU >= 61.1'); ?>
--FILE--
<?php
/*
* Format a number using misc locales/patterns.
*/
/*
* TODO: doesn't pass on ICU 3.6 because 'ru' and 'de' locales changed
* currency and percent formatting.
*/
function ut_main()
{
$styles = array(
NumberFormatter::PATTERN_DECIMAL => '##.#####################',
NumberFormatter::DECIMAL => '',
NumberFormatter::CURRENCY => '',
NumberFormatter::PERCENT => '',
NumberFormatter::SCIENTIFIC => '',
NumberFormatter::SPELLOUT => '@@@@@@@',
NumberFormatter::ORDINAL => '',
NumberFormatter::DURATION => '',
NumberFormatter::PATTERN_RULEBASED => '#####.###',
1234999, // bad one
);
$integer = array(
NumberFormatter::ORDINAL => '',
NumberFormatter::DURATION => '',
);
$locales = array(
'en_US',
'ru_UA',
'de',
'fr',
'en_UK'
);
$str_res = '';
$number = 1234567.891234567890000;
foreach( $locales as $locale )
{
$str_res .= "\nLocale is: $locale\n";
foreach( $styles as $style => $pattern )
{
$fmt = ut_nfmt_create( $locale, $style, $pattern );
if(!$fmt) {
$str_res .= "Bad formatter!\n";
continue;
}
$str_res .= dump( isset($integer[$style])?ut_nfmt_format( $fmt, $number, NumberFormatter::TYPE_INT32):ut_nfmt_format( $fmt, $number ) ) . "\n";
}
}
return $str_res;
}
include_once( 'ut_common.inc' );
// Run the test
ut_run();
?>
--EXPECTREGEX--
Locale is: en_US
'1234567.8912345\d+'
'1,234,567.891'
'\$1,234,567.89'
'123,456,789%'
'1.2345678912345\d+E6'
'one million,? two hundred (and )?thirty-four thousand,? five hundred (and )?sixty-seven point eight nine one two three four five( six)? seven( nine)?'
'1,234,567(th|ᵗʰ)'
'342:56:07'
'#####.###'
'USD1,234,567.89'
Locale is: ru_UA
'1234567.8912345\d+'
'1 234 567,891'
'1 234 567,89 ?(грн\.|₴)'
'123 456 789 ?%'
'1.2345678912345\d+E6'
'один миллион двести тридцать четыре тысячи пятьсот шестьдесят семь целых восемьдесят девять миллионов сто двадцать три тысячи четыреста пятьдесят семь стомиллионных'
'1 234 567.?'
'1 234 567'
'#####.###'
'1 234 567,89 UAH'
Locale is: de
'1234567.8912345\d+'
'1.234.567,891'
'(¤ )?1.234.567,89( ¤)?'
'123\.456\.789 %'
'1.2345678912345\d+E6'
'eine Million zwei­hundert­vier­und­dreißig­tausend­fünf­hundert­sieben­und­sechzig Komma acht neun eins zwei drei vier fünf( sechs)? sieben( neun)?'
'1.234.567.?'
'1.234.567'
'#####.###'
'1.234.567,89 ¤¤'
Locale is: fr
'1234567.8912345\d+'
'1 234 567,891'
'1 234 567,89 ¤'
'123 456 789 ?%'
'1.2345678912345\d+E6'
'un million deux cent trente-quatre mille cinq cent soixante-sept virgule huit neuf un deux trois quatre cinq( six)? sept( neuf)?'
'1 234 567e'
'1 234 567'
'#####.###'
'1 234 567,89 ¤¤'
Locale is: en_UK
'1234567.8912345\d+'
'1,234,567.891'
'¤1,234,567.89'
'123,456,789%'
'1.2345678912345\d+E6'
'one million,? two hundred (and )?thirty-four thousand,? five hundred (and )?sixty-seven point eight nine one two three four five( six)? seven( nine)?'
'1,234,567(th|ᵗʰ)'
'342:56:07'
'#####.###'
'¤¤1,234,567.89'
@@ -2,6 +2,7 @@
IntlRuleBasedBreakIterator::getBinaryRules(): basic test
--SKIPIF--
<?php if( !extension_loaded( 'intl' ) ) print 'skip'; ?>
<?php if (version_compare(INTL_ICU_VERSION, '61.1') >= 0) die('skip for ICU < 61.1'); ?>
<?php if(version_compare(INTL_ICU_VERSION, '4.8') < 0) print 'skip ICU >= 4.8 only'; ?>
--FILE--
<?php
@@ -0,0 +1,57 @@
--TEST--
IntlRuleBasedBreakIterator::getBinaryRules(): basic test
--SKIPIF--
<?php if( !extension_loaded( 'intl' ) ) print 'skip'; ?>
<?php if(version_compare(INTL_ICU_VERSION, '61.1') < 0) print 'skip ICU >= 61.1 only'; ?>
--FILE--
<?php
ini_set("intl.error_level", E_WARNING);
ini_set("intl.default_locale", "pt_PT");
$rules = <<<RULES
\$LN = [[:letter:] [:number:]];
\$S = [.;,:];
!!forward;
\$LN+ {1};
\$S+ {42};
!!reverse;
\$LN+ {1};
\$S+ {42};
!!safe_forward;
!!safe_reverse;
RULES;
$rbbi = new IntlRuleBasedBreakIterator($rules);
$rbbi->setText('sdfkjsdf88á.... ,;');
$br = $rbbi->getBinaryRules();
$rbbi2 = new IntlRuleBasedBreakIterator($br, true);
var_dump($rbbi->getRules(), $rbbi2->getRules());
var_dump($rbbi->getRules() == $rbbi2->getRules());
?>
==DONE==
--EXPECT--
string(137) "$LN = [[:letter:] [:number:]];
$S = [.;,:];
!!forward;
$LN+ {1};
$S+ {42};
!!reverse;
$LN+ {1};
$S+ {42};
!!safe_forward;
!!safe_reverse;"
string(137) "$LN = [[:letter:] [:number:]];
$S = [.;,:];
!!forward;
$LN+ {1};
$S+ {42};
!!reverse;
$LN+ {1};
$S+ {42};
!!safe_forward;
!!safe_reverse;"
bool(true)
==DONE==
+3 -4
View File
@@ -1,9 +1,8 @@
--TEST--
IntlRuleBasedBreakIterator::getRules(): basic test
--SKIPIF--
<?php
if (!extension_loaded('intl'))
die('skip intl extension not enabled');
<?php if (!extension_loaded('intl')) die('skip intl extension not enabled'); ?>
<?php if (version_compare(INTL_ICU_VERSION, '61.1') >= 0) die('skip for ICU < 61.1'); ?>
--FILE--
<?php
ini_set("intl.error_level", E_WARNING);
@@ -29,4 +28,4 @@ var_dump($rbbi->getRules());
==DONE==
--EXPECT--
string(128) "$LN = [[:letter:] [:number:]];$S = [.;,:];!!forward;$LN+ {1};$S+ {42};!!reverse;$LN+ {1};$S+ {42};!!safe_forward;!!safe_reverse;"
==DONE==
==DONE==
@@ -0,0 +1,40 @@
--TEST--
IntlRuleBasedBreakIterator::getRules(): basic test
--SKIPIF--
<?php if (!extension_loaded('intl')) die('skip intl extension not enabled'); ?>
<?php if (version_compare(INTL_ICU_VERSION, '61.1') < 0) die('skip for ICU >= 61.1'); ?>
--FILE--
<?php
ini_set("intl.error_level", E_WARNING);
ini_set("intl.default_locale", "pt_PT");
$rules = <<<RULES
\$LN = [[:letter:] [:number:]];
\$S = [.;,:];
!!forward;
\$LN+ {1};
\$S+ {42};
!!reverse;
\$LN+ {1};
\$S+ {42};
!!safe_forward;
!!safe_reverse;
RULES;
$rbbi = new IntlRuleBasedBreakIterator($rules);
var_dump($rbbi->getRules());
?>
==DONE==
--EXPECT--
string(137) "$LN = [[:letter:] [:number:]];
$S = [.;,:];
!!forward;
$LN+ {1};
$S+ {42};
!!reverse;
$LN+ {1};
$S+ {42};
!!safe_forward;
!!safe_reverse;"
==DONE==
+5 -1
View File
@@ -1242,7 +1242,11 @@ PHP_FUNCTION(ldap_get_entries)
add_assoc_long(&tmp1, "count", num_attrib);
dn = ldap_get_dn(ldap, ldap_result_entry);
add_assoc_string(&tmp1, "dn", dn);
if (dn) {
add_assoc_string(&tmp1, "dn", dn);
} else {
add_assoc_null(&tmp1, "dn");
}
#if (LDAP_API_VERSION > 2000) || HAVE_NSLDAP || HAVE_ORALDAP || WINDOWS
ldap_memfree(dn);
#else
+40
View File
@@ -0,0 +1,40 @@
--TEST--
Bug #76248 (Malicious LDAP-Server Response causes Crash)
--SKIPIF--
<?php
require_once('skipif.inc');
if (!function_exists('pcntl_fork')) die('skip fork not available');
?>
--FILE--
<?php
$pid = pcntl_fork();
const PORT = 12345;
if ($pid == 0) {
// child
$server = stream_socket_server("tcp://127.0.0.1:12345");
$socket = stream_socket_accept($server, 3);
fwrite($socket, base64_decode("MAwCAQFhBwoBAAQABAAweQIBAmR0BJljbj1yb290LGRjPWV4YW1wbGUsZGM9Y29tMFcwIwQLb2JqZWN0Q2xhc3MxFAQSb3JnYW5pemF0aW9uYWxSb2xlMAwEAmNuMQYEBHJvb3QwIgQLZGVzY3JpcHRpb24xEwQRRGlyZWN0b3J5IE1hbmFnZXIwDAIBAmUHCgEABAAEADB5AgEDZHQEmWNuPXJvb3QsZGM9ZXhhbXBsZSxkYz1jb20wVzAjBAtvYmplY3RDbGFzczEUBBJvcmdhbml6YXRpb25hbFJvbGUwDAQCY24xBgQEcm9vdDAiBAtkZXNjcmlwdGlvbjETBBFEaXJlY3RvcnkgTWFuYWdlcjAMAgEDZQcKAQAEAAQA"));
fflush($socket);
} else {
// parent
$ds = ldap_connect("127.0.0.1", PORT);
ldap_set_option($ds, LDAP_OPT_PROTOCOL_VERSION, 3);
$b = ldap_bind($ds, "cn=root,dc=example,dc=com", "secret");
$s = ldap_search($ds, "dc=example,dc=com", "(cn=root)");
$tt = ldap_get_entries($ds, $s);
var_dump($tt);
}
?>
--EXPECT--
array(2) {
["count"]=>
int(1)
[0]=>
array(2) {
["count"]=>
int(0)
["dn"]=>
NULL
}
}
@@ -142,7 +142,7 @@ mbfl_filt_conv_wchar_cp1251(int c, mbfl_convert_filter *filter)
/* all of this is so ugly now! */
static int mbfl_filt_ident_cp1251(int c, mbfl_identify_filter *filter)
{
if (c >= 0x80 && c < 0xff)
if (c >= 0x80 && c <= 0xff)
filter->flag = 0;
else
filter->flag = 1; /* not it */
+1 -1
View File
@@ -449,7 +449,7 @@ static php_mb_regex_t *php_mbregex_compile_pattern(const char *pattern, int patl
OnigUChar err_str[ONIG_MAX_ERROR_MESSAGE_LEN];
rc = zend_hash_str_find_ptr(&MBREX(ht_rc), (char *)pattern, patlen);
if (!rc || rc->options != options || rc->enc != enc || rc->syntax != syntax) {
if (!rc || onig_get_options(rc) != options || onig_get_encoding(rc) != enc || onig_get_syntax(rc) != syntax) {
if ((err_code = onig_new(&retval, (OnigUChar *)pattern, (OnigUChar *)(pattern + patlen), options, enc, syntax, &err_info)) != ONIG_NORMAL) {
onig_error_code_to_str(err_str, err_code, &err_info);
php_error_docref(NULL, E_WARNING, "mbregex compile err: %s", err_str);
+13
View File
@@ -0,0 +1,13 @@
--TEST--
Bug #75944 (wrong detection cp1251 encoding because of missing last cyrillic letter)
--SKIPIF--
<?php extension_loaded('mbstring') or die('skip mbstring not available'); ?>
--FILE--
<?php
var_dump(mb_detect_encoding(chr(0xfe), array('CP-1251'))); // letter '?'
var_dump(mb_detect_encoding(chr(0xff), array('CP-1251'))); // letter '?'
?>
--EXPECT--
string(12) "Windows-1251"
string(12) "Windows-1251"
+3 -3
View File
@@ -8,10 +8,10 @@ mysqli autocommit/commit/rollback
$link = my_mysqli_connect($host, $user, $passwd, $db, $port, $socket);
if (!$link)
die(sprintf("Cannot connect, [%d] %s", mysqli_connect_errno(), mysqli_connect_error()));
die(sprintf("skip Cannot connect, [%d] %s", mysqli_connect_errno(), mysqli_connect_error()));
if (!have_innodb($link))
die(sprintf("Needs InnoDB support, [%d] %s", $link->errno, $link->error));
die(sprintf("skip Needs InnoDB support, [%d] %s", $link->errno, $link->error));
?>
--FILE--
<?php
@@ -94,4 +94,4 @@ array(2) {
[1]=>
string(4) "egon"
}
done!
done!
+1 -1
View File
@@ -12,7 +12,7 @@ require_once __DIR__ . '/skipif.inc';
require_once __DIR__ . '/skipifconnectfailure.inc';
require_once __DIR__ . '/connect.inc';
if (!$IS_MYSQLND) {
die('mysqlnd only');
die('skip mysqlnd only');
}
?>
--FILE--
+2 -1
View File
@@ -356,7 +356,8 @@ static zend_bool dce_instr(context *ctx, zend_op *opline, zend_ssa_op *ssa_op) {
if ((opline->op1_type & (IS_VAR|IS_TMP_VAR))&& !is_var_dead(ctx, ssa_op->op1_use)) {
if (!try_remove_var_def(ctx, ssa_op->op1_use, ssa_op->op1_use_chain, opline)) {
if (ssa->var_info[ssa_op->op1_use].type & (MAY_BE_STRING|MAY_BE_ARRAY|MAY_BE_OBJECT|MAY_BE_RESOURCE|MAY_BE_REF)) {
if (ssa->var_info[ssa_op->op1_use].type & (MAY_BE_STRING|MAY_BE_ARRAY|MAY_BE_OBJECT|MAY_BE_RESOURCE|MAY_BE_REF)
&& opline->opcode != ZEND_CASE) {
free_var = ssa_op->op1_use;
free_var_type = opline->op1_type;
}
+2 -1
View File
@@ -820,7 +820,8 @@ static inline int ct_eval_func_call(
} else if (zend_string_equals_literal(name, "substr")) {
if (Z_TYPE_P(args[0]) != IS_STRING
|| Z_TYPE_P(args[1]) != IS_LONG
|| Z_TYPE_P(args[2]) != IS_LONG) {
|| Z_TYPE_P(args[2]) != IS_LONG
|| (CG(compiler_options) & ZEND_COMPILE_NO_BUILTIN_STRLEN)) {
return FAILURE;
}
/* pass */
+7 -1
View File
@@ -87,7 +87,13 @@ opcache.max_accelerated_files (default "2000")
between 200 and 1000000 are allowed.
opcache.max_wasted_percentage (default "5")
The maximum percentage of "wasted" memory until a restart is scheduled.
When the cache fills up this setting decides when to actually reset (dump
all entries) it. At the default of 5% it means that if less than 5% of
the entries in the now full cache are wasted/orphaned, then you have a good
active cache. There is no point emptying a cache full of good entries
only to most likely refill it with those same entries. Once more than 5%
of the cache consists of wasted entries, the cache will reset in this
cache-full scenario. This can be set up to as high as 50%.
opcache.use_cwd (default "1")
When this directive is enabled, the OPcache appends the current working
+4
View File
@@ -9,8 +9,12 @@ mbstring.func_overload=2
<?php
var_dump(strpos("foo", "o"));
var_dump(substr("foo", 1));
var_dump(substr("foo", 1, 1));
?>
--EXPECT--
Deprecated: The mbstring.func_overload directive is deprecated in Unknown on line 0
int(1)
string(2) "oo"
string(1) "o"
+26
View File
@@ -0,0 +1,26 @@
--TEST--
Bug #76094 (Access violation when using opcache)
--INI--
opcache.enable=1
opcache.enable_cli=1
opcache.optimization_level=-1
--SKIPIF--
<?php require_once('skipif.inc'); ?>
--FILE--
<?php
function MetaType($t)
{
switch (strtoupper($t)) {
case PHP_INT_MAX :
return 1;
case 0:
default:
return 0;
}
}
var_dump(MetaType("aa"));
?>
--EXPECT--
int(0)
+9 -7
View File
@@ -852,13 +852,6 @@ static void zend_accel_persist_class_table(HashTable *class_table)
zend_persistent_script *zend_accel_script_persist(zend_persistent_script *script, char **key, unsigned int key_length, int for_shm)
{
script->mem = ZCG(mem);
script->corrupted = 0;
ZCG(current_persistent_script) = script;
if (!for_shm) {
/* script is not going to be saved in SHM */
script->corrupted = 1;
}
ZEND_ASSERT(((zend_uintptr_t)ZCG(mem) & 0x7) == 0); /* should be 8 byte aligned */
zend_shared_alloc_clear_xlat_table();
@@ -867,6 +860,15 @@ zend_persistent_script *zend_accel_script_persist(zend_persistent_script *script
if (key && *key) {
*key = zend_accel_memdup(*key, key_length + 1);
}
script->corrupted = 0;
ZCG(current_persistent_script) = script;
if (!for_shm) {
/* script is not going to be saved in SHM */
script->corrupted = 1;
}
zend_accel_store_interned_string(script->script.filename);
#ifdef __SSE2__
+2 -4
View File
@@ -308,8 +308,7 @@ static void phar_do_403(char *entry, int entry_len) /* {{{ */
sapi_header_op(SAPI_HEADER_REPLACE, &ctr);
sapi_send_headers();
PHPWRITE("<html>\n <head>\n <title>Access Denied</title>\n </head>\n <body>\n <h1>403 - File ", sizeof("<html>\n <head>\n <title>Access Denied</title>\n </head>\n <body>\n <h1>403 - File ") - 1);
PHPWRITE(entry, entry_len);
PHPWRITE(" Access Denied</h1>\n </body>\n</html>", sizeof(" Access Denied</h1>\n </body>\n</html>") - 1);
PHPWRITE("Access Denied</h1>\n </body>\n</html>", sizeof("Access Denied</h1>\n </body>\n</html>") - 1);
}
/* }}} */
@@ -333,8 +332,7 @@ static void phar_do_404(phar_archive_data *phar, char *fname, int fname_len, cha
sapi_header_op(SAPI_HEADER_REPLACE, &ctr);
sapi_send_headers();
PHPWRITE("<html>\n <head>\n <title>File Not Found</title>\n </head>\n <body>\n <h1>404 - File ", sizeof("<html>\n <head>\n <title>File Not Found</title>\n </head>\n <body>\n <h1>404 - File ") - 1);
PHPWRITE(entry, entry_len);
PHPWRITE(" Not Found</h1>\n </body>\n</html>", sizeof(" Not Found</h1>\n </body>\n</html>") - 1);
PHPWRITE("Not Found</h1>\n </body>\n</html>", sizeof("Not Found</h1>\n </body>\n</html>") - 1);
}
/* }}} */
@@ -20,6 +20,6 @@ Status: 403 Access Denied
<title>Access Denied</title>
</head>
<body>
<h1>403 - File /hi Access Denied</h1>
<h1>403 - File Access Denied</h1>
</body>
</html>
@@ -18,6 +18,6 @@ Status: 404 Not Found
<title>File Not Found</title>
</head>
<body>
<h1>404 - File /notfound.php Not Found</h1>
<h1>404 - File Not Found</h1>
</body>
</html>
@@ -18,6 +18,6 @@ Status: 404 Not Found
<title>File Not Found</title>
</head>
<body>
<h1>404 - File /index.php Not Found</h1>
<h1>404 - File Not Found</h1>
</body>
</html>
+1 -1
View File
@@ -19,6 +19,6 @@ Status: 403 Access Denied
<title>Access Denied</title>
</head>
<body>
<h1>403 - File /hi Access Denied</h1>
<h1>403 - File Access Denied</h1>
</body>
</html>
+1 -1
View File
@@ -16,6 +16,6 @@ Status: 404 Not Found
<title>File Not Found</title>
</head>
<body>
<h1>404 - File /notfound.php Not Found</h1>
<h1>404 - File Not Found</h1>
</body>
</html>
+1 -1
View File
@@ -16,6 +16,6 @@ Status: 404 Not Found
<title>File Not Found</title>
</head>
<body>
<h1>404 - File /index.php Not Found</h1>
<h1>404 - File Not Found</h1>
</body>
</html>
@@ -19,6 +19,6 @@ Status: 403 Access Denied
<title>Access Denied</title>
</head>
<body>
<h1>403 - File /hi Access Denied</h1>
<h1>403 - File Access Denied</h1>
</body>
</html>
@@ -16,6 +16,6 @@ Status: 404 Not Found
<title>File Not Found</title>
</head>
<body>
<h1>404 - File /notfound.php Not Found</h1>
<h1>404 - File Not Found</h1>
</body>
</html>
@@ -16,6 +16,6 @@ Status: 404 Not Found
<title>File Not Found</title>
</head>
<body>
<h1>404 - File /index.php Not Found</h1>
<h1>404 - File Not Found</h1>
</body>
</html>
@@ -19,6 +19,6 @@ Status: 403 Access Denied
<title>Access Denied</title>
</head>
<body>
<h1>403 - File /hi Access Denied</h1>
<h1>403 - File Access Denied</h1>
</body>
</html>
@@ -17,6 +17,6 @@ Status: 404 Not Found
<title>File Not Found</title>
</head>
<body>
<h1>404 - File /notfound.php Not Found</h1>
<h1>404 - File Not Found</h1>
</body>
</html>
@@ -16,6 +16,6 @@ Status: 404 Not Found
<title>File Not Found</title>
</head>
<body>
<h1>404 - File /index.php Not Found</h1>
<h1>404 - File Not Found</h1>
</body>
</html>
+1 -1
View File
@@ -7,7 +7,7 @@ Olivier Doucet Olivier Doucet Boris Lytochkin
require_once(dirname(__FILE__).'/skipif.inc');
require_once(dirname(__FILE__).'/snmp_include.inc');
if (!file_exists($mibdir . '/SNMPv2-MIB.txt')) die('MIB file not in the system');
if (!file_exists($mibdir . '/SNMPv2-MIB.txt')) die('skip MIB file not in the system');
?>
--FILE--
+9 -11
View File
@@ -1521,6 +1521,7 @@ PHP_METHOD(SoapServer, handle)
xmlCharEncodingHandlerPtr old_encoding;
HashTable *old_class_map, *old_typemap;
int old_features;
zval tmp_soap;
SOAP_SERVER_BEGIN_CODE();
@@ -1684,8 +1685,7 @@ PHP_METHOD(SoapServer, handle)
#if HAVE_PHP_SESSION && !defined(COMPILE_DL_SESSION)
/* If persistent then set soap_obj from from the previous created session (if available) */
if (service->soap_class.persistence == SOAP_PERSISTENCE_SESSION) {
zval *tmp_soap;
zval *session_vars;
zval *session_vars, *tmp_soap_p;
if (PS(session_status) != php_session_active &&
PS(session_status) != php_session_disabled) {
@@ -1696,16 +1696,15 @@ PHP_METHOD(SoapServer, handle)
session_vars = &PS(http_session_vars);
ZVAL_DEREF(session_vars);
if (Z_TYPE_P(session_vars) == IS_ARRAY &&
(tmp_soap = zend_hash_str_find(Z_ARRVAL_P(session_vars), "_bogus_session_name", sizeof("_bogus_session_name")-1)) != NULL &&
Z_TYPE_P(tmp_soap) == IS_OBJECT &&
Z_OBJCE_P(tmp_soap) == service->soap_class.ce) {
soap_obj = tmp_soap;
(tmp_soap_p = zend_hash_str_find(Z_ARRVAL_P(session_vars), "_bogus_session_name", sizeof("_bogus_session_name")-1)) != NULL &&
Z_TYPE_P(tmp_soap_p) == IS_OBJECT &&
Z_OBJCE_P(tmp_soap_p) == service->soap_class.ce) {
soap_obj = tmp_soap_p;
}
}
#endif
/* If new session or something weird happned */
if (soap_obj == NULL) {
zval tmp_soap;
object_init_ex(&tmp_soap, service->soap_class.ce);
@@ -1758,13 +1757,12 @@ PHP_METHOD(SoapServer, handle)
#if HAVE_PHP_SESSION && !defined(COMPILE_DL_SESSION)
/* If session then update session hash with new object */
if (service->soap_class.persistence == SOAP_PERSISTENCE_SESSION) {
zval *tmp_soap_pp;
zval *session_vars = &PS(http_session_vars);
zval *session_vars = &PS(http_session_vars), *tmp_soap_p;
ZVAL_DEREF(session_vars);
if (Z_TYPE_P(session_vars) == IS_ARRAY &&
(tmp_soap_pp = zend_hash_str_update(Z_ARRVAL_P(session_vars), "_bogus_session_name", sizeof("_bogus_session_name")-1, &tmp_soap)) != NULL) {
soap_obj = tmp_soap_pp;
(tmp_soap_p = zend_hash_str_update(Z_ARRVAL_P(session_vars), "_bogus_session_name", sizeof("_bogus_session_name")-1, &tmp_soap)) != NULL) {
soap_obj = tmp_soap_p;
} else {
soap_obj = &tmp_soap;
}
+1 -1
View File
@@ -6,7 +6,7 @@ if (!extension_loaded('sockets')) {
die('skip sockets extension not available.');
}
if (PHP_OS !== 'Darwin') {
die('is not OSX.');
die('skip Is not OSX.');
}
--FILE--
<?php
+2 -2
View File
@@ -1883,8 +1883,8 @@ outexcept:
/* {{{ arginfo and function table */
ZEND_BEGIN_ARG_INFO_EX(arginfo_array___construct, 0, 0, 0)
ZEND_ARG_INFO(0, array)
ZEND_ARG_INFO(0, ar_flags)
ZEND_ARG_INFO(0, input)
ZEND_ARG_INFO(0, flags)
ZEND_ARG_INFO(0, iterator_class)
ZEND_END_ARG_INFO()
+2 -2
View File
@@ -34,7 +34,7 @@
/*
The following php_mt_...() functions are based on a C++ class MTRand by
Richard J. Wagner. For more information see the web page at
http://www-personal.engin.umich.edu/~wagnerr/MersenneTwister.html
http://www.math.sci.hiroshima-u.ac.jp/~m-mat/MT/VERSIONS/C-LANG/MersenneTwister.h
Mersenne Twister random number generator -- a C++ class MTRand
Based on code by Makoto Matsumoto, Takuji Nishimura, and Shawn Cokus
@@ -45,7 +45,7 @@
The period, 2^19937-1, and the order of equidistribution, 623 dimensions,
are far greater. The generator is also fast; it avoids multiplication and
division, and it benefits from caches and pipelines. For more information
see the inventors' web page at http://www.math.keio.ac.jp/~matumoto/emt.html
see the inventors' web page at http://www.math.sci.hiroshima-u.ac.jp/~m-mat/MT/emt.html
Reference
M. Matsumoto and T. Nishimura, "Mersenne Twister: A 623-Dimensionally
+1 -1
View File
@@ -7,7 +7,7 @@ if (substr(PHP_OS, 0, 3) != 'WIN') {
}
$php = getenv('TEST_PHP_EXECUTABLE');
if (!$php) {
die("No php executable defined\n");
die("skip No php executable defined\n");
}
?>
--FILE--
@@ -13,7 +13,7 @@ include_once __DIR__ . '/common.inc';
$cmd = "mklink /?";
$ret = @exec($cmd, $output, $return_val);
if (count($output) == 0) {
die("mklink.exe not found in PATH");
die("skip mklink.exe not found in PATH");
}
?>
--FILE--
@@ -13,7 +13,7 @@ include_once __DIR__ . '/common.inc';
$cmd = "mklink /?";
$ret = @exec($cmd, $output, $return_val);
if (count($output) == 0) {
die("mklink.exe not found in PATH");
die("skip mklink.exe not found in PATH");
}
?>
--FILE--
+1 -1
View File
@@ -3,7 +3,7 @@ Chunked encoding
--SKIPIF--
<?php
$filters = stream_get_filters();
if(! in_array( "dechunk", $filters )) die( "chunked filter not available." );
if(! in_array( "dechunk", $filters )) die( "skip Chunked filter not available." );
?>
--INI--
allow_url_fopen=1
+1 -1
View File
@@ -64,7 +64,7 @@ string(1) "?"
string(1) ","
string(1) " "
++++++++++++++++++++++
string(25) "Czech_Czech Republic.1250"
string(%d) "Czech_Czech%s.1250"
string(1) ","
string(1) " "
string(3) "CZK"
+1 -1
View File
@@ -2,7 +2,7 @@
Bug #72434: ZipArchive class Use After Free Vulnerability in PHP's GC algorithm and unserialize
--SKIPIF--
<?php
if(!class_exists('zip')) die('ZipArchive');
if(!class_exists('zip')) die('skip ZipArchive');
?>
--FILE--
<?php
+1 -1
View File
@@ -36,7 +36,7 @@ extern zend_module_entry xml_module_entry;
#ifdef HAVE_XML
#include "ext/xml/expat_compat.h"
#include "expat_compat.h"
#ifdef XML_UNICODE
#error "UTF-16 Unicode support not implemented!"
+4
View File
@@ -350,6 +350,7 @@ static void php_load_php_extension_cb(void *arg)
/* {{{ php_load_zend_extension_cb
*/
#ifdef HAVE_LIBDL
static void php_load_zend_extension_cb(void *arg)
{
char *filename = *((char **) arg);
@@ -409,6 +410,9 @@ static void php_load_zend_extension_cb(void *arg)
efree(libpath);
}
}
#else
static void php_load_zend_extension_cb(void *arg) { }
#endif
/* }}} */
/* {{{ php_init_config
+4 -4
View File
@@ -2,7 +2,7 @@
/* edit configure.ac to change version number */
#define PHP_MAJOR_VERSION 7
#define PHP_MINOR_VERSION 2
#define PHP_RELEASE_VERSION 4
#define PHP_EXTRA_VERSION "RC1"
#define PHP_VERSION "7.2.4RC1"
#define PHP_VERSION_ID 70204
#define PHP_RELEASE_VERSION 5
#define PHP_EXTRA_VERSION ""
#define PHP_VERSION "7.2.5"
#define PHP_VERSION_ID 70205
+2 -2
View File
@@ -878,7 +878,6 @@ default_socket_timeout = 60
;
; Notes for Windows environments :
;
; - ODBC support is built in, so no dll is needed for it.
; - Many DLL files are located in the extensions/ (PHP 4) or ext/ (PHP 5+)
; extension folders as well as the separate PECL DLL download (PHP 5+).
; Be sure to appropriately set the extension_dir directive.
@@ -897,6 +896,7 @@ default_socket_timeout = 60
;extension=exif ; Must be after mbstring as it depends on it
;extension=mysqli
;extension=oci8_12c ; Use with Oracle Database 12c Instant Client
;extension=odbc
;extension=openssl
;extension=pdo_firebird
;extension=pdo_mysql
@@ -1042,7 +1042,7 @@ smtp_port = 25
;mail.force_extra_parameters =
; Add X-PHP-Originating-Script: that will include uid of the script followed by the filename
mail.add_x_header = On
mail.add_x_header = Off
; The path to a log file that will log all mail() calls. Log entries include
; the full path of the script, line number, To address and headers.
+2 -2
View File
@@ -885,7 +885,6 @@ default_socket_timeout = 60
;
; Notes for Windows environments :
;
; - ODBC support is built in, so no dll is needed for it.
; - Many DLL files are located in the extensions/ (PHP 4) or ext/ (PHP 5+)
; extension folders as well as the separate PECL DLL download (PHP 5+).
; Be sure to appropriately set the extension_dir directive.
@@ -904,6 +903,7 @@ default_socket_timeout = 60
;extension=exif ; Must be after mbstring as it depends on it
;extension=mysqli
;extension=oci8_12c ; Use with Oracle Database 12c Instant Client
;extension=odbc
;extension=openssl
;extension=pdo_firebird
;extension=pdo_mysql
@@ -1049,7 +1049,7 @@ smtp_port = 25
;mail.force_extra_parameters =
; Add X-PHP-Originating-Script: that will include uid of the script followed by the filename
mail.add_x_header = On
mail.add_x_header = Off
; The path to a log file that will log all mail() calls. Log entries include
; the full path of the script, line number, To address and headers.
+6 -2
View File
@@ -876,7 +876,9 @@ HELP;
junit_save_xml();
if (getenv('REPORT_EXIT_STATUS') == 1 && ($sum_results['FAILED'] || $sum_results['BORKED'])) {
if (getenv('REPORT_EXIT_STATUS') !== '0' &&
getenv('REPORT_EXIT_STATUS') !== 'no' &&
($sum_results['FAILED'] || $sum_results['BORKED'])) {
exit(1);
}
@@ -1016,7 +1018,9 @@ save_or_mail_results();
junit_save_xml();
if (getenv('REPORT_EXIT_STATUS') == 1 && ($sum_results['FAILED'] || $sum_results['BORKED'])) {
if (getenv('REPORT_EXIT_STATUS') !== '0' &&
getenv('REPORT_EXIT_STATUS') !== 'no' &&
($sum_results['FAILED'] || $sum_results['BORKED'])) {
exit(1);
}
exit(0);
+3
View File
@@ -132,6 +132,7 @@ static struct ini_value_parser_s ini_fpm_pool_options[] = {
{ "listen.mode", &fpm_conf_set_string, WPO(listen_mode) },
{ "listen.allowed_clients", &fpm_conf_set_string, WPO(listen_allowed_clients) },
{ "process.priority", &fpm_conf_set_integer, WPO(process_priority) },
{ "process.dumpable", &fpm_conf_set_boolean, WPO(process_dumpable) },
{ "pm", &fpm_conf_set_pm, WPO(pm) },
{ "pm.max_children", &fpm_conf_set_integer, WPO(pm_max_children) },
{ "pm.start_servers", &fpm_conf_set_integer, WPO(pm_start_servers) },
@@ -614,6 +615,7 @@ static void *fpm_worker_pool_config_alloc() /* {{{ */
wp->config->listen_backlog = FPM_BACKLOG_DEFAULT;
wp->config->pm_process_idle_timeout = 10; /* 10s by default */
wp->config->process_priority = 64; /* 64 means unset */
wp->config->process_dumpable = 0;
wp->config->clear_env = 1;
if (!fpm_worker_all_pools) {
@@ -1646,6 +1648,7 @@ static void fpm_conf_dump() /* {{{ */
} else {
zlog(ZLOG_NOTICE, "\tprocess.priority = %d", wp->config->process_priority);
}
zlog(ZLOG_NOTICE, "\tprocess.dumpable = %s", BOOL2STR(wp->config->process_dumpable));
zlog(ZLOG_NOTICE, "\tpm = %s", PM2STR(wp->config->pm));
zlog(ZLOG_NOTICE, "\tpm.max_children = %d", wp->config->pm_max_children);
zlog(ZLOG_NOTICE, "\tpm.start_servers = %d", wp->config->pm_start_servers);
+1
View File
@@ -64,6 +64,7 @@ struct fpm_worker_pool_config_s {
char *listen_mode;
char *listen_allowed_clients;
int process_priority;
int process_dumpable;
int pm;
int pm_max_children;
int pm_start_servers;
+68 -25
View File
@@ -44,6 +44,10 @@ enum { FPM_GET_USE_SOCKET = 1, FPM_STORE_SOCKET = 2, FPM_STORE_USE_SOCKET = 3 };
static void fpm_sockets_cleanup(int which, void *arg) /* {{{ */
{
unsigned i;
unsigned socket_set_count = 0;
unsigned socket_set[FPM_ENV_SOCKET_SET_MAX];
unsigned socket_set_buf = 0;
char envname[32];
char *env_value = 0;
int p = 0;
struct listening_socket_s *ls = sockets_list.data;
@@ -54,8 +58,20 @@ static void fpm_sockets_cleanup(int which, void *arg) /* {{{ */
} else { /* on PARENT EXEC we want socket fds to be inherited through environment variable */
char fd[32];
sprintf(fd, "%d", ls->sock);
env_value = realloc(env_value, p + (p ? 1 : 0) + strlen(ls->key) + 1 + strlen(fd) + 1);
p += sprintf(env_value + p, "%s%s=%s", p ? "," : "", ls->key, fd);
socket_set_buf = (i % FPM_ENV_SOCKET_SET_SIZE == 0 && i) ? 1 : 0;
env_value = realloc(env_value, p + (p ? 1 : 0) + strlen(ls->key) + 1 + strlen(fd) + socket_set_buf + 1);
if (i % FPM_ENV_SOCKET_SET_SIZE == 0) {
socket_set[socket_set_count] = p + socket_set_buf;
socket_set_count++;
if (i) {
*(env_value + p + 1) = 0;
}
}
p += sprintf(env_value + p + socket_set_buf, "%s%s=%s", (p && !socket_set_buf) ? "," : "", ls->key, fd);
p += socket_set_buf;
}
if (which == FPM_CLEANUP_PARENT_EXIT_MAIN) {
@@ -67,7 +83,14 @@ static void fpm_sockets_cleanup(int which, void *arg) /* {{{ */
}
if (env_value) {
setenv("FPM_SOCKETS", env_value, 1);
for (i = 0; i < socket_set_count; i++) {
if (!i) {
strcpy(envname, "FPM_SOCKETS");
} else {
sprintf(envname, "FPM_SOCKETS_%d", i);
}
setenv(envname, env_value + socket_set[i], 1);
}
free(env_value);
}
@@ -352,7 +375,9 @@ int fpm_sockets_init_main() /* {{{ */
{
unsigned i, lq_len;
struct fpm_worker_pool_s *wp;
char *inherited = getenv("FPM_SOCKETS");
char sockname[32];
char sockpath[256];
char *inherited;
struct listening_socket_s *ls;
if (0 == fpm_array_init(&sockets_list, sizeof(struct listening_socket_s), 10)) {
@@ -360,28 +385,46 @@ int fpm_sockets_init_main() /* {{{ */
}
/* import inherited sockets */
while (inherited && *inherited) {
char *comma = strchr(inherited, ',');
int type, fd_no;
char *eq;
if (comma) {
*comma = '\0';
}
eq = strchr(inherited, '=');
if (eq) {
*eq = '\0';
fd_no = atoi(eq + 1);
type = fpm_sockets_domain_from_address(inherited);
zlog(ZLOG_NOTICE, "using inherited socket fd=%d, \"%s\"", fd_no, inherited);
fpm_sockets_hash_op(fd_no, 0, inherited, type, FPM_STORE_SOCKET);
}
if (comma) {
inherited = comma + 1;
for (i = 0; i < FPM_ENV_SOCKET_SET_MAX; i++) {
if (!i) {
strcpy(sockname, "FPM_SOCKETS");
} else {
inherited = 0;
sprintf(sockname, "FPM_SOCKETS_%d", i);
}
inherited = getenv(sockname);
if (!inherited) {
break;
}
while (inherited && *inherited) {
char *comma = strchr(inherited, ',');
int type, fd_no;
char *eq;
if (comma) {
*comma = '\0';
}
eq = strchr(inherited, '=');
if (eq) {
int sockpath_len = eq - inherited;
if (sockpath_len > 255) {
/* this should never happen as UDS limit is lower */
sockpath_len = 255;
}
memcpy(sockpath, inherited, sockpath_len);
sockpath[sockpath_len] = '\0';
fd_no = atoi(eq + 1);
type = fpm_sockets_domain_from_address(sockpath);
zlog(ZLOG_NOTICE, "using inherited socket fd=%d, \"%s\"", fd_no, sockpath);
fpm_sockets_hash_op(fd_no, 0, sockpath, type, FPM_STORE_SOCKET);
}
if (comma) {
inherited = comma + 1;
} else {
inherited = 0;
}
}
}
+4 -1
View File
@@ -19,9 +19,12 @@
#if (__FreeBSD__) || (__OpenBSD__)
#define FPM_BACKLOG_DEFAULT -1
#else
#define FPM_BACKLOG_DEFAULT 511
#define FPM_BACKLOG_DEFAULT 511
#endif
#define FPM_ENV_SOCKET_SET_MAX 256
#define FPM_ENV_SOCKET_SET_SIZE 128
enum fpm_address_domain fpm_sockets_domain_from_address(char *addr);
int fpm_sockets_init_main();
int fpm_socket_get_listening_queue(int sock, unsigned *cur_lq, unsigned *max_lq);
+1 -1
View File
@@ -398,7 +398,7 @@ int fpm_unix_init_child(struct fpm_worker_pool_s *wp) /* {{{ */
}
#ifdef HAVE_PRCTL
if (0 > prctl(PR_SET_DUMPABLE, 1, 0, 0, 0)) {
if (wp->config->process_dumpable && 0 > prctl(PR_SET_DUMPABLE, 1, 0, 0, 0)) {
zlog(ZLOG_SYSERROR, "[pool %s] failed to prctl(PR_SET_DUMPABLE)", wp->config->name);
}
#endif
+6
View File
@@ -69,6 +69,12 @@ listen = 127.0.0.1:9000
; Default Value: no set
; process.priority = -19
; Set the process dumpable flag (PR_SET_DUMPABLE prctl) even if the process user
; or group is differrent than the master process user. It allows to create process
; core dump and ptrace the process for the pool user.
; Default Value: no
; process.dumpable = yes
; Choose how the process manager will control the number of child processes.
; Possible Values:
; static - a fixed number (pm.max_children) of child processes;
+2 -1
View File
@@ -464,7 +464,7 @@ static int sapi_lsapi_activate()
static sapi_module_struct lsapi_sapi_module =
{
"litespeed",
"LiteSpeed V7.0",
"LiteSpeed V7.1",
php_lsapi_startup, /* startup */
php_module_shutdown_wrapper, /* shutdown */
@@ -574,6 +574,7 @@ static int alter_ini( const char * pKey, int keyLen, const char * pValue, int va
++pKey;
if ( *pKey == 4 ) {
type = ZEND_INI_SYSTEM;
stage = PHP_INI_STAGE_ACTIVATE;
}
else
{
+23 -9
View File
@@ -151,6 +151,7 @@ static int *s_accepting_workers = NULL;
static int *s_global_counter = &s_req_processed;
static int s_max_busy_workers = -1;
static char *s_stderr_log_path = NULL;
static int s_ignore_pid = -1;
LSAPI_Request g_req =
{ .m_fdListen = -1, .m_fd = -1 };
@@ -1140,7 +1141,13 @@ static int lsapi_changeUGid( LSAPI_Request * pReq )
}
s_uid = uid;
if ( pReq->m_fdListen != -1 )
{
close( pReq->m_fdListen );
pReq->m_fdListen = -1;
}
pStderrLog = LSAPI_GetEnv_r( pReq, "LSAPI_STDERR_LOG");
if (pStderrLog)
lsapi_reopen_stderr(pStderrLog);
@@ -2806,6 +2813,12 @@ static void lsapi_sigchild( int signal )
pid = 0;
continue;
}
if ( pid == s_ignore_pid )
{
pid = 0;
s_ignore_pid = -1;
continue;
}
child_status = find_child_status( pid );
if ( child_status )
{
@@ -3024,7 +3037,7 @@ static int lsapi_prefork_server_accept( lsapi_prefork_server * pServer,
while( !s_stop )
{
if (s_proc_group_timer_cb != NULL) {
s_proc_group_timer_cb();
s_proc_group_timer_cb(&s_ignore_pid);
}
curTime = time( NULL );
@@ -3119,13 +3132,14 @@ static int lsapi_prefork_server_accept( lsapi_prefork_server * pServer,
if (s_busy_workers)
__sync_add_and_fetch(s_busy_workers, 1);
lsapi_set_nblock( pReq->m_fd, 0 );
//keep it open if busy_count is used.
s_keepListener = 1;
// if ( pReq->m_fdListen != -1 )
// {
// close( pReq->m_fdListen );
// pReq->m_fdListen = -1;
// }
//keep it open if busy_count is used.
if (s_busy_workers && s_uid != 0)
s_keepListener = 1;
else if ( pReq->m_fdListen != -1 )
{
close( pReq->m_fdListen );
pReq->m_fdListen = -1;
}
/* don't catch our signals */
sigaction( SIGCHLD, &old_child, 0 );
sigaction( SIGTERM, &old_term, 0 );
+1 -1
View File
@@ -384,7 +384,7 @@ int LSAPI_is_suEXEC_Daemon(void);
int LSAPI_Set_Restored_Parent_Pid(int pid);
typedef void (*LSAPI_On_Timer_pf)(void);
typedef void (*LSAPI_On_Timer_pf)(int *forked_child_pid);
void LSAPI_Register_Pgrp_Timer_Callback(LSAPI_On_Timer_pf);
int LSAPI_Inc_Req_Processed(int cnt);
+155 -677
View File
File diff suppressed because it is too large. Load diff
+8 -13
View File
@@ -290,7 +290,7 @@ PHPDBG_API int phpdbg_create_listenable_socket(const char *addr, unsigned short
}
}
snprintf(port_buf, 7, "%u", port);
snprintf(port_buf, sizeof(port_buf), "%u", port);
if (!any_addr) {
rc = getaddrinfo(addr, port_buf, &hints, &res);
} else {
@@ -301,20 +301,18 @@ PHPDBG_API int phpdbg_create_listenable_socket(const char *addr, unsigned short
#ifndef PHP_WIN32
if (rc == EAI_SYSTEM) {
char buf[128];
int wrote;
wrote = snprintf(buf, 128, "Could not translate address '%s'", addr);
buf[wrote] = '\0';
snprintf(buf, sizeof(buf), "Could not translate address '%s'", addr);
zend_quiet_write(PHPDBG_G(io)[PHPDBG_STDERR].fd, buf, strlen(buf));
return sock;
} else {
#endif
char buf[256];
int wrote;
wrote = snprintf(buf, 256, "Host '%s' not found. %s", addr, estrdup(gai_strerror(rc)));
buf[wrote] = '\0';
snprintf(buf, sizeof(buf), "Host '%s' not found. %s", addr, estrdup(gai_strerror(rc)));
zend_quiet_write(PHPDBG_G(io)[PHPDBG_STDERR].fd, buf, strlen(buf));
return sock;
@@ -324,13 +322,10 @@ PHPDBG_API int phpdbg_create_listenable_socket(const char *addr, unsigned short
return sock;
}
if((sock = socket(res->ai_family, res->ai_socktype, res->ai_protocol)) == -1) {
char buf[128];
int wrote;
if ((sock = socket(res->ai_family, res->ai_socktype, res->ai_protocol)) == -1) {
const char *msg = "Unable to create socket";
wrote = sprintf(buf, "Unable to create socket");
buf[wrote] = '\0';
zend_quiet_write(PHPDBG_G(io)[PHPDBG_STDERR].fd, buf, strlen(buf));
zend_quiet_write(PHPDBG_G(io)[PHPDBG_STDERR].fd, msg, strlen(msg));
return sock;
}
+7 -1
View File
@@ -73,6 +73,7 @@ VC_VERSIONS[1910] = 'MSVC15 (Visual C++ 2017)';
VC_VERSIONS[1911] = 'MSVC15 (Visual C++ 2017)';
VC_VERSIONS[1912] = 'MSVC15 (Visual C++ 2017)';
VC_VERSIONS[1913] = 'MSVC15 (Visual C++ 2017)';
VC_VERSIONS[1914] = 'MSVC15 (Visual C++ 2017)';
var VC_VERSIONS_SHORT = new Array();
VC_VERSIONS_SHORT[1700] = 'VC11';
@@ -82,6 +83,7 @@ VC_VERSIONS_SHORT[1910] = 'VC15';
VC_VERSIONS_SHORT[1911] = 'VC15';
VC_VERSIONS_SHORT[1912] = 'VC15';
VC_VERSIONS_SHORT[1913] = 'VC15';
VC_VERSIONS_SHORT[1914] = 'VC15';
if (PROGRAM_FILES == null) {
PROGRAM_FILES = "C:\\Program Files";
@@ -1501,7 +1503,11 @@ function EXTENSION(extname, file_list, shared, cflags, dllname, obj_dir)
DEFINE('CFLAGS_' + EXT + '_OBJ', '$(CFLAGS_PHP) $(CFLAGS_' + EXT + ')');
}
if (MODE_PHPIZE && FSO.FileExists(PHP_DIR + "/include/main/config.pickle.h")) {
if (MODE_PHPIZE) {
if (!FSO.FileExists(PHP_DIR + "/include/main/config.pickle.h")) {
var _tmp = FSO.CreateTextFile(PHP_DIR + "/include/main/config.pickle.h", true);
_tmp.Close();
}
cflags = "/FI main/config.pickle.h " + cflags;
}
ADD_FLAG("CFLAGS_" + EXT, cflags);
+7 -7
View File
@@ -1,16 +1,16 @@
bz2-1.0.6
cclient-2007f
freetype-2.8.0
freetype-2.8.1
icu-57.1
jpeglib-9b
libcurl-7.56.0
libcurl-7.59.0
libiconv-1.15
libmpir-3.0.0
libpng-1.6.34
libpq-9.6.2
libsodium-1.0.12
libpq-9.6.5
libsodium-1.0.16
libssh2-1.8.0
libtidy-5.4.0
libxslt-1.1.30
libxml-2.9.5
openssl-1.1.0e
libxslt-1.1.32
libxml-2.9.7
openssl-1.1.0h