Compare commits

..
263 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
Dmitry Stogov 5574562f8f Merge branch 'PHP-7.1' into PHP-7.2
* PHP-7.1:
  Revert "More accurate symbolic constraints oferflow/unserflow handling (better fix for bug #76074)."
2018-03-13 11:03:57 +03:00
Dmitry Stogov 0643c7ab4d Revert "More accurate symbolic constraints oferflow/unserflow handling (better fix for bug #76074)."
This reverts commit 44ba557de5.
2018-03-13 11:03:45 +03:00
Dmitry Stogov 575f5002c0 Merge branch 'PHP-7.1' into PHP-7.2
* PHP-7.1:
  More accurate symbolic constraints oferflow/unserflow handling (better fix for bug #76074).
2018-03-13 10:45:53 +03:00
Dmitry Stogov 44ba557de5 More accurate symbolic constraints oferflow/unserflow handling (better fix for bug #76074). 2018-03-13 10:44:53 +03:00
Xinchen Hui 98fe858275 Forgot NEWs 2018-03-13 13:01:33 +08:00
Xinchen Hui 8e576e5abc Merge branch 'PHP-7.1' into PHP-7.2
* PHP-7.1:
  Forgot NEWS
2018-03-13 13:00:59 +08:00
Xinchen Hui 998a2ddc37 Forgot NEWS 2018-03-13 13:00:47 +08:00
Xinchen Hui e547c9f139 Merge branch 'PHP-7.1' into PHP-7.2
* PHP-7.1:
  Fixed bug #76085 (Segmentation fault in buildFromIterator when directory name contains a \n)
2018-03-13 12:52:07 +08:00
Xinchen Hui 4ee9098514 Fixed bug #76085 (Segmentation fault in buildFromIterator when directory name contains a \n) 2018-03-13 12:51:26 +08:00
Anatol Belski c469213e7b Merge branch 'PHP-7.1' into PHP-7.2
* PHP-7.1:
  Fix heap use after free
2018-03-12 21:02:40 +01:00
Anatol Belski 4cd64aad8a Fix heap use after free
The value may only be used until PGresult was destroyed, thus it needs
to be copied.
2018-03-12 20:57:21 +01:00
Anatol Belski 16570b8c79 Use literal as format 2018-03-12 16:00:24 +01:00
Anatol Belski 8a985403f6 Merge branch 'PHP-7.1' into PHP-7.2
* PHP-7.1:
  Use string literal as format
2018-03-12 15:18:11 +01:00
Anatol Belski eaa5b1f911 Use string literal as format 2018-03-12 15:17:08 +01:00
Anatol Belski fc09d7e76f Merge branch 'PHP-7.1' into PHP-7.2
* PHP-7.1:
  Provide core includes for the resource compiler by default
2018-03-12 14:16:08 +01:00
Anatol Belski 4dd1be2079 Provide core includes for the resource compiler by default 2018-03-12 14:14:34 +01:00
Dmitry Stogov e6fb787c66 Merge branch 'PHP-7.1' into PHP-7.2
* PHP-7.1:
  Replaced usafe reference from SHM to process memory with SHM to SHM reference
2018-03-12 11:18:33 +03:00
Dmitry Stogov f31c4d5398 Replaced usafe reference from SHM to process memory with SHM to SHM reference 2018-03-12 11:18:12 +03:00
Christoph M. Becker 2b02e6dff3 Merge branch 'PHP-7.1' into PHP-7.2
* PHP-7.1:
  Fix #62545: wrong unicode mapping in some charsets
2018-03-11 17:54:45 +01:00
Christoph M. Becker 01ea314e8c Fix #62545: wrong unicode mapping in some charsets
Undefined characters are best mapped to Unicode REPLACEMENT characters.
2018-03-11 17:38:28 +01:00
Thomas Petazzoni 8489ecefd3 ext/sockets: make AI_IDN usage optional
AI_IDN is not supported by all C libraries (uClibc, musl), so make it
optional, like AI_ALL.

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
2018-03-11 16:35:17 +01:00
Anatol Belski d34ab3a53c [ci skip] Update NEWS 2018-03-10 20:08:43 +01:00
Anatol Belski 53f227bb2a Merge branch 'PHP-7.1' into PHP-7.2
* PHP-7.1:
  [ci skip] Update NEWS
2018-03-10 20:08:03 +01:00
Anatol Belski 76fc73cbfc [ci skip] Update NEWS 2018-03-10 20:07:23 +01:00
Bob Weinand 9d908c70d5 Fixup mess in NEWS file (mixed 7.2.3 and 7.2.4 NEWS) 2018-03-10 15:29:07 +01:00
Bob Weinand cfd0979be5 Merge branch 'PHP-7.1' into PHP-7.2 2018-03-10 15:21:16 +01:00
Bob Weinand 9c6df8a238 Fix bug #76074 (opcache corrupts variable in for-loop) 2018-03-10 15:20:45 +01:00
Anatol Belski cf0012dad0 Merge branch 'PHP-7.1' into PHP-7.2
* PHP-7.1:
  Fixed bug #76068 parse_ini_string fails to parse "[foo]\nbar=1|>baz" with segfault
2018-03-10 11:20:11 +01:00
Anatol Belski 8417a23973 Fixed bug #76068 parse_ini_string fails to parse "[foo]\nbar=1|>baz" with segfault 2018-03-10 11:18:21 +01:00
Anatol Belski d4cb4168ba [ci skip] Update link 2018-03-10 09:40:50 +01:00
Christoph M. Becker d709922979 Merge branch 'PHP-7.1' into PHP-7.2
* PHP-7.1:
  Fix #73957: signed integer conversion in imagescale()
2018-03-10 00:25:11 +01:00
Christoph M. Becker f1b358c9a9 Fix #73957: signed integer conversion in imagescale()
We must not pass values to `gdImageScale()` which cannot be represented
by an `unsigned int`.  Instead we return FALSE, according to what we
already did for negative integers.
2018-03-10 00:17:09 +01:00
Anatol Belski d1ed6b1b15 Merge branch 'PHP-7.1' into PHP-7.2
* PHP-7.1:
  Disable PGO for phpdbg
2018-03-08 11:49:25 +01:00
Anatol Belski 34b9f9dedf Disable PGO for phpdbg
For executable files, the linker seems to have issues dealing with the
empty profiling database. As PGO is unlikely to bring any benefit in
this case, the easiest is to disable it.
2018-03-08 11:48:37 +01:00
Anatol Belski 2d660dd630 Merge branch 'PHP-7.1' into PHP-7.2
* PHP-7.1:
  Exclude /Qspectre for clang analyzer
2018-03-07 15:23:03 +01:00
Anatol Belski 00bfc6eb49 Exclude /Qspectre for clang analyzer 2018-03-07 12:34:16 +01:00
Anatol Belski 22857f1d89 Merge branch 'PHP-7.1' into PHP-7.2
* PHP-7.1:
  Guard platform dependent code
2018-03-07 12:29:22 +01:00
Anatol Belski 281e2f8207 Guard platform dependent code 2018-03-07 12:28:29 +01:00
Anatol Belski 7780bfc7b3 [ci skip] Update NEWS 2018-03-06 22:07:58 +01:00
Anatol Belski 000e35db81 Merge branch 'PHP-7.1' into PHP-7.2
* PHP-7.1:
  [ci skip] Update NEWS
2018-03-06 22:07:31 +01:00
Anatol Belski 8a57fcdfbd [ci skip] Update NEWS 2018-03-06 22:06:52 +01:00
Dmitry Stogov 020a02ef9d Merge branch 'PHP-7.1' into PHP-7.2
* PHP-7.1:
  Replaced usafe reference from SHM to process memory with SHM to SHM reference.
2018-03-06 02:47:01 +03:00
Dmitry Stogov 50949c9332 Replaced usafe reference from SHM to process memory with SHM to SHM reference. 2018-03-06 02:43:26 +03:00
Dmitry Stogov b48d2f6d10 Merge branch 'PHP-7.1' into PHP-7.2
* PHP-7.1:
  Don't keep HashTable.pDestructor in SHM and always set it into ZVAL_PTR_DTOR in zval_array_dup(). Keeping pointer to a function in SHM is not safe because of ASLR.
2018-03-06 01:00:14 +03:00
Dmitry Stogov b711a96acb Don't keep HashTable.pDestructor in SHM and always set it into ZVAL_PTR_DTOR in zval_array_dup().
Keeping pointer to a function in SHM is not safe because of ASLR.
2018-03-06 00:56:16 +03:00
Dmitry Stogov 033ce8f28c Merge branch 'PHP-7.1' of git.php.net:php-src into PHP-7.1
* 'PHP-7.1' of git.php.net:php-src:
  Fixed bug #76044 'date: illegal option -- -' in ./configure on FreeBSD
2018-03-06 00:47:40 +03:00
Dmitry Stogov b7ebf90221 Merge branch 'PHP-7.1' into PHP-7.2
* PHP-7.1:
  Fixed invalid destructor
2018-03-06 00:46:40 +03:00
Dmitry Stogov a83581e223 Fixed invalid destructor 2018-03-06 00:46:19 +03:00
Anatol Belski b53f326f67 Merge branch 'PHP-7.1' into PHP-7.2
* PHP-7.1:
  Fixed bug #76044 'date: illegal option -- -' in ./configure on FreeBSD
2018-03-05 22:38:03 +01:00
Anatol Belski 60ac255897 Fixed bug #76044 'date: illegal option -- -' in ./configure on FreeBSD 2018-03-05 22:35:58 +01:00
Dmitry Stogov 53baf6fa1d Merge branch 'PHP-7.1' into PHP-7.2
* PHP-7.1:
  Fixed invalid destructor
2018-03-05 23:33:53 +03:00
Dmitry Stogov 87553b0730 Fixed invalid destructor 2018-03-05 23:33:08 +03:00
Nikita Popov 634a1ff033 Merge branch 'PHP-7.1' into PHP-7.2 2018-03-05 15:32:39 +01:00
Nikita Popov fd5bd37ab1 Revert "Fixed bug #75961 (Strange references behavior)"
This reverts commit 94e9d0a2ae.

This code needs to be mindful about modifications to the array
happening during callback execution. It was written in a way that
only accessed the reference, which is guaranteed not to move. The
changed implementation instead accesses the array slot, leading to
use-after-free.

Run ext/standard/tests/array/bug61967.phpt under valgrind to see
the issue.
2018-03-05 15:32:21 +01:00
Anatol Belski 54212dfbf9 Merge branch 'PHP-7.1' into PHP-7.2
* PHP-7.1:
  Include username into the file cache path
2018-03-05 15:21:31 +01:00
Anatol Belski 27a603e811 Include username into the file cache path 2018-03-05 15:16:55 +01:00
Dmitry Stogov a8fbb15311 Merge branch 'PHP-7.1' into PHP-7.2
* PHP-7.1:
  Fixed "opcache.file_cache_fallback" mode.
2018-03-05 16:15:38 +03:00
Dmitry Stogov 350082ed71 Fixed "opcache.file_cache_fallback" mode.
It's not safe to change value of ZCG(accel_directives).file_cache_only, becuse it might be altered by INI subsystem.
Use global variable instead.
2018-03-05 16:01:43 +03:00
Christoph M. Becker d83467d70b Fix #76041: null pointer access crashed php
We must not draw anti-aliased lines on palette images, because that is
not supported by `gdImageSetAAPixelColor()` and it wouldn't make much
sense to support it, due to the limitation to at most 256 colors.
2018-03-02 17:18:45 +01:00
Anatol Belski 3c58b2c31a Remove TSRMLS_* 2018-03-01 12:12:11 +01:00
Joe Watkins 23ebda3a71 Merge branch 'PHP-7.1' into PHP-7.2
* PHP-7.1:
  fix news date
2018-02-28 12:23:08 +01:00
Joe Watkins a827aefe47 fix news date 2018-02-28 12:10:58 +01:00
Xinchen Hui 07fb188492 Update NEWS 2018-02-28 18:07:05 +08:00
Xinchen Hui 858ebd9285 Merge branch 'PHP-7.1' into PHP-7.2
* PHP-7.1:
  Fixed bug #76025 (Segfault while throwing exception in error_handler).
2018-02-28 18:06:49 +08:00
Xinchen Hui d5c171311d Fixed bug #76025 (Segfault while throwing exception in error_handler). 2018-02-28 18:06:37 +08:00
George Wang 66e3912f3a Merge branch 'PHP-7.1' into PHP-7.2 2018-02-27 23:33:36 -05:00
George Wang d4387fca0a revert last change, for PHP7 no need to do strlen() + 1 for hash look up. 2018-02-27 23:31:43 -05:00
George Wang 3af5722e11 Merge branch 'PHP-7.1' into PHP-7.2 2018-02-27 23:21:04 -05:00
George Wang 2b033607f3 [BUGFIX] calling php_ini_activate_per_host_config() with correct name length. 2018-02-27 23:18:51 -05:00
Bob Weinand 15d611e451 Merge branch 'PHP-7.1' into PHP-7.2 2018-02-28 02:35:44 +01:00
Bob Weinand 3f32bd9f43 Fix pcntl build on mac
Apparently on mac WIF*(x) macros resolve to (*(int*)&x) (_W_INT macro in sys/wait.h), forcing the value to be a lvalue
2018-02-28 02:13:28 +01:00
Ferenc Kovacs fe181463a7 Merge branch 'PHP-7.1' into PHP-7.2 2018-02-28 00:05:10 +01:00
Ferenc Kovacs b53e547d85 Merge branch 'PHP-7.0' into PHP-7.1 2018-02-28 00:02:48 +01:00
Ferenc Kovacs c28a6253e5 Merge branch 'PHP-5.6' into PHP-7.0 2018-02-28 00:00:12 +01:00
Ferenc Kovacs 3db7427b71 5.6.35 is next 2018-02-27 23:57:06 +01:00
George Wang 9607d15d7d Merge branch 'PHP-7.1' into PHP-7.2 2018-02-27 13:56:19 -05:00
George Wang 97ff815cbb release LiteSpeed SAPI 7.0.
add CRIU support.
add support for [PATH=] and [HOST=] sections in php.ini
2018-02-27 13:54:28 -05:00
Anatol Belski 1ec4d3698b Merge branch 'PHP-7.1' into PHP-7.2
* PHP-7.1:
  7.0.29 next
2018-02-27 11:51:10 +01:00
Anatol Belski ea4ba9d008 Merge branch 'PHP-7.0' into PHP-7.1
* PHP-7.0:
  7.0.29 next
2018-02-27 11:50:22 +01:00
Anatol Belski c61b56ed00 7.0.29 next 2018-02-27 11:48:49 +01:00
Anatol Belski 74bdb8fb15 [ci skip] Update NEWS 2018-02-27 11:39:19 +01:00
Anatol Belski ba8818325e 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-02-27 11:38:23 +01:00
Anatol Belski f6356b435a [ci skip] Update NEWS 2018-02-27 11:37:24 +01:00
Anatol Belski 9e1113dee1 Merge branch 'PHP-7.0' into PHP-7.1
* PHP-7.0:
  [ci skip] Update NEWS
  [ci skip] Update NEWS
2018-02-27 11:34:13 +01:00
Anatol Belski fed294d2a8 [ci skip] Update NEWS 2018-02-27 11:33:40 +01:00
Anatol Belski 1e0499b095 Merge branch 'PHP-5.6' into PHP-7.0
* PHP-5.6:
  [ci skip] Update NEWS
2018-02-27 11:32:26 +01:00
Anatol Belski 4698a412bf [ci skip] Update NEWS 2018-02-27 11:31:37 +01:00
Stanislav Malyshev ab9f9b5d3b Merge branch 'PHP-7.1' into PHP-7.2
* PHP-7.1:
  Fix bug #75981: prevent reading beyond buffer start
2018-02-26 22:26:55 -08:00
Stanislav Malyshev a6f7760d57 Merge branch 'PHP-7.0' into PHP-7.1
* PHP-7.0:
  Fix bug #75981: prevent reading beyond buffer start
2018-02-26 22:26:50 -08:00
Stanislav Malyshev dde7a05978 Merge branch 'PHP-5.6' into PHP-7.0
* PHP-5.6:
  Fix bug #75981: prevent reading beyond buffer start
2018-02-26 22:26:26 -08:00
Stanislav Malyshev 523f230c83 Fix bug #75981: prevent reading beyond buffer start 2018-02-26 22:25:51 -08:00
Christoph M. Becker feef202718 Merge branch 'PHP-7.1' into PHP-7.2
* PHP-7.1:
  [ci skip] Update NEWS
2018-02-24 23:39:28 +01:00
Christoph M. Becker 6e300bdeae [ci skip] Update NEWS 2018-02-24 23:37:43 +01:00
Christoph M. Becker 8c396e0e88 Merge branch 'PHP-7.1' into PHP-7.2
* PHP-7.1:
  Fix imagesetinterpolation arginfo
2018-02-24 11:32:03 +01:00
Gabriel Caruso a358211a75 Fix imagesetinterpolation arginfo
imagesetinterpolation only requires one parameter.
2018-02-24 11:30:24 +01:00
Stanislav Malyshev c904d380a2 Merge branch 'PHP-7.1' into PHP-7.2
* PHP-7.1:
  [ci skip] Set FPM maintainership
2018-02-23 17:57:57 -08:00
Stanislav Malyshev ae1f18b69c Merge branch 'PHP-7.0' into PHP-7.1
* PHP-7.0:
  [ci skip] Set FPM maintainership
2018-02-23 17:57:50 -08:00
Stanislav Malyshev 09a19e778b Merge branch 'PHP-5.6' into PHP-7.0
* PHP-5.6:
  [ci skip] Set FPM maintainership
2018-02-23 17:57:26 -08:00
Stanislav Malyshev 1f4b057b63 [ci skip] Set FPM maintainership
As per http://news.php.net/php.internals/101897, Jakub is officially
annointed as new FPM maintainer.
2018-02-23 16:43:10 -08:00
Christoph M. Becker 32df2b6617 Merge branch 'PHP-7.1' into PHP-7.2
* PHP-7.1:
  Fix #75873: pcntl_wexitstatus returns incorrect on Big_Endian platform (s390x)
2018-02-23 23:52:07 +01:00
Sam Ding 78c1ef2adb Fix #75873: pcntl_wexitstatus returns incorrect on Big_Endian platform (s390x)
Cf. https://github.com/php/php-src/pull/3141.
2018-02-23 23:50:36 +01:00
Christoph M. Becker c6cf3d4ada Merge branch 'PHP-7.1' into PHP-7.2
* PHP-7.1:
  Fix some arginfos
2018-02-23 11:29:21 +01:00
Gabriel Caruso 0b8cfa6c78 Fix some arginfos
* all arguments for ftp_pasv are required
* $varname for getenv function isn't required anymore
* fsockopen and pfsockopen only require $hostname
* strtok can work with only one parameter
* strpbrk needs two parameters to work
* required parameters and add some parameters in openssl_* functions
2018-02-23 11:27:14 +01:00
Johannes Schlüter 2577cdbea2 Merge branch 'PHP-7.1' into PHP-7.2 2018-02-20 23:32:25 +01:00
Johannes Schlüter 42952a756e Merge branch 'PHP-7.0' into PHP-7.1 2018-02-20 23:32:05 +01:00
Johannes Schlüter 73cd5fca2c Fix NEWS 2018-02-20 23:31:30 +01:00
Johannes Schlüter 74ed42c169 Fix a memleak with mysqlnd and SSL 2018-02-20 23:28:23 +01:00
Johannes Schlüter 1c98955d0f Merge branch 'PHP-7.1' into PHP-7.2 2018-02-20 23:20:28 +01:00
Johannes Schlüter e3cf72b829 Merge branch 'PHP-7.0' into PHP-7.1 2018-02-20 23:20:02 +01:00
Johannes Schlüter 8f3c29aee1 Fix negotiaton of MySQL auth plugin 2018-02-20 23:13:03 +01:00
Christoph M. Becker 6237bcd39e Merge branch 'PHP-7.1' into PHP-7.2
* PHP-7.1:
  [ci skip] Sort recent NEWS entries alphabetically
2018-02-20 16:33:55 +01:00
Christoph M. Becker 656381745a [ci skip] Sort recent NEWS entries alphabetically 2018-02-20 16:31:56 +01:00
Christoph M. Becker e80e38ab7c Merge branch 'PHP-7.1' into PHP-7.2
* PHP-7.1:
  Fix openssl_* arginfos
2018-02-20 16:25:22 +01:00
Gabriel Caruso 276b57316c Fix openssl_* arginfos
openssl_pkcs12_export and openssl_x509_parse had wrong arginfos
2018-02-20 16:23:42 +01:00
Anatol Belski 884697a290 Merge branch 'PHP-7.1' into PHP-7.2
* PHP-7.1:
  Update binary tools SDK branch for AppVeyor
2018-02-20 15:52:42 +01:00
Anatol Belski c28b03a8e7 Update binary tools SDK branch for AppVeyor 2018-02-20 15:40:10 +01:00
Anatol Belski ea0355632d Merge branch 'PHP-7.1' into PHP-7.2
* PHP-7.1:
  dos2unix
2018-02-20 08:00:08 +01:00
Anatol Belski ef04bc4a51 dos2unix 2018-02-20 07:59:34 +01:00
Nikita Popov 1b6a9ea584 Merge branch 'PHP-7.1' into PHP-7.2 2018-02-19 21:46:11 +01:00
Nikita Popov 7b3a2d16aa Fix incorrect printf modifiers 2018-02-19 21:44:36 +01:00
Anatol Belski fa7c32040c Merge branch 'PHP-7.1' into PHP-7.2
* PHP-7.1:
  Use more jobs with cppcheck
2018-02-19 11:27:42 +01:00
Anatol Belski 08b4f3c745 Use more jobs with cppcheck 2018-02-19 11:27:03 +01:00
Nikita Popov 500632ac13 Fix pfsockopen() func info 2018-02-18 17:42:12 +01:00
Nikita Popov c0abab5fca Fix ZEND_SL range inference
This is a bit tricker than right shifts because shifting in the
sign bit flips the sign. The computed bounds are not tight.
2018-02-18 17:42:12 +01:00
Nikita Popov 202989edf8 Fix ZEND_SR range inference
Handle out-of-range RHS correctly.
2018-02-18 17:42:12 +01:00
Nikita Popov 40ff001381 Fix constant() func info
Since PHP 5.6 this can also be an array.
2018-02-18 17:42:11 +01:00
Nikita Popov ae837db8cf Handle overloaded GMP operators in type inference 2018-02-18 15:33:30 +01:00
Nikita Popov 39974dd65d Disable negative range inference
The negative range inference implementation does not work correctly,
and it's not clear right now how it can be fixed. As such, disable
it entirely for now.
2018-02-18 15:33:28 +01:00
Nikita Popov 846e8a3ec9 Fix COUNT range inference
count() on objects may return a negative number :(
2018-02-17 23:18:30 +01:00
Nikita Popov fa7c23ba27 Fix hash_init() and hash_copy() func info
These functions were switched to use objects instead of resources.
2018-02-17 23:18:29 +01:00
Nikita Popov acb9426a6b Fix curl_multi_close() func info
Returns false on failure
2018-02-17 23:18:29 +01:00
Nikita Popov 8bdf9905da Fix get_object_vars() func info
Numeric keys will be converted to integer nowadays.
2018-02-17 23:18:29 +01:00
Nikita Popov 1a50a50bcf Add RC flags in init_func_return_info 2018-02-17 23:18:29 +01:00
Nikita Popov fd5644cd0b Fix array_values() and array_keys() func info
Can return RCN for empty/packed arrays
2018-02-17 23:18:28 +01:00
Anatol Belski 0255c21319 Merge branch 'PHP-7.1' into PHP-7.2
* PHP-7.1:
  Remove duplicated assignment
2018-02-17 13:12:29 +01:00
Anatol Belski a468752e53 Remove duplicated assignment 2018-02-17 13:10:59 +01:00
Xinchen Hui 114e5d0206 Update NEWS 2018-02-17 16:35:42 +08:00
Xinchen Hui 26dda8999c Merge branch 'PHP-7.1' into PHP-7.2
* PHP-7.1:
  Fixed bug #75961 (Strange references behavior)
2018-02-17 16:33:39 +08:00
Xinchen Hui 94e9d0a2ae Fixed bug #75961 (Strange references behavior) 2018-02-17 16:33:15 +08:00
Nikita Popov 0674d677bc Merge branch 'PHP-7.1' into PHP-7.2 2018-02-16 20:30:49 +01:00
Nikita Popov 372bf8a923 Fixed bug #75969
Move NOP stripping out of zend_optimize_block: NOP stripping may
move instructions, which may invalidate a Tsource shared across
an extended basic block.
2018-02-16 20:30:03 +01:00
Anatol Belski 4800a95e72 Merge branch 'PHP-7.1' into PHP-7.2
* PHP-7.1:
  Wrap var depending on conditional compilation
2018-02-16 13:41:13 +01:00
Anatol Belski da0ed5cdb1 Wrap var depending on conditional compilation 2018-02-16 13:40:44 +01:00
Joe Watkins 34ab10ef1b Merge branch 'PHP-7.1' into PHP-7.2
* PHP-7.1:
  Fixed print_const_table function and zval types in ____printzv_contents
2018-02-15 08:57:43 +01:00
Mitch Hagstrand da5db1c9b2 Fixed print_const_table function and zval types in ____printzv_contents
1. Fixed print_const_table to work in ZE3
2. Removed ____print_const_table to use more generic ____print_ht
3. Fixed up zval types in ____printzv_contents
2018-02-15 08:57:32 +01:00
Joe Watkins 0b5466c0a6 Merge branch 'PHP-7.1' into PHP-7.2
* PHP-7.1:
  bump versions
2018-02-15 08:56:08 +01:00
Gabriel Caruso 8a3f45f90b Remove getmxrr alias dns_get_mx test
The test is currently failing, and the same functionality is
already tested (in a better way) in the getmxrr() test.
2018-02-14 19:00:07 +01:00
Remi Collet a93dba4324 add pkg-config example in extension skeleton 2018-02-14 13:28:21 +01:00
Remi Collet 17164bcf8d factorization of duplicated code 2018-02-14 13:15:09 +01:00
Remi Collet 528bc00d84 Fix timezone var_dump from 51f2a5803f 2018-02-14 08:59:24 +01:00
Sara Golemon 2cc8cf2994 Now working on 7.2.4-dev 2018-02-13 14:37:00 -05:00
Sara Golemon 5dd2a4185c Now working on 7.2.4-dev 2018-02-13 14:32:37 -05:00
Joe 1f0ea7fa4d bump versions 2018-02-13 20:24:34 +01:00
136 changed files with 4275 additions and 2039 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.0
PHP_BUILD_SDK_BRANCH: php-sdk-2.1.3
PHP_BUILD_CRT: vc15
# ext and env setup for tests
#MYSQL_TEST_PASSWD: Password12!
+32 -42
View File
@@ -171,7 +171,7 @@ define ____printzv_contents
printf "UNDEF"
end
if $type == 1
printf "NULL"
printf "NULL"
end
if $type == 2
printf "bool: false"
@@ -179,15 +179,15 @@ define ____printzv_contents
if $type == 3
printf "bool: true"
end
if $type == 4
if $type == 4
printf "long: %ld", $zvalue->value.lval
end
if $type == 5
printf "double: %f", $zvalue->value.dval
end
if $type == 6
printf "string: %s", $zvalue->value.str->val
end
end
if $type == 5
printf "double: %f", $zvalue->value.dval
end
if $type == 6
printf "string: %s", $zvalue->value.str->val
end
if $type == 7
printf "array: "
if ! $arg1
@@ -245,25 +245,31 @@ define ____printzv_contents
printf "const: %s", $zvalue->value.str->val
end
if $type == 12
printf "const_ast"
printf "CONSTANT_AST"
end
if $type == 13
printf "_IS_BOOL"
printf "_BOOL"
end
if $type == 14
printf "IS_CALLABLE"
printf "CALLABLE"
end
if $type == 15
printf "indirect: "
____printzv $zvalue->value.zv $arg1
end
if $type == 16
printf "string_offset"
end
if $type == 17
printf "pointer: %p", $zvalue->value.ptr
end
if $type > 17
if $type == 18
printf "ITERABLE"
end
if $type == 19
printf "VOID"
end
if $type == 20
printf "_ERROR"
end
if $type == 16 || $type > 20
printf "unknown type %d", $type
end
printf "\n"
@@ -283,38 +289,18 @@ define ____printzv
end
end
define ____print_const_table
set $ht = $arg0
set $p = $ht->pListHead
while $p != 0
set $const = (zend_constant *) $p->pData
set $i = $ind
while $i > 0
printf " "
set $i = $i - 1
end
if $p->nKeyLength > 0
____print_str $p->arKey $p->nKeyLength
printf " => "
else
printf "%d => ", $p->h
end
____printzv_contents &$const->value 0
set $p = $p->pListNext
end
end
define print_const_table
set $ind = 1
printf "[%p] {\n", $arg0
____print_const_table $arg0
____print_ht $arg0 4
printf "}\n"
end
document print_const_table
Dumps elements of Constants HashTable
Example: print_const_table executor_globals.zend_constants
end
define ____print_ht
set $ht = (HashTable*)$arg0
set $n = $ind
@@ -361,6 +347,10 @@ define ____print_ht
set $func = (zend_function*)$p->val.value.ptr
printf "\"%s\"\n", $func->common.function_name->val
end
if $arg1 == 4
set $const = (zend_constant *)$p->val.value.ptr
____printzv $const 1
end
end
set $i = $i + 1
end
+1 -1
View File
@@ -47,7 +47,7 @@ MAINTENANCE: Maintained
STATUS: Working
-------------------------------------------------------------------------------
EXTENSION: fpm
PRIMARY MAINTAINER: Antony Dovgal <tony2001@php.net>, Jerome Loyet <fat@php.net>
PRIMARY MAINTAINER: Jakub Zelenka <bukka@php.net>
MAINTENANCE: Maintained
STATUS: Working
SINCE: 5.3.3
+108 -3
View File
@@ -1,6 +1,111 @@
PHP NEWS
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
15 Feb 2018, PHP 7.2.3RC1
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).
(Dmitry, Laruence)
. 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)
-GD:
. Fixed bug #73957 (signed integer conversion in imagescale()). (cmb)
. Fixed bug #76041 (null pointer access crashed php). (cmb)
. Fixed imagesetinterpolation arginfo. (Gabriel Caruso)
- iconv:
. Fixed bug #75867 (Freeing uninitialized pointer). (Philip Prindeville)
- Mbstring:
. Fixed bug #62545 (wrong unicode mapping in some charsets). (cmb)
- Opcache:
. Fixed bug #75969 (Assertion failure in live range DCE due to block pass
misoptimization). (Nikita)
- OpenSSL:
. Fixed openssl_* arginfos. (carusogabriel)
- PCNTL:
. Fixed bug #75873 (pcntl_wexitstatus returns incorrect on Big_Endian platform
(s390x)). (Sam Ding)
- Phar:
. Fixed bug #76085 (Segmentation fault in buildFromIterator when directory
name contains a \n). (Laruence)
- Standard:
. Fixed bug #75961 (Strange references behavior). (Laruence)
. Fixed some arginfos. (carusogabriel)
. Fixed bug #76068 (parse_ini_string fails to parse "[foo]\nbar=1|>baz" with
segfault). (Anatol)
01 Mar 2018, PHP 7.2.3
- Core:
. Fixed bug #75864 ("stream_isatty" returns wrong value on s390x). (Sam Ding)
@@ -48,6 +153,8 @@ PHP NEWS
- Standard:
. Fixed bug #75916 (DNS_CAA record results contain garbage). (Mike,
Philip Sharp)
. Fixed bug #75981 (Prevent reading beyond buffer start in http wrapper).
(Stas)
01 Feb 2018, PHP 7.2.2
@@ -273,8 +380,6 @@ PHP NEWS
DateTimeInterface interface). (Majkl578)
. Fixed bug #75149 (redefinition of typedefs ttinfo and t1info). (Remi)
. Fixed bug #75222 (DateInterval microseconds property always 0). (jhdxr)
. Fixed bug #68406 (calling var_dump on a DateTimeZone object modifies it).
(jhdxr)
- Dba:
. Fixed bug #72885 (flatfile: dba_fetch() fails to read replaced entry).
+1 -1
View File
@@ -1,6 +1,6 @@
The Win32 Build System.
See http://wiki.php.net/internals/windows/stepbystepbuild
See https://wiki.php.net/internals/windows/stepbystepbuild_sdk_2
vim:tw=78:sw=1:ts=1:et
+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--
+18
View File
@@ -0,0 +1,18 @@
--TEST--
Bug #76025 (Segfault while throwing exception in error_handler)
--FILE--
<?php
function handleError($errno, $errstr, $errfile, $errline) {
$exception = new exception("blah");
throw $exception;
}
set_error_handler('handleError', E_ALL);
$c = $b[$a];
?>
--EXPECTF--
Fatal error: Uncaught Exception: blah in %sbug76025.php:%d
Stack trace:
#0 %sbug76025.php(%d): handleError(8, 'Undefined varia...', '%s', %d, Array)
#1 {main}
thrown in %sbug76025.php on line %d
+4 -3
View File
@@ -245,9 +245,10 @@ static zend_always_inline zval *_get_zval_ptr_var_deref(uint32_t var, zend_free_
static zend_never_inline ZEND_COLD void zval_undefined_cv(uint32_t var EXECUTE_DATA_DC)
{
zend_string *cv = CV_DEF_OF(EX_VAR_TO_NUM(var));
zend_error(E_NOTICE, "Undefined variable: %s", ZSTR_VAL(cv));
if (EXPECTED(EG(exception) == NULL)) {
zend_string *cv = CV_DEF_OF(EX_VAR_TO_NUM(var));
zend_error(E_NOTICE, "Undefined variable: %s", ZSTR_VAL(cv));
}
}
static zend_never_inline zval *_get_zval_cv_lookup(zval *ptr, uint32_t var, int type EXECUTE_DATA_DC)
+1 -1
View File
@@ -1764,7 +1764,7 @@ ZEND_API HashTable* ZEND_FASTCALL zend_array_dup(HashTable *source)
GC_TYPE_INFO(target) = IS_ARRAY | (GC_COLLECTABLE << GC_FLAGS_SHIFT);
target->nTableSize = source->nTableSize;
target->pDestructor = source->pDestructor;
target->pDestructor = ZVAL_PTR_DTOR;
if (source->nNumUsed == 0) {
target->u.flags = (source->u.flags & ~(HASH_FLAG_INITIALIZED|HASH_FLAG_PACKED|HASH_FLAG_PERSISTENT|ZEND_HASH_APPLY_COUNT_MASK)) | HASH_FLAG_APPLY_PROTECTION | HASH_FLAG_STATIC_KEYS;
+12 -4
View File
@@ -57,11 +57,19 @@ static void zend_ini_do_op(char type, zval *result, zval *op1, zval *op2)
int str_len;
char str_result[MAX_LENGTH_OF_LONG+1];
i_op1 = atoi(Z_STRVAL_P(op1));
zend_string_free(Z_STR_P(op1));
if (IS_LONG == Z_TYPE_P(op1)) {
i_op1 = Z_LVAL_P(op1);
} else {
i_op1 = atoi(Z_STRVAL_P(op1));
zend_string_free(Z_STR_P(op1));
}
if (op2) {
i_op2 = atoi(Z_STRVAL_P(op2));
zend_string_free(Z_STR_P(op2));
if (IS_LONG == Z_TYPE_P(op2)) {
i_op2 = Z_LVAL_P(op2);
} else {
i_op2 = atoi(Z_STRVAL_P(op2));
zend_string_free(Z_STR_P(op2));
}
} else {
i_op2 = 0;
}
+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
])
+35 -4
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=3
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 -------------------------------------------------------------------------
@@ -1269,7 +1297,10 @@ EXTRA_LDFLAGS="$EXTRA_LDFLAGS $PHP_LDFLAGS"
EXTRA_LDFLAGS_PROGRAM="$EXTRA_LDFLAGS_PROGRAM $PHP_LDFLAGS"
# SOURCE_DATE_EPOCH for reproducible builds https://reproducible-builds.org/specs/source-date-epoch/
PHP_BUILD_DATE=`date --utc --date="@${SOURCE_DATE_EPOCH:-$(date +%s)}" +%Y-%m-%d`
PHP_BUILD_DATE=`date --utc --date="@${SOURCE_DATE_EPOCH:-$(date +%s)}" +%Y-%m-%d 2>/dev/null`
if test $? -ne 0 ; then
PHP_BUILD_DATE=`date -u +%Y-%m-%d`
fi
AC_DEFINE_UNQUOTED(PHP_BUILD_DATE,"$PHP_BUILD_DATE",[PHP build date])
PHP_UNAME=`uname -a | xargs`
+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
+32 -45
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)
@@ -657,6 +657,7 @@ static HashTable *date_object_get_properties_period(zval *object);
static HashTable *date_object_get_properties_timezone(zval *object);
static HashTable *date_object_get_gc_timezone(zval *object, zval **table, int *n);
static HashTable *date_object_get_debug_info_timezone(zval *object, int *is_temp);
static void php_timezone_to_string(php_timezone_obj *tzobj, zval *zv);
zval *date_interval_read_property(zval *object, zval *member, int type, void **cache_slot, zval *rv);
void date_interval_write_property(zval *object, zval *member, zval *value, void **cache_slot);
@@ -2041,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;
@@ -2061,7 +2062,7 @@ static int date_interval_has_property(zval *object, zval *member, int type, void
}
return retval;
}
/* }}} */
@@ -2399,6 +2400,30 @@ static HashTable *date_object_get_properties_timezone(zval *object) /* {{{ */
return props;
} /* }}} */
static void php_timezone_to_string(php_timezone_obj *tzobj, zval *zv)
{
switch (tzobj->type) {
case TIMELIB_ZONETYPE_ID:
ZVAL_STRING(zv, tzobj->tzi.tz->name);
break;
case TIMELIB_ZONETYPE_OFFSET: {
zend_string *tmpstr = zend_string_alloc(sizeof("UTC+05:00")-1, 0);
timelib_sll utc_offset = tzobj->tzi.utc_offset;
ZSTR_LEN(tmpstr) = snprintf(ZSTR_VAL(tmpstr), sizeof("+05:00"), "%c%02d:%02d",
utc_offset < 0 ? '-' : '+',
abs(utc_offset / 3600),
abs(((utc_offset % 3600) / 60)));
ZVAL_NEW_STR(zv, tmpstr);
}
break;
case TIMELIB_ZONETYPE_ABBR:
ZVAL_STRING(zv, tzobj->tzi.z.abbr);
break;
}
}
static HashTable *date_object_get_debug_info_timezone(zval *object, int *is_temp) /* {{{ */
{
HashTable *ht, *props;
@@ -2410,29 +2435,11 @@ 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);
switch (tzobj->type) {
case TIMELIB_ZONETYPE_ID:
ZVAL_STRING(&zv, tzobj->tzi.tz->name);
break;
case TIMELIB_ZONETYPE_OFFSET: {
zend_string *tmpstr = zend_string_alloc(sizeof("UTC+05:00")-1, 0);
ZSTR_LEN(tmpstr) = snprintf(ZSTR_VAL(tmpstr), sizeof("+05:00"), "%c%02d:%02d",
tzobj->tzi.utc_offset < 0 ? '-' : '+',
abs((int)(tzobj->tzi.utc_offset / 3600)),
abs(((int)(tzobj->tzi.utc_offset % 3600) / 60)));
ZVAL_NEW_STR(&zv, tmpstr);
}
break;
case TIMELIB_ZONETYPE_ABBR:
ZVAL_STRING(&zv, tzobj->tzi.z.abbr);
break;
}
php_timezone_to_string(tzobj, &zv);
zend_hash_str_update(ht, "timezone", sizeof("timezone")-1, &zv);
return ht;
@@ -3942,27 +3949,7 @@ PHP_FUNCTION(timezone_name_get)
}
tzobj = Z_PHPTIMEZONE_P(object);
DATE_CHECK_INITIALIZED(tzobj->initialized, DateTimeZone);
switch (tzobj->type) {
case TIMELIB_ZONETYPE_ID:
RETURN_STRING(tzobj->tzi.tz->name);
break;
case TIMELIB_ZONETYPE_OFFSET: {
zend_string *tmpstr = zend_string_alloc(sizeof("UTC+05:00")-1, 0);
timelib_sll utc_offset = tzobj->tzi.utc_offset;
ZSTR_LEN(tmpstr) = snprintf(ZSTR_VAL(tmpstr), sizeof("+05:00"), "%c%02d:%02d",
utc_offset < 0 ? '-' : '+',
abs(utc_offset / 3600),
abs(((utc_offset % 3600) / 60)));
RETURN_NEW_STR(tmpstr);
}
break;
case TIMELIB_ZONETYPE_ABBR:
RETURN_STRING(tzobj->tzi.z.abbr);
break;
}
php_timezone_to_string(tzobj, return_value);
}
/* }}} */
-1
View File
@@ -598,7 +598,6 @@ PHP_MINIT_FUNCTION(dom)
memcpy(&dom_object_handlers, zend_get_std_object_handlers(), sizeof(zend_object_handlers));
dom_object_handlers.offset = XtOffsetOf(dom_object, std);
dom_object_handlers.free_obj = dom_objects_free_storage;
dom_object_handlers.clone_obj = dom_objects_store_clone_obj;
dom_object_handlers.read_property = dom_read_property;
dom_object_handlers.write_property = dom_write_property;
dom_object_handlers.get_property_ptr_ptr = dom_get_property_ptr_ptr;
+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.
+18
View File
@@ -127,6 +127,24 @@ dnl [ --enable-$extname Enable $extname support])
if test "\$PHP_$EXTNAME" != "no"; then
dnl Write more examples of tests here...
dnl # get library FOO build options from pkg-config output
dnl AC_PATH_PROG(PKG_CONFIG, pkg-config, no)
dnl AC_MSG_CHECKING(for libfoo)
dnl if test -x "\$PKG_CONFIG" && \$PKG_CONFIG --exists foo; then
dnl if \$PKG_CONFIG foo --atleast-version 1.2.3; then
dnl LIBFOO_CFLAGS=\`\$PKG_CONFIG foo --cflags\`
dnl LIBFOO_LIBDIR=\`\$PKG_CONFIG foo --libs\`
dnl LIBFOO_VERSON=\`\$PKG_CONFIG foo --modversion\`
dnl AC_MSG_RESULT(from pkgconfig: version \$LIBFOO_VERSON)
dnl else
dnl AC_MSG_ERROR(system libfoo is too old: version 1.2.3 required)
dnl fi
dnl else
dnl AC_MSG_ERROR(pkg-config not found)
dnl fi
dnl PHP_EVAL_LIBLINE(\$LIBFOO_LIBDIR, ${EXTNAME}_SHARED_LIBADD)
dnl PHP_EVAL_INCLINE(\$LIBFOO_CFLAGS)
dnl # --with-$extname -> check with-path
dnl SEARCH_PATH="/usr/local /usr" # you might want to change this
dnl SEARCH_FOR="/include/$extname.h" # you most likely want to change this
+1 -1
View File
@@ -142,7 +142,7 @@ ZEND_BEGIN_ARG_INFO_EX(arginfo_ftp_nb_fget, 0, 0, 4)
ZEND_ARG_INFO(0, resumepos)
ZEND_END_ARG_INFO()
ZEND_BEGIN_ARG_INFO(arginfo_ftp_pasv, 0)
ZEND_BEGIN_ARG_INFO_EX(arginfo_ftp_pasv, 0, 0, 2)
ZEND_ARG_INFO(0, ftp)
ZEND_ARG_INFO(0, pasv)
ZEND_END_ARG_INFO()
+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--
+2 -2
View File
@@ -848,7 +848,7 @@ ZEND_BEGIN_ARG_INFO(arginfo_imageaffinematrixconcat, 0)
ZEND_ARG_INFO(0, m2)
ZEND_END_ARG_INFO()
ZEND_BEGIN_ARG_INFO(arginfo_imagesetinterpolation, 0)
ZEND_BEGIN_ARG_INFO_EX(arginfo_imagesetinterpolation, 0, 0, 1)
ZEND_ARG_INFO(0, im)
ZEND_ARG_INFO(0, method)
ZEND_END_ARG_INFO()
@@ -4842,7 +4842,7 @@ PHP_FUNCTION(imagescale)
}
}
if (tmp_h <= 0 || tmp_w <= 0) {
if (tmp_h <= 0 || tmp_h > INT_MAX || tmp_w <= 0 || tmp_w > INT_MAX) {
RETURN_FALSE;
}
+6 -1
View File
@@ -1239,6 +1239,12 @@ void gdImageAALine (gdImagePtr im, int x1, int y1, int x2, int y2, int col)
long x, y, inc, frac;
long dx, dy,tmp;
if (!im->trueColor) {
/* TBB: don't crash when the image is of the wrong type */
gdImageLine(im, x1, y1, x2, y2, col);
return;
}
/* 2.0.10: Nick Atty: clip to edges of drawing rectangle, return if no points need to be drawn */
if (!clip_1d(&x1,&y1,&x2,&y2,gdImageSX(im)-1) || !clip_1d(&y1,&x1,&y2,&x2,gdImageSY(im)-1)) {
return;
@@ -1332,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

+20
View File
@@ -0,0 +1,20 @@
--TEST--
Bug #73957 (signed integer conversion in imagescale())
--SKIPIF--
<?php
if (!extension_loaded('gd')) die('skip gd extension not available');
if (PHP_INT_SIZE != 8) die('skip this test is for 64bit platforms only');
?>
--FILE--
<?php
$im = imagecreate(8, 8);
$im = imagescale($im, 0x100000001, 1);
var_dump($im);
if ($im) { // which is not supposed to happen
var_dump(imagesx($im));
}
?>
===DONE===
--EXPECT--
bool(false)
===DONE===
+15
View File
@@ -0,0 +1,15 @@
--TEST--
Bug #76041 (null pointer access crashed php)
--SKIPIF--
<?php
if (!extension_loaded('gd')) die('skip gd extension not available');
?>
--FILE--
<?php
$im=imagecreate(100, 100);
imageantialias($im, true);
imageline($im, 0, 0, 10, 10, 0xffffff);
?>
===DONE===
--EXPECT--
===DONE===
+2 -2
View File
@@ -1965,8 +1965,8 @@ ZEND_FUNCTION(gmp_setbit)
php_error_docref(NULL, E_WARNING, "Index must be greater than or equal to zero");
RETURN_FALSE;
}
if (index / GMP_NUMB_BITS >= INT_MAX ) {
php_error_docref(NULL, E_WARNING, "Index must be less than %ld * %ld", INT_MAX, GMP_NUMB_BITS);
if (index / GMP_NUMB_BITS >= INT_MAX) {
php_error_docref(NULL, E_WARNING, "Index must be less than %d * %d", INT_MAX, GMP_NUMB_BITS);
RETURN_FALSE;
}
+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");
@@ -28,7 +28,9 @@
*/
PHP_METHOD(Spoofchecker, __construct)
{
#if U_ICU_VERSION_MAJOR_NUM < 58
int checks;
#endif
zend_error_handling error_handling;
SPOOFCHECKER_METHOD_INIT_VARS;
+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 */
@@ -30,7 +30,7 @@ static const unsigned short cp1251_ucs_table[] = {
0x0402, 0x0403, 0x201a, 0x0453, 0x201e, 0x2026, 0x2020, 0x2021,
0x20ac, 0x2030, 0x0409, 0x2039, 0x040a, 0x040c, 0x040b, 0x040f,
0x0452, 0x2018, 0x2019, 0x201c, 0x201d, 0x2022, 0x2013, 0x2014,
0x003f, 0x2122, 0x0459, 0x203a, 0x045a, 0x045c, 0x045b, 0x045f,
0xfffd, 0x2122, 0x0459, 0x203a, 0x045a, 0x045c, 0x045b, 0x045f,
0x00a0, 0x040e, 0x045e, 0x0408, 0x00a4, 0x0490, 0x00a6, 0x00a7,
0x0401, 0x00a9, 0x0404, 0x00ab, 0x00ac, 0x00ad, 0x00ae, 0x0407,
0x00b0, 0x00b1, 0x0406, 0x0456, 0x0491, 0x00b5, 0x00b6, 0x00b7,
@@ -32,9 +32,9 @@
* as it only covers this range, while the rest cover 0xa0 onwards */
static const unsigned short cp1252_ucs_table[] = {
0x20ac,0xfffe,0x201a,0x0192,0x201e,0x2026,0x2020,0x2021,
0x02c6,0x2030,0x0160,0x2039,0x0152,0xfffe,0x017d,0xfffe,
0xfffe,0x2018,0x2019,0x201c,0x201d,0x2022,0x2013,0x2014,
0x02dc,0x2122,0x0161,0x203a,0x0153,0xfffe,0x017e,0x0178
0x20ac,0xfffd,0x201a,0x0192,0x201e,0x2026,0x2020,0x2021,
0x02c6,0x2030,0x0160,0x2039,0x0152,0xfffd,0x017d,0xfffd,
0xfffd,0x2018,0x2019,0x201c,0x201d,0x2022,0x2013,0x2014,
0x02dc,0x2122,0x0161,0x203a,0x0153,0xfffd,0x017e,0x0178
};
#endif /* UNICODE_TABLE_CP1252_H */
+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);
+18
View File
@@ -0,0 +1,18 @@
--TEST--
Bug #62545 (wrong unicode mapping in some charsets)
--SKIPIF--
<?php
if (!extension_loaded('mbstring')) die('skip mbstring extension not available');
?>
--FILE--
<?php
var_dump(
bin2hex(mb_convert_encoding("\x98", 'UTF-8', 'Windows-1251')),
bin2hex(mb_convert_encoding("\x81\x8d\x8f\x90\x9d", 'UTF-8', 'Windows-1252'))
);
?>
===DONE===
--EXPECT--
string(6) "efbfbd"
string(30) "efbfbdefbfbdefbfbdefbfbdefbfbd"
===DONE===
+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--
+16 -9
View File
@@ -79,11 +79,15 @@ mysqlnd_run_authentication(
struct st_mysqlnd_authentication_plugin * auth_plugin = conn->m->fetch_auth_plugin_by_name(requested_protocol);
if (!auth_plugin) {
php_error_docref(NULL, E_WARNING, "The server requested authentication method unknown to the client [%s]", requested_protocol);
SET_CLIENT_ERROR(conn->error_info, CR_NOT_IMPLEMENTED, UNKNOWN_SQLSTATE, "The server requested authentication method unknown to the client");
goto end;
if (first_call) {
mnd_pefree(requested_protocol, FALSE);
requested_protocol = mnd_pestrdup(MYSQLND_DEFAULT_AUTH_PROTOCOL, FALSE);
} else {
php_error_docref(NULL, E_WARNING, "The server requested authentication method unknown to the client [%s]", requested_protocol);
SET_CLIENT_ERROR(conn->error_info, CR_NOT_IMPLEMENTED, UNKNOWN_SQLSTATE, "The server requested authentication method unknown to the client");
goto end;
}
}
DBG_INF("plugin found");
{
zend_uchar * switch_to_auth_protocol_data = NULL;
@@ -108,10 +112,13 @@ mysqlnd_run_authentication(
DBG_INF_FMT("salt(%d)=[%.*s]", plugin_data_len, plugin_data_len, plugin_data);
/* The data should be allocated with malloc() */
scrambled_data =
auth_plugin->methods.get_auth_data(NULL, &scrambled_data_len, conn, user, passwd, passwd_len,
plugin_data, plugin_data_len, session_options,
conn->protocol_frame_codec->data, mysql_flags);
if (auth_plugin) {
scrambled_data =
auth_plugin->methods.get_auth_data(NULL, &scrambled_data_len, conn, user, passwd, passwd_len,
plugin_data, plugin_data_len, session_options,
conn->protocol_frame_codec->data, mysql_flags);
}
if (conn->error_info->error_no) {
goto end;
}
@@ -780,7 +787,7 @@ mysqlnd_sha256_auth_get_auth_data(struct st_mysqlnd_authentication_plugin * self
DBG_INF_FMT("salt(%d)=[%.*s]", auth_plugin_data_len, auth_plugin_data_len, auth_plugin_data);
if (conn->protocol_frame_codec->data->ssl) {
if (conn->vio->data->ssl) {
DBG_INF("simple clear text under SSL");
/* clear text under SSL */
*auth_data_len = passwd_len;
+1
View File
@@ -514,6 +514,7 @@ MYSQLND_METHOD(mysqlnd_vio, enable_ssl)(MYSQLND_VIO * const net)
zval cafile_zval;
ZVAL_STRING(&cafile_zval, net->data->options.ssl_ca);
php_stream_context_set_option(context, "ssl", "cafile", &cafile_zval);
zval_ptr_dtor(&cafile_zval);
any_flag = TRUE;
}
if (net->data->options.ssl_capath) {
+7 -2
View File
@@ -870,8 +870,6 @@ optimize_const_unary_op:
}
opline++;
}
strip_nops(op_array, block);
}
/* Rebuild plain (optimized) op_array from CFG */
@@ -1934,6 +1932,13 @@ void zend_optimize_cfg(zend_op_array *op_array, zend_optimizer_ctx *ctx)
zend_optimize_block(b, op_array, usage, &cfg, Tsource);
}
/* Eliminate NOPs */
for (b = blocks; b < end; b++) {
if (b->flags & ZEND_BB_REACHABLE) {
strip_nops(op_array, b);
}
}
/* Jump optimization for each block */
for (b = blocks; b < end; b++) {
if (b->flags & ZEND_BB_REACHABLE) {
+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 */
+9 -9
View File
@@ -240,7 +240,7 @@ static const func_info_t func_infos[] = {
F0("is_subclass_of", MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_TRUE), // TODO: inline
F0("is_a", MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_TRUE), // TODO: inline
F1("get_class_vars", MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_ARRAY | MAY_BE_ARRAY_KEY_STRING | MAY_BE_ARRAY_OF_ANY | MAY_BE_ARRAY_OF_REF),
FN("get_object_vars", MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_ARRAY | MAY_BE_ARRAY_KEY_STRING | MAY_BE_ARRAY_OF_ANY | MAY_BE_ARRAY_OF_REF),
FN("get_object_vars", MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_ARRAY | MAY_BE_ARRAY_KEY_ANY | MAY_BE_ARRAY_OF_ANY | MAY_BE_ARRAY_OF_REF),
F1("get_class_methods", MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_ARRAY | MAY_BE_ARRAY_KEY_LONG | MAY_BE_ARRAY_OF_STRING),
F0("method_exists", MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_TRUE),
F0("property_exists", MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_TRUE),
@@ -268,8 +268,8 @@ static const func_info_t func_infos[] = {
FC("extension_loaded", zend_b_s_info),
F1("get_extension_funcs", MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_ARRAY | MAY_BE_ARRAY_KEY_LONG | MAY_BE_ARRAY_OF_STRING),
/* ext/statdard */
FN("constant", MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_TRUE | MAY_BE_LONG | MAY_BE_DOUBLE | MAY_BE_STRING | MAY_BE_RESOURCE),
/* ext/standard */
FN("constant", MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_TRUE | MAY_BE_LONG | MAY_BE_DOUBLE | MAY_BE_STRING | MAY_BE_RESOURCE | MAY_BE_ARRAY | MAY_BE_ARRAY_KEY_ANY | MAY_BE_ARRAY_OF_ANY),
F1("bin2hex", MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_STRING),
F1("hex2bin", MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_STRING),
F0("sleep", MAY_BE_FALSE | MAY_BE_LONG),
@@ -696,7 +696,7 @@ static const func_info_t func_infos[] = {
F0("fnmatch", MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_TRUE),
#endif
F1("fsockopen", MAY_BE_FALSE | MAY_BE_RESOURCE),
F1("pfsockopen", MAY_BE_FALSE | MAY_BE_RESOURCE),
FN("pfsockopen", MAY_BE_FALSE | MAY_BE_RESOURCE),
F1("pack", MAY_BE_FALSE | MAY_BE_STRING),
F1("unpack", MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_ARRAY | MAY_BE_ARRAY_KEY_ANY | MAY_BE_ARRAY_OF_ANY),
F1("get_browser", MAY_BE_FALSE | MAY_BE_ARRAY | MAY_BE_OBJECT | MAY_BE_ARRAY_KEY_STRING | MAY_BE_ARRAY_OF_ANY),
@@ -815,8 +815,8 @@ static const func_info_t func_infos[] = {
F1("array_merge_recursive", MAY_BE_NULL | MAY_BE_ARRAY | MAY_BE_ARRAY_KEY_ANY | MAY_BE_ARRAY_OF_REF | MAY_BE_ARRAY_OF_ANY),
F1("array_replace", MAY_BE_NULL | MAY_BE_ARRAY | MAY_BE_ARRAY_KEY_ANY | MAY_BE_ARRAY_OF_REF | MAY_BE_ARRAY_OF_ANY),
F1("array_replace_recursive", MAY_BE_NULL | MAY_BE_ARRAY | MAY_BE_ARRAY_KEY_ANY | MAY_BE_ARRAY_OF_REF | MAY_BE_ARRAY_OF_ANY),
F1("array_keys", MAY_BE_NULL | MAY_BE_ARRAY | MAY_BE_ARRAY_KEY_LONG | MAY_BE_ARRAY_OF_LONG | MAY_BE_ARRAY_OF_STRING),
F1("array_values", MAY_BE_NULL | MAY_BE_ARRAY | MAY_BE_ARRAY_KEY_LONG | MAY_BE_ARRAY_OF_REF | MAY_BE_ARRAY_OF_ANY),
FN("array_keys", MAY_BE_NULL | MAY_BE_ARRAY | MAY_BE_ARRAY_KEY_LONG | MAY_BE_ARRAY_OF_LONG | MAY_BE_ARRAY_OF_STRING),
FN("array_values", MAY_BE_NULL | MAY_BE_ARRAY | MAY_BE_ARRAY_KEY_LONG | MAY_BE_ARRAY_OF_REF | MAY_BE_ARRAY_OF_ANY),
F1("array_count_values", MAY_BE_NULL | MAY_BE_ARRAY | MAY_BE_ARRAY_KEY_ANY | MAY_BE_ARRAY_OF_LONG),
F1("array_column", MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_ARRAY | MAY_BE_ARRAY_KEY_ANY | MAY_BE_ARRAY_OF_REF | MAY_BE_ARRAY_OF_ANY),
F1("array_reverse", MAY_BE_NULL | MAY_BE_ARRAY | MAY_BE_ARRAY_KEY_ANY | MAY_BE_ARRAY_OF_REF | MAY_BE_ARRAY_OF_ANY),
@@ -1032,7 +1032,7 @@ static const func_info_t func_infos[] = {
F0("curl_multi_exec", MAY_BE_NULL | MAY_BE_LONG),
FN("curl_multi_getcontent", MAY_BE_NULL | MAY_BE_STRING),
F1("curl_multi_info_read", MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_LONG | MAY_BE_ARRAY | MAY_BE_ARRAY_KEY_STRING | MAY_BE_ARRAY_OF_LONG | MAY_BE_ARRAY_OF_RESOURCE),
F0("curl_multi_close", MAY_BE_NULL),
F0("curl_multi_close", MAY_BE_NULL | MAY_BE_FALSE),
F0("curl_multi_setopt", MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_TRUE),
F1("curl_share_init", MAY_BE_NULL | MAY_BE_RESOURCE),
F0("curl_share_close", MAY_BE_NULL),
@@ -1188,12 +1188,12 @@ static const func_info_t func_infos[] = {
F1("hash_file", MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_STRING),
F1("hash_hmac", MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_STRING),
F1("hash_hmac_file", MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_STRING),
F1("hash_init", MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_RESOURCE),
F1("hash_init", MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_OBJECT),
F0("hash_update", MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_TRUE),
F0("hash_update_stream", MAY_BE_NULL | MAY_BE_LONG),
F0("hash_update_file", MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_TRUE),
F1("hash_final", MAY_BE_NULL | MAY_BE_STRING),
F1("hash_copy", MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_RESOURCE),
F1("hash_copy", MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_OBJECT),
F1("hash_algos", MAY_BE_ARRAY | MAY_BE_ARRAY_KEY_LONG | MAY_BE_ARRAY_OF_STRING),
F1("hash_pbkdf2", MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_STRING),
F1("mhash_keygen_s2k", MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_STRING),
+101 -16
View File
@@ -39,7 +39,8 @@
#define SYM_RANGE
/* Whether to handle negative range constraints */
#define NEG_RANGE
/* Negative range inference is buggy, so disabled for now */
#undef NEG_RANGE
/* Number of warmup passes to use prior to widening */
#define RANGE_WARMUP_PASSES 16
@@ -157,6 +158,17 @@
} \
} while (0)
static inline zend_bool add_will_overflow(zend_long a, zend_long b) {
return (b > 0 && a > ZEND_LONG_MAX - b)
|| (b < 0 && a < ZEND_LONG_MIN - b);
}
#if 0
static inline zend_bool sub_will_overflow(zend_long a, zend_long b) {
return (b > 0 && a < ZEND_LONG_MIN + b)
|| (b < 0 && a > ZEND_LONG_MAX + b);
}
#endif
static void zend_ssa_check_scc_var(const zend_op_array *op_array, zend_ssa *ssa, int var, int *index, int *dfs, int *root, zend_worklist_stack *stack) /* {{{ */
{
#ifdef SYM_RANGE
@@ -523,6 +535,15 @@ static inline zend_bool zend_abs_range(
return 1;
}
static inline zend_bool shift_left_overflows(zend_long n, zend_long s) {
/* This considers shifts that shift in the sign bit to be overflowing as well */
if (n >= 0) {
return s >= SIZEOF_ZEND_LONG * 8 - 1 || (n << s) < n;
} else {
return s >= SIZEOF_ZEND_LONG * 8 - 1 || (n << s) > n;
}
}
/* Get the normal op corresponding to a compound assignment op */
static inline zend_uchar get_compound_assign_op(zend_uchar opcode) {
switch (opcode) {
@@ -716,12 +737,27 @@ static int zend_inference_calc_binary_op_range(
op2_min = OP2_MIN_RANGE();
op1_max = OP1_MAX_RANGE();
op2_max = OP2_MAX_RANGE();
t1 = op1_min << op2_min;
t2 = op1_min << op2_max;
t3 = op1_max << op2_min;
t4 = op1_max << op2_max;
tmp->min = MIN(MIN(t1, t2), MIN(t3, t4));
tmp->max = MAX(MAX(t1, t2), MAX(t3, t4));
/* Shifts by negative numbers will throw, ignore them */
if (op2_min < 0) {
op2_min = 0;
}
if (op2_max < 0) {
op2_max = 0;
}
if (shift_left_overflows(op1_min, op2_max)
|| shift_left_overflows(op1_max, op2_max)) {
tmp->min = ZEND_LONG_MIN;
tmp->max = ZEND_LONG_MAX;
} else {
t1 = op1_min << op2_min;
t2 = op1_min << op2_max;
t3 = op1_max << op2_min;
t4 = op1_max << op2_max;
tmp->min = MIN(MIN(t1, t2), MIN(t3, t4));
tmp->max = MAX(MAX(t1, t2), MAX(t3, t4));
}
}
return 1;
}
@@ -739,6 +775,23 @@ static int zend_inference_calc_binary_op_range(
op2_min = OP2_MIN_RANGE();
op1_max = OP1_MAX_RANGE();
op2_max = OP2_MAX_RANGE();
/* Shifts by negative numbers will throw, ignore them */
if (op2_min < 0) {
op2_min = 0;
}
if (op2_max < 0) {
op2_max = 0;
}
/* Shifts by more than the integer size will be 0 or -1 */
if (op2_min >= SIZEOF_ZEND_LONG * 8) {
op2_min = SIZEOF_ZEND_LONG * 8 - 1;
}
if (op2_max >= SIZEOF_ZEND_LONG * 8) {
op2_max = SIZEOF_ZEND_LONG * 8 - 1;
}
t1 = op1_min >> op2_min;
t2 = op1_min >> op2_max;
t3 = op1_max >> op2_min;
@@ -852,7 +905,9 @@ int zend_inference_calc_range(const zend_op_array *op_array, zend_ssa *ssa, int
#ifdef SYM_RANGE
} else if (narrowing && ssa->var_info[constraint->min_ssa_var].has_range) {
tmp->underflow = ssa->var_info[constraint->min_ssa_var].range.underflow && tmp->underflow;
tmp->min = MAX(ssa->var_info[constraint->min_ssa_var].range.min + constraint->range.min, tmp->min);
if (!add_will_overflow(ssa->var_info[constraint->min_ssa_var].range.min, constraint->range.min)) {
tmp->min = MAX(ssa->var_info[constraint->min_ssa_var].range.min + constraint->range.min, tmp->min);
}
#endif
}
if (constraint->max_ssa_var < 0) {
@@ -860,7 +915,9 @@ int zend_inference_calc_range(const zend_op_array *op_array, zend_ssa *ssa, int
tmp->overflow = constraint->range.overflow && tmp->overflow;
#ifdef SYM_RANGE
} else if (narrowing && ssa->var_info[constraint->max_ssa_var].has_range) {
tmp->max = MIN(ssa->var_info[constraint->max_ssa_var].range.max + constraint->range.max, tmp->max);
if (!add_will_overflow(ssa->var_info[constraint->max_ssa_var].range.max, constraint->range.max)) {
tmp->max = MIN(ssa->var_info[constraint->max_ssa_var].range.max + constraint->range.max, tmp->max);
}
tmp->overflow = ssa->var_info[constraint->max_ssa_var].range.overflow && tmp->overflow;
#endif
}
@@ -870,8 +927,13 @@ int zend_inference_calc_range(const zend_op_array *op_array, zend_ssa *ssa, int
tmp->min = constraint->range.min;
#ifdef SYM_RANGE
} else if (narrowing && ssa->var_info[constraint->min_ssa_var].has_range) {
tmp->underflow = ssa->var_info[constraint->min_ssa_var].range.underflow;
tmp->min = ssa->var_info[constraint->min_ssa_var].range.min + constraint->range.min;
if (add_will_overflow(ssa->var_info[constraint->min_ssa_var].range.min, constraint->range.min)) {
tmp->underflow = 1;
tmp->min = ZEND_LONG_MIN;
} else {
tmp->underflow = ssa->var_info[constraint->min_ssa_var].range.underflow;
tmp->min = ssa->var_info[constraint->min_ssa_var].range.min + constraint->range.min;
}
#endif
} else {
tmp->underflow = 1;
@@ -882,8 +944,13 @@ int zend_inference_calc_range(const zend_op_array *op_array, zend_ssa *ssa, int
tmp->overflow = constraint->range.overflow;
#ifdef SYM_RANGE
} else if (narrowing && ssa->var_info[constraint->max_ssa_var].has_range) {
tmp->max = ssa->var_info[constraint->max_ssa_var].range.max + constraint->range.max;
tmp->overflow = ssa->var_info[constraint->max_ssa_var].range.overflow;
if (add_will_overflow(ssa->var_info[constraint->max_ssa_var].range.max, constraint->range.max)) {
tmp->overflow = 1;
tmp->max = ZEND_LONG_MAX;
} else {
tmp->max = ssa->var_info[constraint->max_ssa_var].range.max + constraint->range.max;
tmp->overflow = ssa->var_info[constraint->max_ssa_var].range.overflow;
}
#endif
} else {
tmp->max = ZEND_LONG_MAX;
@@ -1392,11 +1459,15 @@ int zend_inference_calc_range(const zend_op_array *op_array, zend_ssa *ssa, int
return 1;
}
break;
case ZEND_COUNT:
case ZEND_FUNC_NUM_ARGS:
tmp->min = 0;
tmp->max = ZEND_LONG_MAX;
return 1;
case ZEND_COUNT:
/* count() on Countable objects may return negative numbers */
tmp->min = ZEND_LONG_MIN;
tmp->max = ZEND_LONG_MAX;
return 1;
case ZEND_DO_FCALL:
case ZEND_DO_ICALL:
case ZEND_DO_UCALL:
@@ -2050,6 +2121,14 @@ static uint32_t binary_op_result_type(
uint32_t tmp = 0;
uint32_t t1_type = (t1 & MAY_BE_ANY) | (t1 & MAY_BE_UNDEF ? MAY_BE_NULL : 0);
uint32_t t2_type = (t2 & MAY_BE_ANY) | (t2 & MAY_BE_UNDEF ? MAY_BE_NULL : 0);
/* Handle potentially overloaded operators.
* This could be made more precise by checking the class type, if known. */
if ((t1_type & MAY_BE_OBJECT) || (t2_type & MAY_BE_OBJECT)) {
/* This is somewhat GMP specific. */
tmp |= MAY_BE_OBJECT | MAY_BE_FALSE | MAY_BE_RC1;
}
switch (opcode) {
case ZEND_ADD:
if (t1_type == MAY_BE_LONG && t2_type == MAY_BE_LONG) {
@@ -2104,7 +2183,7 @@ static uint32_t binary_op_result_type(
* handling */
break;
case ZEND_MOD:
tmp = MAY_BE_LONG;
tmp |= MAY_BE_LONG;
/* Division by zero results in an exception, so it doesn't need any special handling */
break;
case ZEND_BW_OR:
@@ -2119,7 +2198,7 @@ static uint32_t binary_op_result_type(
break;
case ZEND_SL:
case ZEND_SR:
tmp = MAY_BE_LONG;
tmp |= MAY_BE_LONG;
break;
case ZEND_CONCAT:
case ZEND_FAST_CONCAT:
@@ -2247,6 +2326,10 @@ static int zend_update_type_info(const zend_op_array *op_array,
if (t1 & (MAY_BE_ANY-MAY_BE_STRING)) {
tmp |= MAY_BE_LONG;
}
if (t1 & MAY_BE_OBJECT) {
/* Potentially overloaded operator. */
tmp |= MAY_BE_OBJECT | MAY_BE_RC1;
}
UPDATE_SSA_TYPE(tmp, ssa_ops[i].result_def);
break;
case ZEND_BEGIN_SILENCE:
@@ -3699,6 +3782,8 @@ void zend_init_func_return_info(const zend_op_array *op_array,
ret->type = zend_fetch_arg_info(script, ret_info, &ret->ce);
if (op_array->fn_flags & ZEND_ACC_RETURN_REFERENCE) {
ret->type |= MAY_BE_REF;
} else if (ret->type & (MAY_BE_STRING|MAY_BE_ARRAY|MAY_BE_OBJECT|MAY_BE_RESOURCE)) {
ret->type |= MAY_BE_RC1|MAY_BE_RCN;
}
ret->is_instanceof = (ret->ce) ? 1 : 0;
ret->range = tmp_range;
+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
+26 -11
View File
@@ -108,6 +108,9 @@ zend_accel_shared_globals *accel_shared_globals = NULL;
zend_bool accel_startup_ok = 0;
static char *zps_failure_reason = NULL;
char *zps_api_failure_reason = NULL;
#ifdef HAVE_OPCACHE_FILE_CACHE
zend_bool file_cache_only = 0; /* process uses file cache only */
#endif
#if ENABLE_FILE_CACHE_FALLBACK
zend_bool fallback_process = 0; /* process uses file cache fallback */
#endif
@@ -432,7 +435,7 @@ zend_string *accel_new_interned_string(zend_string *str)
Bucket *p;
#ifdef HAVE_OPCACHE_FILE_CACHE
if (ZCG(accel_directives).file_cache_only) {
if (file_cache_only) {
return str;
}
#endif
@@ -1269,8 +1272,8 @@ static zend_persistent_script *store_script_in_file_cache(zend_persistent_script
ZCG(mem) = zend_arena_alloc(&CG(arena), memory_used);
#endif
/* Copy into shared memory */
new_persistent_script = zend_accel_script_persist(new_persistent_script, NULL, 0);
/* Copy into memory block */
new_persistent_script = zend_accel_script_persist(new_persistent_script, NULL, 0, 0);
zend_shared_alloc_destroy_xlat_table();
@@ -1395,7 +1398,7 @@ static zend_persistent_script *cache_script_in_shared_memory(zend_persistent_scr
}
/* Copy into shared memory */
new_persistent_script = zend_accel_script_persist(new_persistent_script, &key, key_length);
new_persistent_script = zend_accel_script_persist(new_persistent_script, &key, key_length, 1);
zend_shared_alloc_destroy_xlat_table();
@@ -1743,7 +1746,7 @@ zend_op_array *persistent_compile_file(zend_file_handle *file_handle, int type)
/* The Accelerator is disabled, act as if without the Accelerator */
return accelerator_orig_compile_file(file_handle, type);
#ifdef HAVE_OPCACHE_FILE_CACHE
} else if (ZCG(accel_directives).file_cache_only) {
} else if (file_cache_only) {
return file_cache_compile_file(file_handle, type);
#endif
} else if ((!ZCG(counted) && !ZCSG(accelerator_enabled)) ||
@@ -2042,6 +2045,9 @@ static int persistent_stream_open_function(const char *filename, zend_file_handl
static zend_string* persistent_zend_resolve_path(const char *filename, int filename_len)
{
if (ZCG(enabled) && accel_startup_ok &&
#ifdef HAVE_OPCACHE_FILE_CACHE
!file_cache_only &&
#endif
(ZCG(counted) || ZCSG(accelerator_enabled)) &&
!ZCSG(restart_in_progress)) {
@@ -2173,7 +2179,7 @@ static void accel_activate(void)
ZCG(cwd_check) = 1;
#ifdef HAVE_OPCACHE_FILE_CACHE
if (ZCG(accel_directives).file_cache_only) {
if (file_cache_only) {
return;
}
#endif
@@ -2367,6 +2373,8 @@ static inline int accel_find_sapi(void)
static int zend_accel_init_shm(void)
{
int i;
zend_shared_alloc_lock();
accel_shared_globals = zend_shared_alloc(sizeof(zend_accel_shared_globals));
@@ -2414,6 +2422,11 @@ static int zend_accel_init_shm(void)
ZCSG(last_restart_time) = 0;
ZCSG(restart_in_progress) = 0;
for (i = 0; i < -HT_MIN_MASK; i++) {
ZCSG(uninitialized_bucket)[i] = HT_INVALID_IDX;
}
zend_shared_alloc_unlock();
return SUCCESS;
@@ -2632,7 +2645,8 @@ static int accel_startup(zend_extension *extension)
/* End of non-SHM dependent initializations */
/********************************************/
#ifdef HAVE_OPCACHE_FILE_CACHE
if (!ZCG(accel_directives).file_cache_only) {
file_cache_only = ZCG(accel_directives).file_cache_only;
if (!file_cache_only) {
#else
if (1) {
#endif
@@ -2664,6 +2678,7 @@ static int accel_startup(zend_extension *extension)
#if ENABLE_FILE_CACHE_FALLBACK
case ALLOC_FALLBACK:
zend_shared_alloc_lock();
file_cache_only = 1;
fallback_process = 1;
zend_accel_init_auto_globals();
zend_shared_alloc_unlock();
@@ -2762,7 +2777,7 @@ static void accel_free_ts_resources()
void accel_shutdown(void)
{
zend_ini_entry *ini_entry;
zend_bool file_cache_only = 0;
zend_bool _file_cache_only = 0;
zend_optimizer_shutdown();
@@ -2774,10 +2789,10 @@ void accel_shutdown(void)
}
#ifdef HAVE_OPCACHE_FILE_CACHE
file_cache_only = ZCG(accel_directives).file_cache_only;
_file_cache_only = file_cache_only;
#endif
if (!file_cache_only && ZCG(accel_directives).interned_strings_buffer) {
if (!_file_cache_only && ZCG(accel_directives).interned_strings_buffer) {
accel_use_permanent_interned_strings();
}
@@ -2785,7 +2800,7 @@ void accel_shutdown(void)
accel_free_ts_resources();
if (!file_cache_only) {
if (!_file_cache_only) {
zend_shared_alloc_shutdown();
}
zend_compile_file = accelerator_orig_compile_file;
+7
View File
@@ -120,6 +120,8 @@ extern int lock_file;
#if defined(HAVE_OPCACHE_FILE_CACHE) && defined(ZEND_WIN32)
# define ENABLE_FILE_CACHE_FALLBACK 1
#else
# define ENABLE_FILE_CACHE_FALLBACK 0
#endif
#if ZEND_WIN32
@@ -280,9 +282,14 @@ typedef struct _zend_accel_shared_globals {
char *interned_strings_end;
char *interned_strings_saved_top;
HashTable interned_strings;
/* uninitialized HashTable Support */
uint32_t uninitialized_bucket[-HT_MIN_MASK];
} zend_accel_shared_globals;
extern zend_bool accel_startup_ok;
#ifdef HAVE_OPCACHE_FILE_CACHE
extern zend_bool file_cache_only;
#endif
#if ENABLE_FILE_CACHE_FALLBACK
extern zend_bool fallback_process;
#endif
+1 -4
View File
@@ -71,7 +71,7 @@ static void zend_win_error_message(int type, char *msg, int err)
LocalFree( lpMsgBuf );
zend_accel_error(type, msg);
zend_accel_error(type, "%s", msg);
}
static char *create_name_with_username(char *name)
@@ -182,9 +182,6 @@ static int zend_shared_alloc_reattach(size_t requested_size, char **error_in)
}
accel_shared_globals = (zend_accel_shared_globals *)((char *)((zend_smm_shared_globals *)mapping_base)->app_shared_globals + ((char *)mapping_base - (char *)wanted_mb_save));
/* Make this process to use file-cache only */
ZCG(accel_directives).file_cache_only = 1;
return ALLOC_FALLBACK;
}
#endif
+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"
+24
View File
@@ -0,0 +1,24 @@
--TEST--
Bug #75969: Assertion failure in live range DCE due to block pass misoptimization
--INI--
opcache.enable_cli=1
opcache.optimization_level=-1
--FILE--
<?php
// This is required for the segfault
md5('foo');
class Extended_Class {};
$response = array(
'a' => 'b'
);
new Extended_Class( array(
'foo' => $response,
'foo2' => 'bar2'
) );
?>
===DONE===
--EXPECT--
===DONE===
+16
View File
@@ -0,0 +1,16 @@
--TEST--
Bug #76074 (opcache corrupts variable in for-loop)
--FILE--
<?php
function test(int $nr) {
for ($i = $nr; $i <= $nr + 1; $i++)
var_dump($i);
}
test(1);
?>
--EXPECT--
int(1)
int(2)
+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)
@@ -0,0 +1,26 @@
--TEST--
Incorrect negative range inference
--FILE--
<?php
function test() {
for ($i = 0; $i < 10; $i++) {
if ($i != 5) {
$t = (int) ($i < 5);
var_dump($t);
}
}
}
test();
?>
--EXPECT--
int(1)
int(1)
int(1)
int(1)
int(1)
int(0)
int(0)
int(0)
int(0)
+5 -5
View File
@@ -405,7 +405,7 @@ void zend_accel_override_file_functions(void)
zend_function *old_function;
if (ZCG(enabled) && accel_startup_ok && ZCG(accel_directives).file_override_enabled) {
#ifdef HAVE_OPCACHE_FILE_CACHE
if (ZCG(accel_directives).file_cache_only) {
if (file_cache_only) {
zend_accel_error(ACCEL_LOG_WARNING, "file_override_enabled has no effect when file_cache_only is set");
return;
}
@@ -441,7 +441,7 @@ void zend_accel_info(ZEND_MODULE_INFO_FUNC_ARGS)
if (ZCG(enabled) && accel_startup_ok &&
#ifdef HAVE_OPCACHE_FILE_CACHE
((ZCG(counted) || ZCSG(accelerator_enabled)) || ZCG(accel_directives).file_cache_only)
((ZCG(counted) || ZCSG(accelerator_enabled)) || file_cache_only)
#else
(ZCG(counted) || ZCSG(accelerator_enabled))
#endif
@@ -456,7 +456,7 @@ void zend_accel_info(ZEND_MODULE_INFO_FUNC_ARGS)
php_info_print_table_row(2, "Optimization", "Disabled");
}
#ifdef HAVE_OPCACHE_FILE_CACHE
if (!ZCG(accel_directives).file_cache_only) {
if (!file_cache_only) {
php_info_print_table_row(2, "SHM Cache", "Enabled");
} else {
php_info_print_table_row(2, "SHM Cache", "Disabled");
@@ -466,7 +466,7 @@ void zend_accel_info(ZEND_MODULE_INFO_FUNC_ARGS)
} else {
php_info_print_table_row(2, "File Cache", "Disabled");
}
if (ZCG(accel_directives).file_cache_only) {
if (file_cache_only) {
if (!accel_startup_ok || zps_api_failure_reason) {
php_info_print_table_row(2, "Startup Failed", zps_api_failure_reason);
} else {
@@ -615,7 +615,7 @@ static ZEND_FUNCTION(opcache_get_status)
if (ZCG(accel_directives).file_cache) {
add_assoc_string(return_value, "file_cache", ZCG(accel_directives).file_cache);
}
if (ZCG(accel_directives).file_cache_only) {
if (file_cache_only) {
add_assoc_bool(return_value, "file_cache_only", 1);
return;
}
+1 -1
View File
@@ -180,7 +180,7 @@ static void zend_hash_clone_constants(HashTable *ht, HashTable *source)
ht->nNumUsed = 0;
ht->nNumOfElements = source->nNumOfElements;
ht->nNextFreeElement = source->nNextFreeElement;
ht->pDestructor = ZVAL_PTR_DTOR;
ht->pDestructor = NULL;
ht->u.flags = (source->u.flags & HASH_FLAG_INITIALIZED) | HASH_FLAG_APPLY_PROTECTION;
ht->nInternalPointer = source->nNumOfElements ? 0 : HT_INVALID_IDX;
+39 -4
View File
@@ -23,6 +23,9 @@
#include "zend_interfaces.h"
#include "php.h"
#ifdef ZEND_WIN32
#include "ext/standard/md5.h"
#endif
#ifdef HAVE_OPCACHE_FILE_CACHE
@@ -730,16 +733,43 @@ static char *zend_file_cache_get_bin_file_path(zend_string *script_path)
size_t len;
char *filename;
#ifndef ZEND_WIN32
len = strlen(ZCG(accel_directives).file_cache);
filename = emalloc(len + 33 + ZSTR_LEN(script_path) + sizeof(SUFFIX));
memcpy(filename, ZCG(accel_directives).file_cache, len);
#ifndef ZEND_WIN32
filename[len] = '/';
memcpy(filename + len + 1, ZCG(system_id), 32);
memcpy(filename + len + 33, ZSTR_VAL(script_path), ZSTR_LEN(script_path));
memcpy(filename + len + 33 + ZSTR_LEN(script_path), SUFFIX, sizeof(SUFFIX));
#else
PHP_MD5_CTX ctx;
char md5uname[32];
unsigned char digest[16], c;
size_t i;
char *uname = php_win32_get_username();
PHP_MD5Init(&ctx);
PHP_MD5Update(&ctx, uname, strlen(uname));
PHP_MD5Final(digest, &ctx);
for (i = 0; i < 16; i++) {
c = digest[i] >> 4;
c = (c <= 9) ? c + '0' : c - 10 + 'a';
md5uname[i * 2] = c;
c = digest[i] & 0x0f;
c = (c <= 9) ? c + '0' : c - 10 + 'a';
md5uname[(i * 2) + 1] = c;
}
len = strlen(ZCG(accel_directives).file_cache);
filename = emalloc(len + 33 + 33 + ZSTR_LEN(script_path) + sizeof(SUFFIX));
memcpy(filename, ZCG(accel_directives).file_cache, len);
filename[len] = '\\';
memcpy(filename + 1 + len, md5uname, 32);
len += 32;
filename[len] = '\\';
memcpy(filename + len + 1, ZCG(system_id), 32);
if (ZSTR_LEN(script_path) >= 2 && ':' == ZSTR_VAL(script_path)[1]) {
/* local fs */
@@ -752,6 +782,7 @@ static char *zend_file_cache_get_bin_file_path(zend_string *script_path)
memcpy(filename + len + 33, ZSTR_VAL(script_path), ZSTR_LEN(script_path));
memcpy(filename + len + 33 + ZSTR_LEN(script_path), SUFFIX, sizeof(SUFFIX));
}
free(uname);
#endif
return filename;
@@ -871,7 +902,11 @@ static void zend_file_cache_unserialize_hash(HashTable *ht,
ht->pDestructor = dtor;
if (!(ht->u.flags & HASH_FLAG_INITIALIZED)) {
HT_SET_DATA_ADDR(ht, &uninitialized_bucket);
if (EXPECTED(!file_cache_only)) {
HT_SET_DATA_ADDR(ht, &ZCSG(uninitialized_bucket));
} else {
HT_SET_DATA_ADDR(ht, &uninitialized_bucket);
}
return;
}
if (IS_UNSERIALIZED(ht->arData)) {
@@ -1193,7 +1228,7 @@ static void zend_file_cache_unserialize_class(zval *zv,
UNSERIALIZE_STR(ce->info.user.filename);
UNSERIALIZE_STR(ce->info.user.doc_comment);
zend_file_cache_unserialize_hash(&ce->properties_info,
script, buf, zend_file_cache_unserialize_prop_info, ZVAL_PTR_DTOR);
script, buf, zend_file_cache_unserialize_prop_info, NULL);
if (ce->trait_aliases) {
zend_trait_alias **p, *q;
@@ -1403,7 +1438,7 @@ zend_persistent_script *zend_file_cache_script_load(zend_file_handle *file_handl
return NULL;
}
if (!ZCG(accel_directives).file_cache_only &&
if (!file_cache_only &&
!ZCSG(restart_in_progress) &&
!ZSMMG(memory_exhausted) &&
accelerator_shm_read_lock() == SUCCESS) {
+38 -6
View File
@@ -35,7 +35,7 @@
#ifdef HAVE_OPCACHE_FILE_CACHE
#define zend_set_str_gc_flags(str) do { \
if (ZCG(accel_directives).file_cache_only) { \
if (file_cache_only) { \
GC_FLAGS(str) = IS_STR_INTERNED; \
} else { \
GC_FLAGS(str) = IS_STR_INTERNED | IS_STR_PERMANENT; \
@@ -86,14 +86,24 @@ static void zend_hash_persist(HashTable *ht, zend_persist_func_t pPersistElement
uint32_t idx, nIndex;
Bucket *p;
ht->pDestructor = NULL;
if (!(ht->u.flags & HASH_FLAG_INITIALIZED)) {
HT_SET_DATA_ADDR(ht, &uninitialized_bucket);
if (EXPECTED(!ZCG(current_persistent_script)->corrupted)) {
HT_SET_DATA_ADDR(ht, &ZCSG(uninitialized_bucket));
} else {
HT_SET_DATA_ADDR(ht, &uninitialized_bucket);
}
return;
}
if (ht->nNumUsed == 0) {
efree(HT_GET_DATA_ADDR(ht));
ht->nTableMask = HT_MIN_MASK;
HT_SET_DATA_ADDR(ht, &uninitialized_bucket);
if (EXPECTED(!ZCG(current_persistent_script)->corrupted)) {
HT_SET_DATA_ADDR(ht, &ZCSG(uninitialized_bucket));
} else {
HT_SET_DATA_ADDR(ht, &uninitialized_bucket);
}
ht->u.flags &= ~HASH_FLAG_INITIALIZED;
return;
}
@@ -170,14 +180,24 @@ static void zend_hash_persist_immutable(HashTable *ht)
uint32_t idx, nIndex;
Bucket *p;
ht->pDestructor = NULL;
if (!(ht->u.flags & HASH_FLAG_INITIALIZED)) {
HT_SET_DATA_ADDR(ht, &uninitialized_bucket);
if (EXPECTED(!ZCG(current_persistent_script)->corrupted)) {
HT_SET_DATA_ADDR(ht, &ZCSG(uninitialized_bucket));
} else {
HT_SET_DATA_ADDR(ht, &uninitialized_bucket);
}
return;
}
if (ht->nNumUsed == 0) {
efree(HT_GET_DATA_ADDR(ht));
ht->nTableMask = HT_MIN_MASK;
HT_SET_DATA_ADDR(ht, &uninitialized_bucket);
if (EXPECTED(!ZCG(current_persistent_script)->corrupted)) {
HT_SET_DATA_ADDR(ht, &ZCSG(uninitialized_bucket));
} else {
HT_SET_DATA_ADDR(ht, &uninitialized_bucket);
}
ht->u.flags &= ~HASH_FLAG_INITIALIZED;
return;
}
@@ -829,7 +849,7 @@ static void zend_accel_persist_class_table(HashTable *class_table)
zend_hash_apply(class_table, (apply_func_t) zend_update_parent_ce);
}
zend_persistent_script *zend_accel_script_persist(zend_persistent_script *script, char **key, unsigned int key_length)
zend_persistent_script *zend_accel_script_persist(zend_persistent_script *script, char **key, unsigned int key_length, int for_shm)
{
script->mem = ZCG(mem);
@@ -840,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__
@@ -856,6 +885,9 @@ zend_persistent_script *zend_accel_script_persist(zend_persistent_script *script
zend_hash_persist(&script->script.function_table, zend_persist_op_array);
zend_persist_op_array_ex(&script->script.main_op_array, script);
script->corrupted = 0;
ZCG(current_persistent_script) = NULL;
return script;
}
+1 -1
View File
@@ -24,6 +24,6 @@
int zend_accel_script_persistable(zend_persistent_script *script);
uint32_t zend_accel_script_persist_calc(zend_persistent_script *script, char *key, unsigned int key_length, int for_shm);
zend_persistent_script *zend_accel_script_persist(zend_persistent_script *script, char **key, unsigned int key_length);
zend_persistent_script *zend_accel_script_persist(zend_persistent_script *script, char **key, unsigned int key_length, int for_shm);
#endif /* ZEND_PERSIST_H */
+7 -6
View File
@@ -154,12 +154,12 @@ ZEND_BEGIN_ARG_INFO(arginfo_openssl_x509_check_private_key, 0)
ZEND_ARG_INFO(0, key)
ZEND_END_ARG_INFO()
ZEND_BEGIN_ARG_INFO(arginfo_openssl_x509_parse, 0)
ZEND_BEGIN_ARG_INFO_EX(arginfo_openssl_x509_parse, 0, 0, 1)
ZEND_ARG_INFO(0, x509)
ZEND_ARG_INFO(0, shortname)
ZEND_END_ARG_INFO()
ZEND_BEGIN_ARG_INFO_EX(arginfo_openssl_x509_checkpurpose, 0, 0, 3)
ZEND_BEGIN_ARG_INFO_EX(arginfo_openssl_x509_checkpurpose, 0, 0, 2)
ZEND_ARG_INFO(0, x509cert)
ZEND_ARG_INFO(0, purpose)
ZEND_ARG_INFO(0, cainfo) /* array */
@@ -182,7 +182,7 @@ ZEND_BEGIN_ARG_INFO_EX(arginfo_openssl_pkcs12_export_to_file, 0, 0, 4)
ZEND_ARG_INFO(0, args) /* array */
ZEND_END_ARG_INFO()
ZEND_BEGIN_ARG_INFO(arginfo_openssl_pkcs12_export, 0)
ZEND_BEGIN_ARG_INFO_EX(arginfo_openssl_pkcs12_export, 0, 0, 4)
ZEND_ARG_INFO(0, x509)
ZEND_ARG_INFO(1, out)
ZEND_ARG_INFO(0, priv_key)
@@ -224,12 +224,14 @@ ZEND_BEGIN_ARG_INFO_EX(arginfo_openssl_csr_new, 0, 0, 2)
ZEND_ARG_INFO(0, extraattribs)
ZEND_END_ARG_INFO()
ZEND_BEGIN_ARG_INFO(arginfo_openssl_csr_get_subject, 0)
ZEND_BEGIN_ARG_INFO_EX(arginfo_openssl_csr_get_subject, 0, 0, 1)
ZEND_ARG_INFO(0, csr)
ZEND_ARG_INFO(0, use_shortnames)
ZEND_END_ARG_INFO()
ZEND_BEGIN_ARG_INFO(arginfo_openssl_csr_get_public_key, 0)
ZEND_BEGIN_ARG_INFO_EX(arginfo_openssl_csr_get_public_key, 0, 0, 1)
ZEND_ARG_INFO(0, csr)
ZEND_ARG_INFO(0, use_shortnames)
ZEND_END_ARG_INFO()
ZEND_BEGIN_ARG_INFO_EX(arginfo_openssl_pkey_new, 0, 0, 0)
@@ -6807,4 +6809,3 @@ PHP_FUNCTION(openssl_random_pseudo_bytes)
* vim600: sw=4 ts=4 fdm=marker
* vim<600: sw=4 ts=4
*/
+22 -7
View File
@@ -770,14 +770,17 @@ PHP_FUNCTION(pcntl_wifexited)
{
#ifdef WIFEXITED
zend_long status_word;
int int_status_word;
if (zend_parse_parameters(ZEND_NUM_ARGS(), "l", &status_word) == FAILURE) {
return;
}
if (WIFEXITED(status_word))
int_status_word = (int) status_word;
if (WIFEXITED(int_status_word))
RETURN_TRUE;
#endif
RETURN_FALSE;
}
/* }}} */
@@ -788,12 +791,14 @@ PHP_FUNCTION(pcntl_wifstopped)
{
#ifdef WIFSTOPPED
zend_long status_word;
int int_status_word;
if (zend_parse_parameters(ZEND_NUM_ARGS(), "l", &status_word) == FAILURE) {
return;
}
if (WIFSTOPPED(status_word))
int_status_word = (int) status_word;
if (WIFSTOPPED(int_status_word))
RETURN_TRUE;
#endif
RETURN_FALSE;
@@ -806,12 +811,14 @@ PHP_FUNCTION(pcntl_wifsignaled)
{
#ifdef WIFSIGNALED
zend_long status_word;
int int_status_word;
if (zend_parse_parameters(ZEND_NUM_ARGS(), "l", &status_word) == FAILURE) {
return;
}
if (WIFSIGNALED(status_word))
int_status_word = (int) status_word;
if (WIFSIGNALED(int_status_word))
RETURN_TRUE;
#endif
RETURN_FALSE;
@@ -823,12 +830,14 @@ PHP_FUNCTION(pcntl_wifcontinued)
{
#ifdef HAVE_WCONTINUED
zend_long status_word;
int int_status_word;
if (zend_parse_parameters(ZEND_NUM_ARGS(), "l", &status_word) == FAILURE) {
return;
}
if (WIFCONTINUED(status_word))
int_status_word = (int) status_word;
if (WIFCONTINUED(int_status_word))
RETURN_TRUE;
#endif
RETURN_FALSE;
@@ -842,12 +851,14 @@ PHP_FUNCTION(pcntl_wexitstatus)
{
#ifdef WEXITSTATUS
zend_long status_word;
int int_status_word;
if (zend_parse_parameters(ZEND_NUM_ARGS(), "l", &status_word) == FAILURE) {
return;
}
RETURN_LONG(WEXITSTATUS(status_word));
int_status_word = (int) status_word;
RETURN_LONG(WEXITSTATUS(int_status_word));
#else
RETURN_FALSE;
#endif
@@ -860,12 +871,14 @@ PHP_FUNCTION(pcntl_wtermsig)
{
#ifdef WTERMSIG
zend_long status_word;
int int_status_word;
if (zend_parse_parameters(ZEND_NUM_ARGS(), "l", &status_word) == FAILURE) {
return;
}
RETURN_LONG(WTERMSIG(status_word));
int_status_word = (int) status_word;
RETURN_LONG(WTERMSIG(int_status_word));
#else
RETURN_FALSE;
#endif
@@ -878,12 +891,14 @@ PHP_FUNCTION(pcntl_wstopsig)
{
#ifdef WSTOPSIG
zend_long status_word;
int int_status_word;
if (zend_parse_parameters(ZEND_NUM_ARGS(), "l", &status_word) == FAILURE) {
return;
}
RETURN_LONG(WSTOPSIG(status_word));
int_status_word = (int) status_word;
RETURN_LONG(WSTOPSIG(int_status_word));
#else
RETURN_FALSE;
#endif
+4 -1
View File
@@ -618,11 +618,13 @@ static zend_always_inline char * pdo_pgsql_translate_oid_to_table(Oid oid, PGcon
}
efree(querystr);
if ((table_name = PQgetvalue(tmp_res, 0, 0)) == NULL) {
if (1 == PQgetisnull(tmp_res, 0, 0) || (table_name = PQgetvalue(tmp_res, 0, 0)) == NULL) {
PQclear(tmp_res);
return 0;
}
table_name = estrdup(table_name);
PQclear(tmp_res);
return table_name;
}
@@ -652,6 +654,7 @@ static int pgsql_stmt_get_column_meta(pdo_stmt_t *stmt, zend_long colno, zval *r
table_name = pdo_pgsql_translate_oid_to_table(table_oid, S->H->server);
if (table_name) {
add_assoc_string(return_value, "table", table_name);
efree(table_name);
}
switch (S->cols[colno].pgsql_type) {
+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);
}
/* }}} */
+155 -198
View File
@@ -1,4 +1,4 @@
/* Generated by re2c 0.13.5 */
/* Generated by re2c 0.16 */
#line 1 "ext/phar/phar_path_check.re"
/*
+----------------------------------------------------------------------+
@@ -47,158 +47,52 @@ loop:
{
YYCTYPE yych;
unsigned int yyaccept = 0;
if ((YYLIMIT - YYCURSOR) < 4) YYFILL(4);
yych = *YYCURSOR;
if (yych <= '[') {
if (yych <= ')') {
if (yych <= '\t') {
if (yych <= 0x00) goto yy21;
goto yy23;
if (yych <= '\f') {
if (yych >= 0x01) goto yy4;
} else {
if (yych <= '\n') goto yy2;
if (yych <= 0x19) goto yy23;
goto yy11;
if (yych <= '\r') goto yy6;
if (yych <= 0x19) goto yy4;
goto yy7;
}
} else {
if (yych <= '/') {
if (yych <= '*') goto yy7;
if (yych <= '.') goto yy11;
goto yy3;
} else {
if (yych == '?') goto yy9;
if (yych <= '*') goto yy9;
if (yych <= '.') goto yy7;
goto yy11;
} else {
if (yych == '?') goto yy12;
goto yy7;
}
}
} else {
if (yych <= 0xEC) {
if (yych <= 0xC1) {
if (yych <= '\\') goto yy5;
if (yych <= 0x7F) goto yy11;
goto yy23;
if (yych <= '\\') goto yy14;
if (yych <= 0x7F) goto yy7;
goto yy4;
} else {
if (yych <= 0xDF) goto yy12;
if (yych <= 0xE0) goto yy14;
goto yy15;
if (yych <= 0xDF) goto yy16;
if (yych <= 0xE0) goto yy17;
goto yy18;
}
} else {
if (yych <= 0xF0) {
if (yych <= 0xED) goto yy16;
if (yych <= 0xEF) goto yy17;
goto yy18;
if (yych <= 0xED) goto yy19;
if (yych <= 0xEF) goto yy18;
goto yy20;
} else {
if (yych <= 0xF3) goto yy19;
if (yych <= 0xF4) goto yy20;
goto yy23;
if (yych <= 0xF3) goto yy21;
if (yych <= 0xF4) goto yy22;
goto yy4;
}
}
}
yy2:
YYCURSOR = YYMARKER;
if (yyaccept <= 0) {
goto yy4;
} else {
goto yy13;
}
yy3:
yyaccept = 0;
yych = *(YYMARKER = ++YYCURSOR);
if (yych <= '-') goto yy4;
if (yych <= '.') goto yy35;
if (yych <= '/') goto yy36;
yy4:
#line 88 "ext/phar/phar_path_check.re"
{
goto loop;
}
#line 115 "ext/phar/phar_path_check.c"
yy5:
++YYCURSOR;
#line 72 "ext/phar/phar_path_check.re"
{
*error = "back-slash";
return pcr_err_back_slash;
}
#line 123 "ext/phar/phar_path_check.c"
yy7:
++YYCURSOR;
#line 76 "ext/phar/phar_path_check.re"
{
*error = "star";
return pcr_err_star;
}
#line 131 "ext/phar/phar_path_check.c"
yy9:
++YYCURSOR;
#line 80 "ext/phar/phar_path_check.re"
{
if (**s == '/') {
(*s)++;
}
*len = (p - (const unsigned char*)*s) -1;
*error = NULL;
return pcr_use_query;
}
#line 143 "ext/phar/phar_path_check.c"
yy11:
yych = *++YYCURSOR;
goto yy4;
yy12:
++YYCURSOR;
if ((yych = *YYCURSOR) <= 0x7F) goto yy13;
if (yych <= 0xBF) goto yy26;
yy13:
#line 104 "ext/phar/phar_path_check.re"
{
*error ="illegal character";
return pcr_err_illegal_char;
}
#line 157 "ext/phar/phar_path_check.c"
yy14:
yyaccept = 1;
yych = *(YYMARKER = ++YYCURSOR);
if (yych <= 0x9F) goto yy13;
if (yych <= 0xBF) goto yy34;
goto yy13;
yy15:
yyaccept = 1;
yych = *(YYMARKER = ++YYCURSOR);
if (yych <= 0x7F) goto yy13;
if (yych <= 0xBF) goto yy33;
goto yy13;
yy16:
yyaccept = 1;
yych = *(YYMARKER = ++YYCURSOR);
if (yych <= 0x7F) goto yy13;
if (yych <= 0x9F) goto yy32;
goto yy13;
yy17:
yyaccept = 1;
yych = *(YYMARKER = ++YYCURSOR);
if (yych <= 0x7F) goto yy13;
if (yych <= 0xBF) goto yy31;
goto yy13;
yy18:
yyaccept = 1;
yych = *(YYMARKER = ++YYCURSOR);
if (yych <= 0x8F) goto yy13;
if (yych <= 0xBF) goto yy29;
goto yy13;
yy19:
yyaccept = 1;
yych = *(YYMARKER = ++YYCURSOR);
if (yych <= 0x7F) goto yy13;
if (yych <= 0xBF) goto yy27;
goto yy13;
yy20:
yyaccept = 1;
yych = *(YYMARKER = ++YYCURSOR);
if (yych <= 0x7F) goto yy13;
if (yych <= 0x8F) goto yy24;
goto yy13;
yy21:
++YYCURSOR;
#line 91 "ext/phar/phar_path_check.re"
#line 93 "ext/phar/phar_path_check.re"
{
if (**s == '/') {
(*s)++;
@@ -212,93 +106,156 @@ yy21:
*error = NULL;
return pcr_is_ok;
}
#line 216 "ext/phar/phar_path_check.c"
#line 110 "ext/phar/phar_path_check.c"
yy4:
++YYCURSOR;
yy5:
#line 106 "ext/phar/phar_path_check.re"
{
*error ="illegal character";
return pcr_err_illegal_char;
}
#line 119 "ext/phar/phar_path_check.c"
yy6:
yych = *++YYCURSOR;
if (yych == '\n') goto yy4;
goto yy5;
yy7:
++YYCURSOR;
yy8:
#line 90 "ext/phar/phar_path_check.re"
{
goto loop;
}
#line 131 "ext/phar/phar_path_check.c"
yy9:
++YYCURSOR;
#line 78 "ext/phar/phar_path_check.re"
{
*error = "star";
return pcr_err_star;
}
#line 139 "ext/phar/phar_path_check.c"
yy11:
yyaccept = 0;
yych = *(YYMARKER = ++YYCURSOR);
if (yych <= '-') goto yy8;
if (yych <= '.') goto yy23;
if (yych <= '/') goto yy25;
goto yy8;
yy12:
++YYCURSOR;
#line 82 "ext/phar/phar_path_check.re"
{
if (**s == '/') {
(*s)++;
}
*len = (p - (const unsigned char*)*s) -1;
*error = NULL;
return pcr_use_query;
}
#line 158 "ext/phar/phar_path_check.c"
yy14:
++YYCURSOR;
#line 74 "ext/phar/phar_path_check.re"
{
*error = "back-slash";
return pcr_err_back_slash;
}
#line 166 "ext/phar/phar_path_check.c"
yy16:
yych = *++YYCURSOR;
if (yych <= 0x7F) goto yy5;
if (yych <= 0xBF) goto yy7;
goto yy5;
yy17:
yyaccept = 1;
yych = *(YYMARKER = ++YYCURSOR);
if (yych <= 0x9F) goto yy5;
if (yych <= 0xBF) goto yy27;
goto yy5;
yy18:
yyaccept = 1;
yych = *(YYMARKER = ++YYCURSOR);
if (yych <= 0x7F) goto yy5;
if (yych <= 0xBF) goto yy27;
goto yy5;
yy19:
yyaccept = 1;
yych = *(YYMARKER = ++YYCURSOR);
if (yych <= 0x7F) goto yy5;
if (yych <= 0x9F) goto yy27;
goto yy5;
yy20:
yyaccept = 1;
yych = *(YYMARKER = ++YYCURSOR);
if (yych <= 0x8F) goto yy5;
if (yych <= 0xBF) goto yy28;
goto yy5;
yy21:
yyaccept = 1;
yych = *(YYMARKER = ++YYCURSOR);
if (yych <= 0x7F) goto yy5;
if (yych <= 0xBF) goto yy28;
goto yy5;
yy22:
yyaccept = 1;
yych = *(YYMARKER = ++YYCURSOR);
if (yych <= 0x7F) goto yy5;
if (yych <= 0x8F) goto yy28;
goto yy5;
yy23:
yych = *++YYCURSOR;
goto yy13;
if (yych <= 0x00) goto yy29;
if (yych <= '-') goto yy24;
if (yych <= '.') goto yy31;
if (yych <= '/') goto yy29;
yy24:
yych = *++YYCURSOR;
if (yych <= 0x7F) goto yy2;
if (yych >= 0xC0) goto yy2;
yych = *++YYCURSOR;
if (yych <= 0x7F) goto yy2;
if (yych >= 0xC0) goto yy2;
yy26:
yych = *++YYCURSOR;
goto yy4;
yy27:
yych = *++YYCURSOR;
if (yych <= 0x7F) goto yy2;
if (yych >= 0xC0) goto yy2;
yych = *++YYCURSOR;
if (yych <= 0x7F) goto yy2;
if (yych <= 0xBF) goto yy26;
goto yy2;
yy29:
yych = *++YYCURSOR;
if (yych <= 0x7F) goto yy2;
if (yych >= 0xC0) goto yy2;
yych = *++YYCURSOR;
if (yych <= 0x7F) goto yy2;
if (yych <= 0xBF) goto yy26;
goto yy2;
yy31:
yych = *++YYCURSOR;
if (yych <= 0x7F) goto yy2;
if (yych <= 0xBF) goto yy26;
goto yy2;
yy32:
yych = *++YYCURSOR;
if (yych <= 0x7F) goto yy2;
if (yych <= 0xBF) goto yy26;
goto yy2;
yy33:
yych = *++YYCURSOR;
if (yych <= 0x7F) goto yy2;
if (yych <= 0xBF) goto yy26;
goto yy2;
yy34:
yych = *++YYCURSOR;
if (yych <= 0x7F) goto yy2;
if (yych <= 0xBF) goto yy26;
goto yy2;
yy35:
yych = *++YYCURSOR;
if (yych <= 0x00) goto yy39;
if (yych <= '-') goto yy2;
if (yych <= '.') goto yy38;
if (yych <= '/') goto yy39;
goto yy2;
yy36:
YYCURSOR = YYMARKER;
if (yyaccept == 0) {
goto yy8;
} else {
goto yy5;
}
yy25:
++YYCURSOR;
#line 60 "ext/phar/phar_path_check.re"
#line 62 "ext/phar/phar_path_check.re"
{
*error = "double slash";
return pcr_err_double_slash;
}
#line 280 "ext/phar/phar_path_check.c"
yy38:
#line 228 "ext/phar/phar_path_check.c"
yy27:
yych = *++YYCURSOR;
if (yych <= 0x00) goto yy41;
if (yych == '/') goto yy41;
goto yy2;
yy39:
if (yych <= 0x7F) goto yy24;
if (yych <= 0xBF) goto yy7;
goto yy24;
yy28:
yych = *++YYCURSOR;
if (yych <= 0x7F) goto yy24;
if (yych <= 0xBF) goto yy27;
goto yy24;
yy29:
++YYCURSOR;
#line 68 "ext/phar/phar_path_check.re"
#line 70 "ext/phar/phar_path_check.re"
{
*error = "current directory reference";
return pcr_err_curr_dir;
}
#line 293 "ext/phar/phar_path_check.c"
yy41:
#line 246 "ext/phar/phar_path_check.c"
yy31:
yych = *++YYCURSOR;
if (yych <= 0x00) goto yy32;
if (yych != '/') goto yy24;
yy32:
++YYCURSOR;
#line 64 "ext/phar/phar_path_check.re"
#line 66 "ext/phar/phar_path_check.re"
{
*error = "upper directory reference";
return pcr_err_up_dir;
}
#line 301 "ext/phar/phar_path_check.c"
#line 258 "ext/phar/phar_path_check.c"
}
#line 108 "ext/phar/phar_path_check.re"
#line 110 "ext/phar/phar_path_check.re"
}
+5 -3
View File
@@ -41,7 +41,8 @@ phar_path_check_result phar_path_check(char **s, int *len, const char **error)
loop:
/*!re2c
END = "\x00";
END = "\x00";
NEWLINE = "\r"? "\n";
UTF8T = [\x80-\xBF] ;
UTF8_1 = [\x1A-\x7F] ;
UTF8_2 = [\xC2-\xDF] UTF8T ;
@@ -55,8 +56,9 @@ UTF8_4B = [\xF1-\xF3] UTF8T{3} ;
UTF8_4C = "\xF4" [\x80-\x8F] UTF8T{2} ;
UTF8_4 = UTF8_4A | UTF8_4B | UTF8_4C ;
UTF8 = UTF8_1 | UTF8_2 | UTF8_3 | UTF8_4 ;
EOS = "/" | END;
ANY = .;
EOS = "/" | END;
ANY = . | NEWLINE;
"//" {
*error = "double slash";
return pcr_err_double_slash;
@@ -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;
}
+13
View File
@@ -69,6 +69,19 @@ if test "$PHP_SOCKETS" != "no"; then
AC_DEFINE(HAVE_AI_ALL,1,[Whether you have AI_ALL])
fi
dnl Check for AI_IDN flag
AC_CACHE_CHECK([if getaddrinfo supports AI_IDN],[ac_cv_gai_ai_idn],
[
AC_TRY_COMPILE([
#include <netdb.h>
], [int flag = AI_IDN;],
ac_cv_gai_ai_idn=yes, ac_cv_gai_ai_idn=no)
])
if test "$ac_cv_gai_ai_idn" = yes; then
AC_DEFINE(HAVE_AI_IDN,1,[Whether you have AI_IDN])
fi
PHP_NEW_EXTENSION([sockets], [sockets.c multicast.c conversions.c sockaddr_conv.c sendrecvmsg.c], [$ext_shared],, -DZEND_ENABLE_STATIC_TSRMLS_CACHE=1)
PHP_INSTALL_HEADERS([ext/sockets/], [php_sockets.h])
fi
+2 -2
View File
@@ -796,7 +796,7 @@ static PHP_MINIT_FUNCTION(sockets)
REGISTER_LONG_CONSTANT("AI_ALL", AI_ALL, CONST_CS | CONST_PERSISTENT);
#endif
REGISTER_LONG_CONSTANT("AI_ADDRCONFIG", AI_ADDRCONFIG, CONST_CS | CONST_PERSISTENT);
#ifdef __USE_GNU
#if HAVE_AI_IDN
REGISTER_LONG_CONSTANT("AI_IDN", AI_IDN, CONST_CS | CONST_PERSISTENT);
REGISTER_LONG_CONSTANT("AI_CANONIDN", AI_CANONIDN, CONST_CS | CONST_PERSISTENT);
REGISTER_LONG_CONSTANT("AI_IDN_ALLOW_UNASSIGNED", AI_IDN_ALLOW_UNASSIGNED, CONST_CS | CONST_PERSISTENT);
@@ -2531,7 +2531,7 @@ PHP_FUNCTION(socket_addrinfo_lookup)
memset(&hints, 0, sizeof(hints));
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "S|sa", &hostname, &service, &service_len, &zhints) == FAILURE) {
if (zend_parse_parameters(ZEND_NUM_ARGS(), "S|sa", &hostname, &service, &service_len, &zhints) == FAILURE) {
RETURN_NULL();
}
+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()
+5 -5
View File
@@ -632,7 +632,7 @@ ZEND_BEGIN_ARG_INFO(arginfo_long2ip, 0)
ZEND_ARG_INFO(0, proper_address)
ZEND_END_ARG_INFO()
ZEND_BEGIN_ARG_INFO_EX(arginfo_getenv, 0, 0, 1)
ZEND_BEGIN_ARG_INFO_EX(arginfo_getenv, 0, 0, 0)
ZEND_ARG_INFO(0, varname)
ZEND_ARG_INFO(0, local_only)
ZEND_END_ARG_INFO()
@@ -1382,7 +1382,7 @@ ZEND_BEGIN_ARG_INFO(arginfo_vfprintf, 0)
ZEND_END_ARG_INFO()
/* }}} */
/* {{{ fsock.c */
ZEND_BEGIN_ARG_INFO_EX(arginfo_fsockopen, 0, 0, 2)
ZEND_BEGIN_ARG_INFO_EX(arginfo_fsockopen, 0, 0, 1)
ZEND_ARG_INFO(0, hostname)
ZEND_ARG_INFO(0, port)
ZEND_ARG_INFO(1, errno)
@@ -1390,7 +1390,7 @@ ZEND_BEGIN_ARG_INFO_EX(arginfo_fsockopen, 0, 0, 2)
ZEND_ARG_INFO(0, timeout)
ZEND_END_ARG_INFO()
ZEND_BEGIN_ARG_INFO_EX(arginfo_pfsockopen, 0, 0, 2)
ZEND_BEGIN_ARG_INFO_EX(arginfo_pfsockopen, 0, 0, 1)
ZEND_ARG_INFO(0, hostname)
ZEND_ARG_INFO(0, port)
ZEND_ARG_INFO(1, errno)
@@ -2197,7 +2197,7 @@ ZEND_BEGIN_ARG_INFO(arginfo_implode, 0)
ZEND_ARG_INFO(0, pieces)
ZEND_END_ARG_INFO()
ZEND_BEGIN_ARG_INFO(arginfo_strtok, 0)
ZEND_BEGIN_ARG_INFO_EX(arginfo_strtok, 0, 0, 1)
ZEND_ARG_INFO(0, str)
ZEND_ARG_INFO(0, token)
ZEND_END_ARG_INFO()
@@ -2463,7 +2463,7 @@ ZEND_BEGIN_ARG_INFO_EX(arginfo_str_split, 0, 0, 1)
ZEND_ARG_INFO(0, split_length)
ZEND_END_ARG_INFO()
ZEND_BEGIN_ARG_INFO_EX(arginfo_strpbrk, 0, 0, 1)
ZEND_BEGIN_ARG_INFO_EX(arginfo_strpbrk, 0, 0, 2)
ZEND_ARG_INFO(0, haystack)
ZEND_ARG_INFO(0, char_list)
ZEND_END_ARG_INFO()
Loaded 100 of 136 files, more files were not shown because too many files have changed in this diff. Show more