Compare commits

..
512 Commits
Author SHA1 Message Date
Anatol Belski 3d5d1e569e Set versions 2018-04-24 11:40:32 +02:00
Anatol Belski 31c3646757 [ci skip] Update NEWS 2018-04-24 11:21:03 +02:00
Anatol Belski 3070883bcf Merge branch 'PHP-5.6' into PHP-7.0
* PHP-5.6:
  Fix test portability
2018-04-24 10:48:22 +02:00
Anatol Belski 4371af3e19 Fix test portability 2018-04-24 10:47:32 +02:00
Stanislav Malyshev 5a18d7a0df Merge branch 'PHP-5.6' into PHP-7.0
* PHP-5.6:
  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
2018-04-23 21:59:57 -07:00
Stanislav Malyshev ee76a5ae5a Fix tsrm_ls 2018-04-23 16:48:27 -07:00
Stanislav Malyshev 58b0003975 Merge remote-tracking branch 'security/bug76249' into PHP-5.6
* security/bug76249:
  Fix test
  Fix bug #76249 - fail on invalid sequences
2018-04-23 13:44:19 -07:00
Stanislav Malyshev a4c55eefd0 Merge remote-tracking branch 'security/bug76248' into PHP-5.6
* security/bug76248:
  Fix bug #76248 - Malicious LDAP-Server Response causes Crash
2018-04-23 13:44:12 -07:00
Stanislav Malyshev 6e64aba47f Fix #76129 - remove more potential unfiltered outputs for phar 2018-04-23 13:43:43 -07:00
Stanislav Malyshev e2dcf3cc54 Merge remote-tracking branch 'security/PHP-5.6' into PHP-5.6
* security/PHP-5.6:
  Fix #76130: Heap Buffer Overflow (READ: 1786) in exif_iif_add_value
  Fix bug #75981: prevent reading beyond buffer start
2018-04-23 13:42:51 -07:00
Stanislav Malyshev 8dca5ae5ec Fix test 2018-04-22 22:19:51 -07:00
Stanislav Malyshev 49782c5499 Fix bug #76248 - Malicious LDAP-Server Response causes Crash 2018-04-22 22:01:35 -07:00
Stanislav Malyshev 06d309fd7a Fix bug #76249 - fail on invalid sequences 2018-04-22 21:26:39 -07:00
Christoph M. Becker b4e4788c44 Fix #76130: Heap Buffer Overflow (READ: 1786) in exif_iif_add_value
The MakerNote is not necessarily null-terminated, so we must not use
`strlen()` to avoid OOB reads.  Instead `php_strnlen()` is the proper
way to handle this.
2018-04-22 20:15:02 -07: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 1e4273d881 [ci skip] Fix release date 2018-03-27 16:02:19 +02:00
Anatol Belski 48f835efbf 7.0.30 next 2018-03-27 15:00:54 +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
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
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
Anatol Belski c61b56ed00 7.0.29 next 2018-02-27 11:48:49 +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 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
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
Stanislav Malyshev 36239fee36 Fix bug #75981: prevent reading beyond buffer start 2018-02-20 15:44:00 -08:00
Sara Golemon e88e83d3e5 Use Z_EXPECTED_LONG to initialize FAST_ZPP parsing loop 2018-01-23 09:24:10 -05:00
Remi Collet 27347613fe Merge branch 'PHP-5.6' into PHP-7.0
* PHP-5.6:
  2018
2018-01-03 15:12:56 +01:00
Remi Collet 67ec3ce1ec 2018 2018-01-03 15:12:39 +01:00
Remi Collet 1aa8e42036 2018 2018-01-03 15:04:48 +01:00
Ferenc Kovacs 4888495178 Merge branch 'PHP-5.6' into PHP-7.0 2018-01-03 00:33:20 +01:00
Ferenc Kovacs 028507f1f6 php 5.6.34 is next 2018-01-03 00:30:58 +01:00
Anatol Belski 5d8e298ebf [ci skip] update NEWS 2018-01-02 07:49:09 +01:00
Stanislav Malyshev 459ab2eef4 Merge branch 'PHP-5.6' into PHP-7.0
* PHP-5.6:
  Update NEWS
  Fixed bug #75571: Potential infinite loop in gdImageCreateFromGifCtx
  Fix bug #74782: remove file name from output to avoid XSS
2018-01-01 20:28:01 -08:00
Stanislav Malyshev 2881199c80 Update NEWS 2018-01-01 19:53:00 -08:00
Christoph M. Becker 8d6e958867 Fixed bug #75571: Potential infinite loop in gdImageCreateFromGifCtx
Due to a signedness confusion in `GetCode_` a corrupt GIF file can
trigger an infinite loop.  Furthermore we make sure that a GIF without
any palette entries is treated as invalid *after* open palette entries
have been removed.
2018-01-01 19:51:26 -08:00
Stanislav Malyshev 73ca9b3773 Fix bug #74782: remove file name from output to avoid XSS 2018-01-01 19:51:02 -08:00
Anatol Belski e19c71e3d5 [ci skip] update NEWS 2017-12-22 18:22:33 +01:00
Dmitry Stogov da61c7a2a4 Fixed bug #75579 (Interned strings buffer overflow may cause crash)
(cherry picked from commit 37bf8bdc14)
2017-12-22 18:22:08 +01:00
Anatol Belski 484c11a541 7.0.28 is next 2017-12-05 08:51:30 +01:00
Anatol Belski dab205cb9a [ci skip] update NEWS 2017-12-05 08:41:24 +01:00
Anatol Belski 0eb262eacb Use dtor unconditionally in error case 2017-12-04 14:15:42 +01:00
Xinchen Hui d4dee4a614 Fixed bug #75573 (Segmentation fault in 7.1.12 and 7.0.26)
(cherry picked from commit 3b9ba7b6bd)
2017-12-04 11:50:44 +01:00
Andy Postnikov d6d4f2a9b3 Fix ZEND_SIGNED_MULTIPLY_LONG for AArch64
Register operands are required in this context.

This is a backport of 8c8679207a
to PHP 7.0+. The current code caused incorrect behavior on AArch64
when compiling with clang.
2017-12-02 18:10:17 +01:00
Anatol Belski 958fdc997c Consider Xdebug for tmi ini generation, too 2017-12-01 16:01:34 +01:00
Dmitry Stogov 24d5adbd5a Set trailing zero 2017-12-01 17:00:11 +03:00
Lior Kaplan 32e3d7b99e Define floorf if system doesn't have it (follow up for 22c48761)
floorf is checked in config.m4
2017-11-29 16:46:47 +01:00
Remi Collet 26656684ea NEWS 2017-11-28 17:59:16 +01:00
Remi Collet 8e5b9532da Fixed bug #64938 libxml_disable_entity_loader setting is shared between requests (FPM) 2017-11-28 17:58:28 +01:00
Sebastian Ramadan 7e0feb8856 Check for binary_location allocation failure 2017-11-22 04:49:04 +00:00
Scott 269d160159 Fix bug #75409 2017-11-22 04:26:54 +00:00
Anatol Belski 38be3c4ac4 [ci skip] update NEWS 2017-11-21 22:22:21 +01:00
Nester 8fdef981ef Fixed #75539 and #74183 - preg_last_error not returning error code after error 2017-11-21 20:10:18 +01:00
Remi Collet 702ef27364 Better fix bug #75540 Segfault with libzip 1.3.1
- only 1.3.1 is affected
- fix use after free
2017-11-20 09:42:20 +01:00
Remi Collet 8832c46607 NEWS 2017-11-20 08:50:33 +01:00
Remi Collet de47d4792f fix bug #75540 Segfault with libzip 1.3.1 2017-11-20 08:49:46 +01:00
Nikita Popov 0e097f2c96 Fixed bug #75535
The sizeof()s for Content-Length and Transfer-Encoding were missing
the trailing ":". Apart from being generally wrong, this no longer
verified that the header actually contains a colon, leading to the
null http_header_value being used.

Additionally, in the interest of being defensive, also make sure
that http_header_value is non-null by setting it to the end of
the header line (effectively an empty string) if there is no colon.
If the following conditions are correct, this value is not going
to be used though.
2017-11-17 23:18:05 +01:00
Anatol Belski 1ed08f9877 Update SDK version for AppVeyor 2017-11-17 16:37:00 +01:00
Sammy Kaye Powers a5206bc690 Update NEWS 2017-11-14 20:00:45 +01:00
Sammy Kaye Powers 3bc5c9f118 Fix bug 60471 by correctly identifying unused speculative preconnections
* Correctly identify unused speculative preconnections from browsers
  like Chrome and Firefox
* Add a new message to the debug level that is emitted when a TCP
  connection is closed without sending any request (a preconnection)
* Fix an issue where the existing debug messages were not being
  displayed even when debug mode was enabled
2017-11-14 20:00:45 +01:00
Anatol Belski df615f47bd [ci skip] update NEWS 2017-11-10 11:40:16 +01:00
Anatol Belski c6720e2f45 Fixed #75384 PHP seems incompatible with OneDrive files on demand 2017-11-08 11:52:42 +01:00
Derick Rethans ca0bcf535c Fixed ext/date tests due to changes in Olson database 2017-11-07 11:25:28 +00:00
Anatol Belski bc7d4dc523 7.0.27 next 2017-11-07 10:07:52 +01:00
Anatol Belski c3be49e07d Update libs_version.txt 2017-11-02 22:41:12 +01:00
Nikita Popov d88ef8d7e1 Fix ext/soap/tests/bug69137.phpt
Switch to example.org. Also mark it as an online test.
2017-11-02 20:56:03 +01:00
Anatol Belski dbfa0140ae Sync and fix tests for ICU 60.1 compat 2017-11-02 12:37:04 +01:00
Anatol Belski f5358c0e23 Yet one /nologo 2017-11-02 09:21:22 +01:00
Anatol Belski 8a3e2a6b14 Fix year 2017-10-31 10:25:15 +01:00
Anatol Belski 164167f3da Add /nologo 2017-10-31 10:24:34 +01:00
Anatol Belski 68c500421c Add missing ICU version check 2017-10-30 18:15:26 +01:00
Jakub Zelenka fc169d2133 Prevent leaking x509 and csr resources if it is not requested
All functions using php_openssl_x509_from_zval or php_openssl_csr_from_zval
with makeresource equal to 0 do not deref the resource which means there
is a leak till the end of the request. This can cause issues for long
running apps. It is a generic solution for bug #75363 which also covers
other functions.
2017-10-30 16:40:56 +00:00
Jakub Zelenka d8ccffa79a Extend and speed up pkey export tests 2017-10-30 16:40:56 +00:00
Jakub Zelenka e78e839e53 Rewrite openssl_csr_get_subject test to improve coverage 2017-10-30 16:40:56 +00:00
Jakub Zelenka 528aa540b4 Add openssl_csr_get_public_key test 2017-10-30 16:40:56 +00:00
Jakub Zelenka 548798818b Extend openssl_pkcs7_* tests to cover resource cert 2017-10-30 16:40:56 +00:00
Jakub Zelenka 55d92413b9 Fix cleaning tmp output file in openssl_csr_export_to_file test 2017-10-30 16:40:56 +00:00
Jelle van der Waa 5812f7a8d3 openssl: add basic openssl_csr_export_to_file tests
Add a basic test for openssl_csr_export_to_file.
2017-10-30 16:40:56 +00:00
Jakub Zelenka 628a52d365 Extend openssl_csr_sign test to cover cert resource 2017-10-30 16:40:56 +00:00
Jakub Zelenka 80191eebec Set different invalid path in openssl_pkcs12_export so it is more unlikely to exist 2017-10-30 16:40:55 +00:00
Jakub Zelenka cd66aad141 Extend openssl_x509_parse to cover cert resource 2017-10-30 16:40:55 +00:00
Jakub Zelenka c1d98588a2 Rename and test resource cert in openssl_x509_checkpurpose test 2017-10-30 16:40:55 +00:00
Jakub Zelenka d23d4fd61b Extend openssl_x509_check_private_key to test resource cert 2017-10-30 16:40:55 +00:00
Jakub Zelenka be0758b75a Extend openssl_x509_fingerprint test to cover resource cert with sha1 2017-10-30 16:40:55 +00:00
Joe Watkins cfa885830a Merge branch 'PHP-7.0' of git.php.net:/php-src into PHP-7.0
* 'PHP-7.0' of git.php.net:/php-src:
  Yet one attempt to mitigate the unzip error on AppVeyor
  Ensure SDK is checked out before asking for version
  Fix fetching the SDK version
  Fix SDK version comparison and add more verbosity
  Don't use the cache dependency, SDK version is handled in script
  Remove status check on the SDK repo and add version check
  Catch with the latest AppVeyor unzip errors
2017-10-30 14:16:16 +00:00
Fabien Villepinte a308000ff2 Fix bug #75464 Wrong reflection on SoapClient::__setSoapHeaders 2017-10-30 14:13:05 +00:00
Anatol Belski 7ea44da104 Yet one attempt to mitigate the unzip error on AppVeyor 2017-10-30 12:16:53 +01:00
Anatol Belski e305e8fb7a Ensure SDK is checked out before asking for version 2017-10-30 12:07:27 +01:00
Anatol Belski 7bf2947016 Fix fetching the SDK version 2017-10-30 11:28:32 +01:00
Anatol Belski c6e8c2bc9f Fix SDK version comparison and add more verbosity 2017-10-30 10:53:12 +01:00
Anatol Belski 591e811a35 Don't use the cache dependency, SDK version is handled in script 2017-10-30 10:34:11 +01:00
Anatol Belski bc410c2609 Remove status check on the SDK repo and add version check
If Appveyor fails to unzip, .git would be in an arbitrary state anyway.
Thus this check doesn't help. For the version check - rely on the branch
naming scheme in the SDK.
2017-10-30 10:14:05 +01:00
Anatol Belski 741efa7807 Catch with the latest AppVeyor unzip errors 2017-10-30 08:42:59 +01:00
Fabien Villepinte e6aea3dc78 Fix bug #75453 Incorrect reflection on ibase_connect and ibase_pconnect 2017-10-30 06:55:00 +00:00
Anatol Belski 123b1d79eb Re-enable AppVeyor cache 2017-10-29 10:08:31 +01:00
Joe Watkins 59d413ceb8 make sure run-tests reports exit status upon prerequisite error 2017-10-29 04:37:21 +00:00
Fabien Villepinte 938f256ed9 Fix bug #75434 Wrong reflection for mysqli_fetch_all function 2017-10-28 12:57:25 +02:00
Fabien Villepinte 51ea2cfbe1 Fix bug #75307 Wrong reflection for openssl_open function 2017-10-27 16:06:01 +01:00
Anatol Belski 15a71fe045 Skip test on PostgreSQL 10
The 42P18 error is not produced by the server anymore.
2017-10-27 16:19:42 +02:00
Anatol Belski 24b1bb0abd Fix test compat for PostgreSQL 10 2017-10-27 14:58:43 +02:00
Anatol Belski 10dc1950f7 Apply upstream patch for CVE-2017-14107 2017-10-27 13:20:15 +02:00
Anatol Belski f0a42d9fe4 Merge branch 'PHP-5.6' into PHP-7.0
* PHP-5.6:
  Backport and apply upstream patch for CVE-2017-14107
2017-10-27 13:18:41 +02:00
Anatol Belski f6e8ce8121 Backport and apply upstream patch for CVE-2017-14107 2017-10-27 13:16:56 +02:00
Anatol Belski 9eb6f86765 Binary SDK 2.0.12 stable 2017-10-26 21:25:08 +02:00
Dmitry Stogov 98eee90734 Fixed indirect modification of magic ArrayAccess method arguments 2017-10-26 16:03:42 +03:00
Dmitry Stogov 502cfddf28 Backport tests 2017-10-26 14:12:08 +03:00
Dmitry Stogov bc59289b7a Fixed indirect modification of magic method arguments. 2017-10-26 13:05:23 +03:00
Xinchen Hui eaeccc1d99 Fixed test 2017-10-26 10:23:43 +08:00
Xinchen Hui d2047503cb Fixed bug #75420 (Crash when modifing property name in __isset for BP_VAR_IS) 2017-10-26 10:07:08 +08:00
Fabien Villepinte 578ba71b3b Fix typo in comments 2017-10-25 20:59:40 +01:00
Fabien Villepinte e763a1cdc7 Fix the SKIPIF part in /ext/gd/tests/bug75437.phpt 2017-10-25 14:39:38 +02:00
Fabien Villepinte 0fbb9f343f Fix bug #75437 Wrong reflection on imagewebp 2017-10-25 12:54:05 +02:00
Ferenc Kovacs 9fbf13a496 Merge branch 'PHP-5.6' into PHP-7.0 2017-10-25 03:39:34 +02:00
Ferenc Kovacs f600785f65 5.6.33 is next 2017-10-25 03:36:30 +02:00
Ferenc Kovacs b53fb886a4 use trusty explicitly 2017-10-25 03:14:51 +02:00
Ferenc Kovacs 6125ce9d33 Merge branch 'PHP-5.6' into PHP-7.0 2017-10-25 03:13:40 +02:00
Rasmus Lerdorf ad7ed6fe21 These tests all assume that IPV6 is available. 2017-10-25 02:21:16 +02:00
Ferenc Kovacs 787e3a1ee4 fix the travis build for PHP-5.6 using precise instead of trusty 2017-10-25 01:51:48 +02:00
Ferenc Kovacs 9839d3a953 fix the travis build for PHP-5.6 using precise instead of trusty 2017-10-25 01:47:50 +02:00
Anatol Belski e19bf29b53 Merge branch 'PHP-5.6' into PHP-7.0
* PHP-5.6:
  Parametrize the expected value to avoid platform false positives
2017-10-24 18:36:56 +02:00
Anatol Belski 45ac5edbd9 Parametrize the expected value to avoid platform false positives 2017-10-24 18:33:21 +02:00
Sara Golemon 68e27b0763 Decref default_link when clearing 2017-10-24 11:37:59 -04:00
Christoph M. Becker 22c487616f Fixed bug #65148 (imagerotate may alter image dimensions)
We apply the respective patches from external libgd, work around the
still missing `gdImageClone()`, and fix the special cased rotation
routines according to Pierre's patch
(https://gist.github.com/pierrejoye/59d72385ed1888cf8894a7ed437235ae).

We also cater to bug73272.phpt whose result obviously changes a bit.
2017-10-24 17:02:56 +02:00
Derick Rethans 8e3260376c Update timezonemap.h, which needs to match the bundled TZ db 2017-10-24 14:55:13 +01:00
Anatol Belski 75d0ba5179 [ci skip] update NEWS 2017-10-24 14:18:59 +02:00
Anatol Belski fadcfc8149 Merge branch 'PHP-5.6' into PHP-7.0
* PHP-5.6:
  [ci skip] update NEWS
2017-10-24 14:17:21 +02:00
Anatol Belski 7d06a5c89f [ci skip] update NEWS 2017-10-24 14:16:54 +02:00
Anatol Belski 968c8fc0d5 Merge branch 'PHP-5.6' into PHP-7.0
* PHP-5.6:
  Fixed bug #72535 arcfour encryption stream filter crashes php
2017-10-24 14:04:08 +02:00
Anatol Belski 37acebcc8c Fixed bug #72535 arcfour encryption stream filter crashes php 2017-10-24 13:59:18 +02:00
Anatol Belski 5efbcd1882 Merge branch 'PHP-5.6' into PHP-7.0
* PHP-5.6:
  Fixed bug #75055 Out-Of-Bounds Read in timelib_meridian()
  Apply upstream patch for CVE-2016-1283
2017-10-24 13:38:48 +02:00
Anatol Belski a7815e63bd Fixed bug #75055 Out-Of-Bounds Read in timelib_meridian() 2017-10-24 11:28:17 +02:00
Anatol Belski d37658be6c Apply upstream patch for CVE-2016-1283
Fix bug #75207, see also
https://bugzilla.redhat.com/show_bug.cgi?id=1295385
https://vcs.pcre.org/pcre?view=revision&revision=1636

(cherry picked from commit d11fceab15)
2017-10-24 11:10:11 +02:00
Sara Golemon 9fca585488 NEWS entry for pg_close() fix 2017-10-23 14:55:32 -04:00
Sara Golemon a645af4456 Bugfix#75419 Fix clearing of default link during pg_close() 2017-10-23 14:44:00 -04:00
Derick Rethans b2dfcb30eb Updated to version 2017.3 (2017c) 2017-10-23 17:31:20 +01:00
Anatol Belski 1cb2079d6c Fix memory leak 2017-10-23 15:26:08 +02:00
Anatol Belski 9f00e26008 Renaming cache folder is not a solution, too. Disable cache for now. 2017-10-23 07:13:00 +02:00
Anatol Belski c9a14b3aee Revert "Rename build cache folder and separate sdk"
This reverts commit 58dd892156.
2017-10-23 07:12:33 +02:00
Anatol Belski 58dd892156 Rename build cache folder and separate sdk 2017-10-23 07:08:45 +02:00
Anatol Belski eead6bf97a Revert "Invalidate the whole cache when .appveyor.yml was changed"
This reverts commit 25d40602cb.
2017-10-23 07:05:48 +02:00
Anatol Belski 25d40602cb Invalidate the whole cache when .appveyor.yml was changed 2017-10-23 07:00:36 +02:00
Jakub Zelenka 34ed75fab7 Fix clean up for openssl_pkcs12_export_to_file_basic 2017-10-22 18:54:15 +01:00
Jelle van der Waa 314bef5d03 openssl: Fix openssl_pkcs12_export extracerts test
Fix the openssl_pkcs12_export testcase for extracerts, the 'extracerts'
option needs to be the key of the certificate value otherwise
openssl_pkcs12_export will ignore it.
2017-10-22 18:53:30 +01:00
Anatol Belski 1d781fbdb1 With ICU 58+, set the default restriction level to high
Further experiments show, that CJK scripts should be ok. If there are
any issues, the moderate level can still be set later.
2017-10-21 17:21:41 +02:00
Anatol Belski 44b3bc847b Reenable AppVeyor cache 2017-10-21 11:59:22 +02:00
Anatol Belski 0b71ae7a15 Disable AppVeyor cache to unlock build 2017-10-21 10:49:20 +02:00
Anatol Belski 5d85d967bd Rework these new tests to match with diffs in ICU 58, 59 and upcoming 60 2017-10-21 10:29:04 +02:00
Anatol Belski ede8cee9e6 [ci skip] Update NEWS 2017-10-20 20:46:42 +02:00
Anatol Belski f95063647c Fixed bug #73655 Spoofchecker::isSuspicious behavior change due to upstream changes
There are significant changes in the spoof checking reflecting
http://www.unicode.org/reports/tr39/tr39-15.html and relying on the
restriction levels. ICU 58+ removes WSC and MSC handling and otherwise
undergoes big changes in both code and data areas. Keep up with the
basic points for now, as we need to move forward and provide an
acceptable experience to PHP users linking to a newer ICU. The most
distros ATM don't provide ICU > 57.1, though. We'll need for sure to
keep up with the BC breach in ICU 58+ in possible further aspects.
2017-10-20 19:23:32 +02:00
Anatol Belski 2198d38cbc Add test for newer ICU version 2017-10-20 19:02:42 +02:00
Anatol Belski e02c41fc72 Further test fixes for ICU >= 58 2017-10-20 18:39:46 +02:00
Anatol Belski 7240d99838 Fix version checks in tests 2017-10-20 15:23:09 +02:00
Anatol Belski 877e0b04bc Sync some tests for compat with ICU 58.1+ 2017-10-20 13:55:32 +02:00
Anatol Belski 9071ff5c87 Add skip for incompatible ICU version 2017-10-20 11:27:54 +02:00
Nester 80c3b078b8 Fixed #75317 - UConverter::setDestinationEncoding changes source instead of destinatination 2017-10-19 12:02:22 +01:00
Peter Kokot aa143515d6 Update .editorconfig with some more configs
Added support for .awk, .w32, .bat, .mk, .frag, .m4, .sh, .php, .phpt,
and Markdown files based on the current most used coding style in the
php-src repository.
2017-10-19 11:53:37 +01:00
Ryan Volz 4e85dd0346 Escape newline on curl config.m4 2017-10-19 11:39:54 +01:00
Anatol Belski 5f7707cc8a Move to php-sdk-2.0.0beta3 for Appveyor
Supposed to fix sporadic tool crashes on the test image
2017-10-18 17:45:33 +02:00
Anatol Belski d82805f097 Backport 7ff13badda into 7.0+ 2017-10-18 16:02:56 +02:00
Anatol Belski 9891f11f84 One more folder to delete in AppVeyor image 2017-10-17 15:32:47 +02:00
Tianfang Yang f955cff54c Fixed valgrind issue 2017-10-16 19:20:24 -04:00
Tianfang Yang aad4544e95 Fixed valgrind issue 2017-10-16 19:16:30 -04:00
Anatol Belski 7778106f40 Move to next binary SDK version for AppVeyor 2017-10-16 18:05:56 +02:00
Dmitry Stogov 8bfe748fb0 Prevent crash on ext/pdo_mysql/tests/bug_39858.phpt when built with libmysql 2017-10-16 19:00:12 +03:00
Jakub Zelenka 999fe36d40 Properly fix #75363 and address some other leaks with cert 2017-10-15 20:25:58 +01:00
Jelle van der Waa 5acb8381b2 Fixed bug #53070 (enchant_broker_get_path crashes if no path is set)
enchant_broker_get_dict_path segfaults when the dict path is not setup,
instead of segfaulting return false instead.
2017-10-15 13:57:44 +02:00
Christoph M. Becker fb09021432 Fixed bug #75365 (Enchant still reports version 1.1.0)
Since Enchant is bundled, we make `PHP_ENCHANT_VERSION` an alias of
`PHP_VERSION` and also drop the rather meaningless revision hash from
the PHP info.
2017-10-15 13:19:17 +02:00
Xinchen Hui 816758eda2 Fixed bug #75287 (Builtin webserver crash after chdir in a shutdown function) 2017-10-15 10:28:28 +08:00
Dmitry Stogov 397f5cb687 Fixed bug #75368 (mmap/munmap trashing on unlucky allocations) 2017-10-13 13:56:06 +03:00
Bob Weinand a55af1e271 Fixed bug #75363 (openssl_x509_parse leaks memory) 2017-10-12 12:30:20 +02:00
Anatol Belski 23e97b0222 It looks like i should've taken joint response on ext/fileinfo long ago 2017-10-11 22:21:34 +02:00
Anatol Belski d432bdb4ab Put php-sdk-2.0.12beta1 for AppVeyor
Quite some tool upgrades there, especially re2c 1.0.2
2017-10-11 20:27:27 +02:00
Christoph M. Becker 787bf7eaf7 Merge branch 'pull-request/2798' into PHP-7.0
* pull-request/2798:
  Fix Bug #75299 Wrong reflection on inflate_init and inflate_add
2017-10-11 17:28:30 +02:00
Christoph M. Becker b497b6edf9 Merge branch 'pull-request/2799' into PHP-7.0
* pull-request/2799:
  Use PHP_VERSION for exif
2017-10-11 14:42:46 +02:00
Christoph M. Becker c8eccf8451 [ci skip] Add NEWS entry for bug #75349 2017-10-10 13:54:52 +02:00
Anatol Belski d1fc9b425f Fix re2c version detection 2017-10-10 10:52:52 +02:00
Anatol Belski 51658bac35 Move dev to 7.0.26 2017-10-10 08:26:04 +02:00
Anatol Belski f48abfa902 Fix array access on undeclared properties in DateInterval 2017-10-09 15:35:38 +02:00
Sara Golemon 843e492c68 Bugfix #74556 stream_socket_get_name() returns null bytes on MacOS 2017-10-07 10:08:34 -04:00
Christoph M. Becker ec3d864784 Fixed bug #75318 (The parameter of UConverter::getAliases() is not optional)
Of course, reflection has to know that as well.
2017-10-06 16:45:07 +02:00
Mathieu CARBONNEAUX 6b9ccda936 Fixed bug #75311 2017-10-05 12:24:57 +02:00
Peter Kokot 74124de048 Use PHP_VERSION for exif 2017-10-04 23:25:36 +02:00
Dmitry Stogov 1195de87ff Bumped ext/oci8 version 2017-10-04 09:56:25 +03:00
Dmitry Stogov ee50fcfa27 Merge branch 'oci8_fix' into PHP-7.0
* oci8_fix:
  Use dereferenced value
  Fixed compilation errors
  Restored code for BOOL variables
  Fixed few ext/oci8 bugs
2017-10-04 09:49:40 +03:00
Dmitry Stogov 24e595bf26 Use dereferenced value 2017-10-03 10:49:56 +03:00
Viktor Szépe e995b7e475 Typo in status.html
feet needs -> fit needs
2017-10-03 07:21:53 +01:00
Peter Kokot 6d1dd8b0af Fix bug #74905 2017-10-03 07:18:38 +01:00
Peter Kokot 7b248a1b32 Remove ident gitattribute for ext/zip/php_zip.c 2017-10-03 07:14:50 +01:00
Dmitry Stogov 4d69587035 Fixed compilation errors 2017-10-03 09:08:28 +03:00
Dmitry Stogov c8dea7ae1e Restored code for BOOL variables 2017-10-02 17:04:26 +03:00
Fabien Villepinte 9d9873b3b5 Fix Bug #75299 Wrong reflection on inflate_init and inflate_add 2017-10-01 11:27:16 +02:00
Andrea Faulds abefb6dfe7 Fix bug #75290 2017-09-29 21:38:08 +01:00
Anatol Belski d11fceab15 Apply upstream patch for CVE-2016-1283
Fix bug #75207, see also
https://bugzilla.redhat.com/show_bug.cgi?id=1295385
https://vcs.pcre.org/pcre?view=revision&revision=1636
2017-09-28 15:40:49 +02:00
Peter Kokot 29e673f8ed Fix CGI m4 config message when CGI is disabled 2017-09-27 06:20:09 +01:00
Peter Kokot 6d0391b1a4 Fix bug #75248 and #75251 2017-09-27 06:15:12 +01:00
Nester a680d701ce Fixed #75220 - Segfault when calling is_callable on parent 2017-09-27 06:07:24 +01:00
Peter Kokot 3752d18ffe Remove some old sapi/apache_hooks and sapi/apache leftovers 2017-09-25 21:56:39 +02:00
Xinchen Hui b05ff14a9a Fixed bug #75241 (Null pointer dereference in zend_mm_alloc_small()). 2017-09-24 17:24:11 +08:00
Xinchen Hui db63367871 Compiler warning 2017-09-24 17:19:05 +08:00
Nikita Popov 73d6456d7d Fixed bug #75252 2017-09-24 08:53:27 +02:00
Anatol Belski da2f581833 Fix thread safety 2017-09-21 10:32:09 +02:00
Andrea Faulds 418f97443a Fix bug #75236 2017-09-21 00:02:52 +01:00
Dmitry Stogov 9a01fe712a Fixed few ext/oci8 bugs 2017-09-20 16:46:04 +03:00
Christoph M. Becker eedc060c92 Fixed bug #73629 (SplDoublyLinkedList::setIteratorMode masks intern flags)
We must not overwrite the SPL_DLLIST_IT_FIX flag when changing the
iterator mode.
2017-09-20 15:46:04 +02:00
Anatol Belski 9641586efa Fix the version check causing the test fail 2017-09-18 12:04:31 +02:00
Anatol Belski 7670590efd Update lib_versions.txt 2017-09-18 09:34:58 +02:00
Anatol Belski 7910c1dee9 Move to next binary SDK version for AppVeyor 2017-09-15 23:04:15 +02:00
Dmitry Stogov d7a10f0e32 Properly update string type flags 2017-09-13 01:45:57 +03:00
Dmitry Stogov 83d8ebc991 Revert "Properly update string type flags"
This reverts commit 99b1a62d55.
2017-09-13 00:14:39 +03:00
Dmitry Stogov 2874fa8fb0 Fixed test 2017-09-12 23:47:22 +03:00
Dmitry Stogov 99b1a62d55 Properly update string type flags 2017-09-12 23:42:51 +03:00
Anatol Belski 7674b5e574 Fix test failure on 32-bit 2017-09-12 18:17:28 +02:00
Remi Collet 35deb4c88b drop symbol definition, and not defined anywhere 2017-09-12 13:03:18 +02:00
Anatol Belski 3d1cb7e32c [ci skip] update NEWS 2017-09-12 12:17:12 +02:00
Remi Collet b09497c0e2 Fixed bug #75193 segfault in collator_convert_object_to_string 2017-09-12 12:12:06 +02:00
Anatol Belski 5cf215536b Move dev to 7.0.25 2017-09-12 09:02:01 +02:00
Anatol Belski 194547f591 [ci skip] Fix news entry format 2017-09-12 08:35:10 +02:00
jhdxr 3e11b7fc21 fix bug #75173 incorrect behavior of AppendIterator::append in foreach loop 2017-09-12 07:05:58 +01:00
Christoph M. Becker 9aa6898b9b Fixed bug #46781 (BC math handles minus zero incorrectly)
Actually, there is no negative zero at all.  We obey Postel's law, and
still accept negative zeroes, but we store them as positive zeroes
after the conversion from string, i.e. we normalize before further
processing.
2017-09-11 23:44:23 +02:00
Anatol Belski d103802003 Fork test to keep up with libxsl >= 1.1.30
The behavior of date parsing has changed and is reflected in the
changelog. Invalid dates are not accepted, in particular dates with a
negative year, as in this test.
2017-09-11 18:14:51 +02:00
Anatol Belski 04a6bbae6c Add symbol to libxml exports 2017-09-11 17:35:25 +02:00
Anatol Belski cab41ecb93 Fix test compat with libxml2 2.9.5
One warning disappeared, but the flow is still valid.
2017-09-11 16:12:04 +02:00
Anatol Belski 3549d9184a Fix test compat with libxml2 2.9.5
From 2.9.5 on libxml explcitly initializes the keepBlanks flag.
2017-09-11 14:32:54 +02:00
Anatol Belski 5f9ae45e22 Fix test compatibility with libxml2 2.9.5 2017-09-11 12:12:19 +02:00
Christoph M. Becker 4b746fce1c Fixed bug #73730 (textdomain(null) throws in strict mode)
The $text_domain parameter may be NULL, which we have to cater to
explicitly with regard to strict_types.
2017-09-10 18:39:29 +02:00
Christoph M. Becker 3fd08a1595 Fix bug75178.phpt on Windows
bug75178.phpt fails on Windows, because the stderr output is not
interspersed with stdout output there, but rather is appended to the
end. The fix is analogous to bug72093.phpt.
2017-09-09 16:46:32 +02:00
Christoph M. Becker 44eec946e8 Fixed bug #75178 (bcpowmod() misbehaves for non-integer base or modulus)
Since `bcpowmod()` does not support non-integral operands, we have to
truncate these in addition to emitting a respective warning. We also
have to work with the truncated values in the following.

We recognize that the division by one to enforce the truncation is
actually overkill, but we stick with it for now, and shall tackle the
issue for PHP 7.3.
2017-09-09 13:18:26 +02:00
Sara Golemon 0413feb29c Add BC define for users of the typoed zend_symbtable_add_new 2017-09-07 17:35:54 -04:00
Sara Golemon f18cf46d07 Fix typo in zend_symtable_add_new() API name 2017-09-07 16:25:25 -04:00
Christoph M. Becker b2919853f8 Fixed bug #54598 (bcpowmod() may return 1 if modulus is 1)
`x mod 1` is always zero; we have to take the scale into account,
though.
2017-09-07 00:30:05 +02:00
Christoph M. Becker dea41f3c3a Fixed bug #44995 (bcpowmod() fails if scale != 0)
`bc_divmod()` is supposed to do integer division, so we must not apply
a scale factor here.
2017-09-06 23:30:53 +02:00
Nikita Popov 42549b7844 Add missing null termination 2017-09-05 18:13:50 +02:00
Bouke van der Bijl cd9d90f4d4 Fixed bug #70470 2017-09-05 16:23:32 +02:00
Anatol Belski 24da62d342 Fix command 2017-09-02 16:56:52 +02:00
Christoph M. Becker e20a6b0213 Fixed bug #75139 (libgd/gd_interpolation.c:1786: suspicious if ?)
We back-port https://github.com/libgd/libgd/commit/dd48286 even though
we cannot come up with a regression test, because the erroneous
condition appears to be impossible to trigger.

We also parenthesize the inner ternary operation to avoid confusion.
2017-09-02 00:04:02 +02:00
Anatol Belski a86df6bcb0 Make for exclusion per regex 2017-08-31 23:56:42 +02:00
Anatol Belski 6ec494016b Extend ignore list for DLLs to not to look after
fix typo
2017-08-31 20:54:11 +02:00
Dylan K. Taylor 2e77f5eed3 Fix nmake install fails when there are no shared extensions
check for existence instead of muting everything

check for exe existence before trying to copy
2017-08-31 20:32:36 +02:00
Dylan K. Taylor 4e9c3e9396 Copy dependencies of the core DLL in nmake snap for statically-compiled extensions when packaging builds 2017-08-31 19:46:47 +02:00
Remi Collet 3239f6d679 move AC_DEFINE in the right position (in bundled lib conditon) 2017-08-31 07:55:45 +02:00
Anatol Belski 0966f9de41 Move to next bin SDK version for AppVeyor 2017-08-28 13:12:51 +02:00
Christoph M. Becker 499f5480f1 Fixed bug #75124 (gdImageGrayScale() may produce colors)
We have to make sure to avoid alpha-blending issues by explicitly
switching to `gdEffectReplace` and to restore the old value afterwards.

This is a port of <https://github.com/libgd/libgd/commit/a7a7ece>.
2017-08-27 13:53:39 +02:00
Thomas Punt be9edd83c2 Fixed bug #75090 2017-08-25 22:02:19 +02:00
Anatol Belski 55db2c31cd update libs versions 2017-08-25 11:28:12 +02:00
Remi Collet b7e96f8e0e From documentation, only the sign of returned value is relevant
With recent glibc, memcmp sometime return a negative value instead of -1
2017-08-24 10:27:38 +02:00
Tianfang Yang 4bf1a11c07 Merge branch 'pull-request/2534' into PHP-7.0
* pull-request/2534:
  Fixed bug #74631 (PDO_PCO with PHP-FPM: OCI environment initialized before PHP-FPM sets it up)
2017-08-22 01:10:58 -04:00
Ingmar Runge 079bc324cd Fixed bug #74631 (PDO_PCO with PHP-FPM: OCI environment initialized before PHP-FPM sets it up) 2017-08-22 01:09:35 -04:00
Andrea Faulds 61538ebadc Fixed bug #75097 (gethostname fails if your host name is 64 chars long)
PHP contained two different off-by-one errors, which are fixed here. First,
it created a buffer of size HOST_NAME_MAX, not adding space for a null
terminator. Second, it subtracted 1 from the size of that buffer when passing
its size to gethostname(), despite gethostname() expecting it to be a buffer
size including space for a terminating null byte, not a string length.
2017-08-19 20:31:54 +01:00
Anatol Belski 3cad07b84f [ci skip] update NEWS 2017-08-19 02:40:17 +02:00
John Boehr 71b12940d0 Fix issues with phpt and EXTENSION on windows (BUG 75042)
* Commands are not properly escaped for windows
* Specifying "-n" to check loaded modules causes "Module already loaded"
warning
* Extensions to be loaded need the "php_" prefix on Windows

Bug: https://bugs.php.net/bug.php?id=75042

Add back -n flag to fetch loaded extensions in run-tests.php

Add test for phpt EXTENSIONS directive

Add a second test for bug 75042

Add test to test loading of nonexistent shared module

with the EXTENSIONS phpt block

Pass ini settings when checking loaded extensions

Fix skipifs
2017-08-19 01:59:48 +02:00
Anatol Belski ba59b6f11b Fix .pgd name for ts build 2017-08-19 00:31:04 +02:00
Remi Collet b28912b0f7 NEWS 2017-08-18 14:52:11 +02:00
Remi Collet a7594cb74f Fixed bug #75093 OpenSSL support not detected 2017-08-18 14:51:44 +02:00
Anatol Belski 065551bc9c Fix phpize exit status
Configure and others are generated, not copied. Seems there's yet much
more to do wrt exit status catching.
2017-08-18 11:54:56 +02:00
Anatol Belski e7f4e67155 Add dump env target 2017-08-18 11:08:27 +02:00
Derick Rethans 60a6feed07 Revert "Upgrade timelib to 2017.05beta7"
This reverts commit bdd56f3107.
2017-08-16 15:19:18 +01:00
Derick Rethans 8af70958fc Revert "Remove removed header files from configuration files."
This reverts commit 3df753c6ca.
2017-08-16 15:19:11 +01:00
Derick Rethans 5d2c303438 Fixed stupid test 2017-08-16 11:14:41 +01:00
Derick Rethans 7829f9b1d2 Added timelib version to phpinfo() 2017-08-16 09:51:21 +01:00
Remi Collet 01735f4d9f cleanup 2017-08-16 07:46:07 +02:00
Derick Rethans 3df753c6ca Remove removed header files from configuration files. 2017-08-15 20:22:41 +01:00
Derick Rethans bdd56f3107 Upgrade timelib to 2017.05beta7 2017-08-15 14:10:23 +01:00
Anatol Belski 3af6201224 move dev to 7.0.24 2017-08-15 09:33:30 +02:00
Xinchen Hui d8c80af71e Fixed bug #75075 (unpack with X* causes infinity loop) 2017-08-15 12:34:13 +08:00
Tianfang Yang 2def85688d Merge branch 'syncoci8' into PHP-7.0 2017-08-14 21:16:34 -04:00
Tianfang Yang 259477826c Prepare for PECL release 2017-08-14 21:14:14 -04:00
Anatol Belski ab07265573 Test cleanup improvements, files might be locked in the test process 2017-08-14 13:08:04 +02:00
Anatol Belski 71fd58652f fix test cleanup 2017-08-14 12:55:14 +02:00
Tianfang Yang f555224743 Sync OCI8 on PHP 7.x branches 2017-08-13 23:44:24 -04:00
Christoph M. Becker f64be0b013 Fixed bug #73793 (WDDX uses wrong decimal seperator)
The WDDX specification[1] requires to serialize floats with a decimal
point, but `snprintf()` is locale-dependent and may use a decimal
comma. We fix that afterwards by replacing an eventual comma with a
point.

[1] <http://xml.coverpages.org/wddx0090-dtd-19980928.txt>
2017-08-13 20:51:53 +02:00
Christoph M. Becker 472b25921e Skip this test if ext/session is not available 2017-08-13 18:05:45 +02:00
Nikita Popov 1a23ebc1ff Fixed bug #74103 and bug #75054
Directly fail unserialization when trying to acquire an r/R
reference to an UNDEF HT slot. Previously this left an UNDEF and
later deleted the index/key from the HT.

What actually caused the issue here is a combination of two
factors: First, the key deletion was performed using the hash API,
rather than the symtable API, such that the element was not actually
removed if it used an integral string key. Second, a subsequent
deletion operation, while collecting trailing UNDEF ranges, would
mark the element as available for reuse (leaving a corrupted HT
state with nNumOfElemnts > nNumUsed).

Fix this by failing early and dropping the deletion code.
2017-08-12 13:11:35 +02:00
Andrea Faulds b59718bdc4 Fix bug #74725 (html_errors=1 breaks unhandled exceptions) 2017-08-12 01:37:20 +01:00
Xinchen Hui b06f8cb58b Fixed bug #75049 (spl_autoload_unregister can't handle spl_autoload_functions results) 2017-08-09 11:28:53 +08:00
Anatol Belski afb20f4895 Remove mistakingly added line 2017-08-08 19:37:55 +02:00
Anatol Belski 075986f214 Sync makefile options for phpize
- run target
- debugger mode
2017-08-08 17:58:10 +02:00
Darek Slusarczyk 618dcd6520 JSON: fix config.w32 / Install headers on windows 2017-08-08 15:52:53 +02:00
Anatol Belski 4c9fe5a490 Unify EOL 2017-08-07 17:03:17 +02:00
Anatol Belski d058e30917 fix test target for phpize 2017-08-07 16:45:02 +02:00
Remi Collet 159e5c1048 use AC_DEFINE + win32 2017-08-04 13:21:28 +02:00
Anatol Belski 9689796c10 Increase expected timing on Travis
If 5ms to read/write 8 bytes still has issue, probably next this test
should skip on Travis to avoid false positive fails.
2017-08-03 15:05:22 +02:00
Anatol Belski 9ba2cfd33e update NEWS 2017-08-02 21:49:21 +02:00
Andreas Treichel c2b8066efb Bug #74975: Different serialization for classes 2017-08-02 18:49:26 +02:00
Nikita Popov 9ca1b2a775 Merge remote-tracking branch 'php-src/PHP-7.0' into PHP-7.0 2017-08-02 18:16:18 +02:00
Fabien Villepinte 2cc1cbf2f4 Fix Bug #75001: Wrong reflection on mb_eregi_replace 2017-08-02 18:08:42 +02:00
Fabien Villepinte 15abb2b56e Fix test transliterator_create_inverse_basic.phpt 2017-08-02 18:04:43 +02:00
George Wang e78712791d take care of compile warnings. 2017-08-02 11:59:41 -04:00
Derick Rethans b112d09013 Fixed bug #75002 Null Pointer Dereference in timelib_time_clone 2017-08-02 16:40:48 +02:00
Remi Collet 666cb6c802 fix build with old system libsqlite (sqlite3_errstr may be missing) 2017-08-02 14:01:56 +02:00
clwu b2934d2612 fixed #endif comments 2017-08-02 08:35:27 +01:00
Julien Pauli 0c0cbb43da Updated NEWS 2017-08-01 16:01:43 +02:00
Julien Pauli 64e6ddc7f7 Fix #75015. Crash in SPL destructors 2017-08-01 15:59:54 +02:00
Anatol Belski a8e25fdbf8 Test to cover the change in ce1a0d97 2017-08-01 12:49:45 +02:00
Christoph M. Becker 2d96fdd54f Shrink another large image
This image is only used for testing `BITMAPV5HEADER` support in
`getimagesize()` (see bf9ad4e). Therefore it is not necessary to have
a big image; a single pixel is sufficient.
2017-07-30 16:26:06 +02:00
Christoph M. Becker 74a696d53b Shrink test image
The last (`IDAT`) chunk in this file starting at `0x5e265` reports to
have a length of `0x2000` bytes, but there are only `0x1D9B` bytes
left. Simply cutting the first `IDAT` chunk which starts at `0x31` and
also reports a length of `0x2000` at the same offset should produce the
same test results (while reducing the file size to 7.628 bytes).
2017-07-30 14:43:37 +02:00
Christoph M. Becker 4d6f808c16 Skip this test if ext/gd is not available 2017-07-30 13:24:10 +02:00
Nikita Popov e3d25e78eb Fixed bug #62934 2017-07-28 13:02:25 +02:00
Anatol Belski b01336814d relax test on travis 2017-07-28 00:27:11 +02:00
Pedro Magalhães 34e5d3a87d Simpler fix for #74974 2017-07-27 09:25:38 -04:00
Xinchen Hui 9fcfe52d03 Fixed test 2017-07-27 12:50:17 +08:00
Xinchen Hui e36c04ef48 Fixed bug #74949 (null pointer dereference in _function_string) 2017-07-27 11:23:06 +08:00
Sara Golemon c7aa8ba0ee Bugfix #74993 Wrong reflection param into for some intl: lookup_*() methods 2017-07-26 18:55:23 -04:00
Anatol Belski 3306b3aa60 [ci skip] update NEWS 2017-07-26 17:29:37 +02:00
Anatol Belski bd00fe81cc Fixed bug #74833, SID constant created with wrong module number 2017-07-26 13:19:41 +02:00
Benjamin W. Broersma 6b1fbafdf0 Fix bug #74991 - include_path has a 4096 char (minus "__DIR__:") limit, in some PHAR cases 2017-07-26 10:46:50 +01:00
Christopher Jones de65a2243f Expose oci_unregister_taf_callback() 2017-07-26 15:22:44 +10:00
Carsten Brandt 3fd7d819b8 Fixed finding CURL on systems with multiarch support
fixes https://bugs.php.net/bug.php?id=74125

This commit makes the cURL config script aware of debian/ubuntu
[multiarch support][1] which installs architecture specific
headers in a different location.

It checks whether the `dpkg-architecture` script exists and is
executeable, if that is the case, the multiarch architecture is
detected by calling `dpkg-architecture -qDEB_HOST_MULTIARCH` as
documented in [debian multiarch implementation docs][2]:

> `/usr/include/<triplet>`: used for arch-varying headers

[1]: https://wiki.debian.org/Multiarch
[2]: https://wiki.debian.org/Multiarch/Implementation
2017-07-25 06:58:11 +01:00
Joe Watkins 69b48f83df minor loop optimizations, closes #2633 2017-07-25 06:47:58 +01:00
Anatol Belski cdf9178c43 switch to binary sdk 2.0.9 for appveyor 2017-07-24 23:07:15 +02:00
Peter Kokot 924ff6164e Update copyright year to 2017 2017-07-24 17:23:57 +01:00
Anatol Belski a769d873f8 Add test for bug #74903 2017-07-24 17:02:10 +02:00
Jelle van der Waa 23c124ec75 openssl: Add openssl_pkcs12_export_to_file tests
Add basic tests for openssl_pkcs12_export_to_file.
2017-07-24 10:46:42 +01:00
Peter Kokot c4e11c8ef3 Update PHP 5 version to 7 in header comments 2017-07-24 10:42:15 +01:00
Christoph M. Becker 418da85f15 Fix #71606: Segmentation fault mb_strcut with HTML-ENTITIES
The HTML decoding filter uses the `opaque` member of mbfl_convert_filter
as buffer, but there was no copy constructor defined, what caused double
frees when the filter is copied (what happens multiple times in mb_strcut(),
for instance).
2017-07-23 12:19:27 +02:00
Sara Golemon 775b4b54d8 Use compatability zend_isnan() instead of POSIX isnan()
s/isnan/zend_isnan/g
2017-07-22 21:32:44 -04:00
Sara Golemon c562d44321 Fix compile-time optimization of NAN comparisons 2017-07-22 21:22:51 -04:00
Anatol Belski ad12da4908 [ci skip] update NEWS 2017-07-22 14:12:45 +02:00
Bob Weinand bad5d0d6c5 Fixed bug #74954 (null deref and segfault in zend_generator_resume()) 2017-07-22 11:14:00 +02:00
Anatol Belski e405ff59f9 Fixed bug #74968 PHP crashes when calling mysqli_result::fetch_object with an abstract class 2017-07-22 10:35:26 +02:00
Xinchen Hui 256ec5bebb Merge branch 'PHP-7.0' of git.php.net:/php-src into PHP-7.0
* 'PHP-7.0' of git.php.net:/php-src:
  Move the define into the header to reduce diff for future upgrade
2017-07-21 18:16:37 +08:00
Xinchen Hui 3a7b0027f3 Fixed bug #74950 (nullpointer deref in simplexml_element_getDocNamespaces) 2017-07-21 18:16:11 +08:00
Anatol Belski 9b3c26d4f4 Move the define into the header to reduce diff for future upgrade 2017-07-21 09:12:06 +02:00
Xinchen Hui 95d2908814 Fixed bug #74947 (Segfault in scanner on INF number) 2017-07-21 11:56:49 +08:00
Anatol Belski ce06677069 increment sdk version 2017-07-20 22:06:34 +02:00
Anatol Belski ecad9a470f remove another cygwin instance in AppVeyor run 2017-07-20 20:39:04 +02:00
Anatol Belski f67a3cc9bd fix dir separator in test 2017-07-19 22:41:09 +02:00
Sara Golemon c9fd093127 Do not allow using traits/interfaces/abstract classes as stream wrappers
Fixes https://bugs.php.net/bug.php?id=74951
2017-07-19 14:00:00 -04:00
Lior Kaplan 2cca43b3ab Add oci8_failover.c to config.w32, follow up for commit 1b797f7a 2017-07-19 17:23:22 +03:00
Dmitry Stogov e5beb4e828 Reset globals on startup or restart 2017-07-19 15:35:10 +03:00
andrewnester afc22828ea Fixed #74699 - Broken ArrayIterator unserializing 2017-07-18 22:14:11 +02:00
YaoGuai 51cdd3dc50 Fix check of mysql_commit() return value
For mysql_commit() everything non-zero is an error.
2017-07-18 21:45:02 +02:00
Anatol Belski 0da10134f2 Exclude ext/ftp from AppVeyor test run
as the tests depend on fork() and otherwise an extra setup would be
needed anyway.
2017-07-18 12:08:31 +02:00
Anatol Belski 649027b963 move to 7.0.23 for dev 2017-07-18 10:25:40 +02:00
Anatol Belski 4ef9f536ba fix missing var for phpize
(cherry picked from commit 36c3d71407)
2017-07-17 19:38:50 +02:00
Peter Kokot 4d08b9dac0 Fixed bug #74906 redirecting incorrect include <sys/errno.h> 2017-07-17 06:54:27 +01:00
Peter Kokot 0db20a7cb1 Fixed bug 74913 redirecting incorrect include <sys/poll.h> 2017-07-17 06:50:59 +01:00
Christopher Jones c1504b81d3 Bump OCI8 version for recent patch 2017-07-14 14:13:08 +10:00
Anatol Belski 2f606dc5e8 Guard against AppVeyor losing deps issue
Possibly due to concurrent build cache updates or some changes in
the remote image. Some locking mechanism still could be required.
2017-07-12 15:37:40 +02:00
Anatol Belski 04cc2f6473 increase poll timeout as false positives mitigation 2017-07-12 14:38:12 +02:00
Anatol Belski 3bcab31749 update NEWS 2017-07-10 22:49:55 +02:00
Anatol Belski b47cff48de switch to next binary tools sdk version 2017-07-10 21:44:43 +02:00
Anatol Belski a797421e98 Revert "Add more constants, improve comments, and add tests"
This reverts commit 0c4f11ecaa.
2017-07-10 16:53:56 +02:00
Pedro Magalhães 2689917b17 #73594 tests only check the extra params if dns_get_record is successful 2017-07-10 06:55:31 +01:00
jhdxr 5cf54f6073 Fixed bug #74852 (property_exists returns true on unknown DateInterval property) 2017-07-10 06:53:22 +01:00
Anatol Belski 62700f76cb [ci skip] update NEWS 2017-07-09 15:01:37 +02:00
Anatol Belski b5338c0b7d Fixed bug #74883 SQLite3::__construct() produces "out of memory" exception with invalid flags 2017-07-08 23:52:22 +02:00
Anatol Belski 0fdceb6cd5 update libs versions 2017-07-08 13:41:50 +02:00
Christopher Jones 5ca02ca494 Fix NEWS entry location 2017-07-07 12:13:21 +10:00
Ferenc Kovacs af07b76ccf Merge branch 'PHP-5.6' into PHP-7.0 2017-07-06 00:12:05 +02:00
Ferenc Kovacs 390f64701d add missing NEWS entry for #74087 and also fix the formatting 2017-07-06 00:10:07 +02:00
Ferenc Kovacs 7991a88675 move NEWS entry to the correct place, also bump the version 2017-07-06 00:05:14 +02:00
Anatol Belski aa3fceeaad [ci skip] sync NEWS 2017-07-05 12:31:21 +02:00
Remi Collet 8b1559b9f4 Merge branch 'PHP-5.6' into PHP-7.0
* PHP-5.6:
  NEWS for oniguruma
  Patch from the upstream git https://github.com/kkos/oniguruma/issues/60 (CVE-2017-9228)
  Patch from the upstream git https://github.com/kkos/oniguruma/issues/59 (CVE-2017-9229) b690371bbf97794b4a1d3f295d4fb9a8b05d402d Modified for onig 5.9.6
  Patch from the upstream git https://github.com/kkos/oniguruma/issues/58 (CVE-2017-9227)
  Patch from the upstream git https://github.com/kkos/oniguruma/issues/57 (CVE-2017-9224)
  Patch from the upstream git https://github.com/kkos/oniguruma/issues/55 (CVE-2017-9226) b4bf968ad52afe14e60a2dc8a95d3555c543353a Modified for onig 5.9.6 f015fbdd95f76438cd86366467bb2b39870dd7c6 Modified for onig 5.9.6
2017-07-05 10:02:21 +02:00
Remi Collet 55b880070c NEWS for oniguruma 2017-07-05 09:26:55 +02:00
Remi Collet 703be4f77e Patch from the upstream git
https://github.com/kkos/oniguruma/issues/60 (CVE-2017-9228)

Thanks to Mamoru TASAKA <mtasaka@fedoraproject.org>
2017-07-05 09:26:06 +02:00
Remi Collet 27a743b82b Patch from the upstream git
https://github.com/kkos/oniguruma/issues/59 (CVE-2017-9229)
b690371bbf97794b4a1d3f295d4fb9a8b05d402d Modified for onig 5.9.6

Thanks to Mamoru TASAKA <mtasaka@fedoraproject.org>
2017-07-05 09:25:57 +02:00
Remi Collet bdf7393ddb Patch from the upstream git
https://github.com/kkos/oniguruma/issues/58 (CVE-2017-9227)

Thanks to Mamoru TASAKA <mtasaka@fedoraproject.org>
2017-07-05 09:25:49 +02:00
Remi Collet 2693e52113 Patch from the upstream git
https://github.com/kkos/oniguruma/issues/57 (CVE-2017-9224)

Thanks to Mamoru TASAKA <mtasaka@fedoraproject.org>
2017-07-05 09:25:39 +02:00
Remi Collet 4e68b2c52b Patch from the upstream git
https://github.com/kkos/oniguruma/issues/55 (CVE-2017-9226)
b4bf968ad52afe14e60a2dc8a95d3555c543353a Modified for onig 5.9.6
f015fbdd95f76438cd86366467bb2b39870dd7c6 Modified for onig 5.9.6

Thanks to Mamoru TASAKA <mtasaka@fedoraproject.org>
2017-07-05 09:25:27 +02:00
Stanislav Malyshev 54840f9c8f Merge branch 'PHP-5.6' into PHP-7.0
* PHP-5.6:
  Improve fix for #74145
2017-07-04 21:11:15 -07:00
Stanislav Malyshev f269cdcd4f Improve fix for #74145 2017-07-04 21:10:08 -07:00
Stanislav Malyshev f76a6cd023 Merge branch 'PHP-5.6' into PHP-7.0
* PHP-5.6:
  Fix tests
2017-07-04 21:05:06 -07:00
Stanislav Malyshev 6b18d956de Fix wddx 2017-07-04 20:19:34 -07:00
Stanislav Malyshev e46d589624 Fix tests 2017-07-04 20:12:57 -07:00
Stanislav Malyshev 0496f5407f Merge branch 'PHP-5.6' into PHP-7.0
* PHP-5.6:
  Update NEWS
  Fix bug #74087
  Fixed parsing of strange formats with mixed month/day and time strings
  Fix bug #74145 - wddx parsing empty boolean tag leads to SIGSEGV
  Fixed bug #74111
  Fix #74435: Buffer over-read into uninitialized memory
  Fix bug #74603 - use correct buffer size
  Fix bug #74651 - check EVP_SealInit as it can return -1
  Update NEWS
  Fix bug #73807
2017-07-04 19:44:51 -07:00
Nikita Popov 3a25a56a92 Fixed bug #74111 2017-07-04 19:38:42 -07:00
Stanislav Malyshev 0525574913 Fix bug #74603 - use correct buffer size 2017-07-04 19:35:56 -07:00
Stanislav Malyshev 73cabfedf5 Fix bug #74651 - check EVP_SealInit as it can return -1 2017-07-04 19:30:56 -07:00
Stanislav Malyshev 12107d619b Update NEWS 2017-07-04 19:30:29 -07:00
Stanislav Malyshev f7f4fd4706 Fix bug #74087
Ported from https://vcs.pcre.org/pcre/code/trunk/pcre_jit_compile.c?r1=1676&r2=1680&view=patch
2017-07-04 19:21:28 -07:00
Derick Rethans e8b7698f5e Fixed parsing of strange formats with mixed month/day and time strings 2017-07-04 19:19:30 -07:00
Stanislav Malyshev 2aae60461c Fix bug #74145 - wddx parsing empty boolean tag leads to SIGSEGV 2017-07-04 19:06:42 -07:00
Nikita Popov f8c514ba6b Fixed bug #74111 2017-07-04 19:06:16 -07:00
Christoph M. Becker 8dc4f4dc9e Fix #74435: Buffer over-read into uninitialized memory
The stack allocated color map buffers were not zeroed before usage, and
so undefined palette indexes could cause information leakage.
2017-07-04 19:00:57 -07:00
Stanislav Malyshev 5f8380d33e Fix bug #74603 - use correct buffer size 2017-07-04 19:00:03 -07:00
Stanislav Malyshev 89637c6b41 Fix bug #74651 - check EVP_SealInit as it can return -1 2017-07-04 12:32:06 -07:00
Remi Collet 4b38feabe7 Adapt for 32-bits which fails at different offset (49 vs 38) 2017-07-04 20:25:59 +02:00
Anatol Belski a29264eb8c fix datatype 2017-07-04 16:37:17 +02:00
Anatol Belski 4903f044d3 [ci skip] sync NEWS 2017-07-04 12:12:51 +02:00
Anatol Belski ce64b82ebb update NEWS 2017-07-04 11:29:00 +02:00
Nikita Popov d02f953faf Fixed bug #74101 and bug #74614 2017-07-04 10:39:41 +02:00
Anatol Belski d0b7eed0c9 yet one C++ compat fix 2017-07-01 20:05:11 +02:00
Anatol Belski c71b773a62 fix C++ compat 2017-07-01 18:36:43 +02:00
Bob Weinand e3cc15daf2 Fixed bug #74840 (Opcache overwrites argument of GENERATOR_RETURN within finally) 2017-07-01 11:52:03 +02:00
Julien Pauli 2a1ad88538 Updated NEWS 2017-06-29 20:23:37 +02:00
Julien Pauli 3f4340a796 Fix bug #74832, crash in extension loading 2017-06-29 20:22:21 +02:00
Adam Baratz 08089f014c Fixed #69356: PDOStatement::debugDumpParams() truncates query 2017-06-29 11:39:50 +02:00
George Wang 751d19f698 [BUGFIX] fixes the issue that a value from .user.ini displays in phpinfo(), but not applies.
[BUGFIX] when lsapi used the php_value has higher priority then ini_set when called from the script by itself .
2017-06-27 23:14:36 -04:00
Nikita Popov 604827b694 Fixed bug #73173
Patch by tloi at fortinet dot com.
2017-06-25 20:17:06 +02:00
Bob Weinand cfee5116dd Expose inflate_get_status() and inflate_get_read_len() functions 2017-06-25 20:12:45 +02:00
Matthew Trescott 0c4f11ecaa Add more constants, improve comments, and add tests 2017-06-25 20:12:45 +02:00
Nikita Popov 2fddc4a7f1 Fixed bug #73900 2017-06-25 19:48:17 +02:00
Nikita Popov de66e80d75 Don't leave holes in func_get_args() and backtraces
Argument lists should always be continuous and hole-free, even if
local variables are unset. Replace UNDEF values with NULLs.
2017-06-25 15:27:45 +02:00
Bob Weinand fda0a8b735 Fixed bug #73944 (inflate_init() dictionary option) - add NEWS entry 2017-06-25 10:57:36 +02:00
wapmorgan cd1869bcf2 Remove invalid check of dictionary content and add initialization of dictionary if raw compression used 2017-06-25 10:53:28 +02:00
Stanislav Malyshev 3eecee16d1 Update NEWS 2017-06-24 23:32:59 -07:00
ideal 4d6100569b Fix error if compiled without -fpermissive flag. 2017-06-23 13:31:23 +02:00
danchukas b255b97e43 fix method "eof"
replace "eof" with  "feof"
because:
1) http://php.net/manual/ru/function.feof.php
2) Error: Call to undefined function eof()
2017-06-23 07:53:00 +01:00
Thomas Punt b1301a0686 Remove superfluous branch 2017-06-23 07:51:32 +01:00
Peter Kokot 660250f4da Fix configure error
This patch fixes configure error on some systems such as Alpine.

```
 line 3472: test: =: unary operator expected
```

One of the fixes has been suggested also here already:
https://bugs.php.net/bug.php?id=39835

Thank you for considering merging this.
2017-06-22 14:01:18 +01:00
jhdxr 81c2a4b9ba fix bug #73471 PHP freezes with AppendIterator 2017-06-22 11:56:49 +01:00
jhdxr db287b2303 fix bug #74780 parse_url() borken when query string contains colon 2017-06-22 11:52:06 +01:00
Christopher Jones b3bd379198 Merge branch 'pull-request/2532' into PHP-7.0
* pull-request/2532:
  Add bug #74625 to package.xml
  Add IN bind case to bug74625.phpt
  Fixed bug #74625 (Integer overflow in oci_bind_array_by_name).
2017-06-21 15:55:28 +10:00
Christopher Jones cda87977a5 Add bug #74625 to package.xml 2017-06-21 15:50:51 +10:00
Christopher Jones b4c5f20c46 Add IN bind case to bug74625.phpt 2017-06-21 15:47:32 +10:00
Ingmar Runge fa3615f14e Fixed bug #74625 (Integer overflow in oci_bind_array_by_name). 2017-06-21 15:44:55 +10:00
Christopher Jones 3fbbcf7f93 Remove use of obsolete create_function() 2017-06-21 15:02:58 +10:00
Christopher Jones 1bdc290017 Update OCI8 version test and package.xml 2017-06-21 14:29:30 +10:00
Stanislav Malyshev 18b6de7a91 Fix bug #73634 - grapheme_strpos illegal memory access 2017-06-20 13:29:57 -07:00
Stanislav Malyshev 14c422a32f Fix bug #73648 - integer overflow in substr 2017-06-20 13:29:48 -07:00
Anatol Belski 6a854e2740 Split requested size as expected by CreateFileMapping.
Thus fixing ext\opcache\tests\log_verbosity_bug.phpt fails on 64-bit.
2017-06-20 15:40:25 +02:00
Anatol Belski b4fa2ba295 move next 2017-06-20 14:05:50 +02:00
Nikita Popov 0f8cf3b849 Fix bug #73807 2017-06-20 00:23:44 -07:00
Christopher Jones 27d6814351 PDO_OCI: support IC 12.2 in configure option 2017-06-20 16:00:22 +10:00
Christopher Jones 64447030bb Bump OCI8 version 2017-06-20 14:54:45 +10:00
Christopher Jones 073ac50374 Merge branch 'pull-request/1569' into PHP-7.0
* pull-request/1569:
  add test for bug #70700
2017-06-20 14:43:50 +10:00
Chuck Burgess 98bcc0bd43 add test for bug #70700 2017-06-20 14:43:20 +10:00
Christopher Jones 135265ef69 Update NEWS 2017-06-20 14:37:16 +10:00
Christopher Jones ec6ac50812 Merge branch 'pull-request/2459' into PHP-7.0
* pull-request/2459:
  oci8 - Implementation of Oracle TAF Callback
2017-06-20 14:33:06 +10:00
KoenigsKind 1b797f7ad3 oci8 - Implementation of Oracle TAF Callback
Adds support for the Transparent Application Failover Callback.
The php_oci_connection struct got a char* added which will contain the
callback function, it should be set to PHP_OCI_TAF_DISABLE_CALLBACK at
the end of a php request for permanent connections so that, if a TAF
callback occurs, no userspace function will be called.
Maybe add support for registering object functions (via array),
currently the register function only accepts a string. I didn't know how
to implement it correctly. As a failover occurs very rarely it might be
better to not keep the cache when saving the zend_fcall_info.

Things to do
[ ] config.m4 needs to compile oci8_failover.c
[ ] Check if correctly implemented (especially for multithreading)
[ ] Add support for registering callback function via array
2017-06-20 14:32:52 +10:00
Christopher Jones a6c67a088a Merge branch 'pull-request/1566' into PHP-7.0
* pull-request/1566:
  add test for bug #60994
2017-06-20 14:23:20 +10:00
Chuck Burgess 51a7e35c24 add test for bug #60994 2017-06-20 14:22:28 +10:00
Jelle van der Waa 509f5097ab openssl: Add openssl_pkcs12_(read, export) tests
Add basic tests for openssl_pkcs12_read and openssl_pkcs12_export.
openssl_pkcs12_export has two tests disable which currently do not work
as intended and should be fixed.
2017-06-18 19:02:51 +01:00
Jakub Zelenka 887fabe78f Regenerate and bump re2c version to 0.16
It also matches the re2c version for Zend language scanner
2017-06-18 18:26:48 +01:00
Anatol Belski 4a39d33ee5 Next round on AppVeyor reliability. 2017-06-17 01:57:47 +02:00
Jelle van der Waa f19dfac830 openssl: Fix spkstr and spki leak in openssl_spki_new
spkstr is not free'd when running the test and valgrind reports a leak
of 32,318 bytes. The free condition is not met since keyresource is not
NULL, apart from that OPENSSL_free actually free's the allocated memory
by OPENSSL_malloc inside OpenSSL.

Valgrind reports 768 bytes leaked in openssl_spki_new when running the
testsuite. Remove the keyresource check to always free spki.
2017-06-16 16:51:50 +01:00
Dmitry Stogov 648be8600f Fixed bug #74679 (Incorrect conversion array with WSDL_CACHE_MEMORY) 2017-06-13 17:15:47 +03:00
Remi Collet c4d7cfa536 NEWS 2017-06-13 08:50:02 +02:00
Remi Collet 78970d5338 Fix bug #74705 for collator_get_sort_key 2017-06-13 08:48:17 +02:00
Tyson Andre 5f07a895cc Fixes bug #74705 Wrong ReflectionInfo for Collator::getSortKey()
https://secure.php.net/manual/en/collator.getsortkey.php
2017-06-13 08:46:47 +02:00
Remi Collet aea8c6ddc1 NEWS 2017-06-13 08:14:34 +02:00
Tyson Andre 81b2533a68 Fixes bug #74708 reflection signatures for random_bytes+random_int
They have 1 and 2 required parameters, respectively
See https://secure.php.net/manual/en/function.random-int.php
2017-06-13 08:11:25 +02:00
Xinchen Hui 3968ffe7b3 Forgotten NEWs update 2017-06-13 12:20:42 +08:00
Xinchen Hui e05f79c3de Merge branch 'bug74600' of https://github.com/manuelm/php-src into PHP-7.0
* 'bug74600' of https://github.com/manuelm/php-src:
  Add simple cli test for PATH/HOST ini sections
  Fixed bug #74600
2017-06-12 17:12:15 +08:00
Manuel Mausz 91f129ebf7 Add simple cli test for PATH/HOST ini sections 2017-06-09 23:28:19 +02:00
Christoph M. Becker c3b910370c Use reasonable SQLite3 module version
Since PECL/sqlite3 has been moved to ext/sqlite3 in 2008, the SQLite3
module version is hardcoded to `0.7-dev`. It doesn't appear to make
much sense to have an own module version for a bundled extensions, but
as other code might rely on it, we don't remove the constant but rather
make it an alias of the PHP version.
2017-06-09 13:49:32 +02:00
Manuel Mausz ee0e6963f3 Fixed bug #74600
Make sure the hash entry is an array.

The origin fix broke support for HOST/PATH ini sections. Only the
beginning of the string has to match. Revert this check but use
zend_binary_strncasecmp instead of strncasecmp.
2017-06-09 01:43:08 +02:00
Anatol Belski 9997767dc3 enforce exit status propagation and up the sdk version 2017-06-08 17:14:52 +02:00
Jakub Zelenka 3704947696 Replace ASN1_STRING_data with ASN1_STRING_get0_data
This is a slightly modified version of the patch from Jelle van der Waa
( @jelly ) so full credit to him.
2017-06-04 18:08:51 +01:00
Nikita Popov 585c9f3c4b Fix leak in WDDX serialization 2017-06-03 15:08:42 +02:00
Tim Toohey d027bc2add Fixed bug #69373
xmlNodeSetContentLen() calls xmlFreeNode() on node->children. This
causes problems if there are other references around to those children.
2017-06-03 00:40:58 +02:00
libnex 95c4564f93 Fixed bug #73473: Stack Buffer Overflow in msgfmt_parse_message 2017-06-03 00:05:16 +02:00
Xinchen Hui 9c5717d0de Fixed bug #74673 (Segfault when cast Reflection object to string with undefined constant) 2017-05-31 12:39:26 +08:00
Dmitry Stogov 77cbf8a657 Fixed wrong condition 2017-05-31 00:40:33 +03:00
Côme Bernigaud dc7e53690f Merge branch 'pull-request/2536' into PHP-7.0
* pull-request/2536:
  ext/ldap/test: Test that ldap_connect() uses defaults from ldap.conf (openldap)
  ext/ldap: Allow default host from ldap.conf to work.
2017-05-30 16:45:27 +02:00
Remi Collet 46bb35a853 NEWS 2017-05-30 15:45:09 +02:00
Remi Collet 1c845d2950 Patch from the upstream git
https://github.com/kkos/oniguruma/issues/60 (CVE-2017-9228)

Thanks to Mamoru TASAKA <mtasaka@fedoraproject.org>
2017-05-30 15:40:32 +02:00
Remi Collet 5416deec66 Patch from the upstream git
https://github.com/kkos/oniguruma/issues/59 (CVE-2017-9229)
b690371bbf97794b4a1d3f295d4fb9a8b05d402d Modified for onig 5.9.6

Thanks to Mamoru TASAKA <mtasaka@fedoraproject.org>
2017-05-30 15:39:21 +02:00
Remi Collet 6a8ae7cf8d Patch from the upstream git
https://github.com/kkos/oniguruma/issues/58 (CVE-2017-9227)

Thanks to Mamoru TASAKA <mtasaka@fedoraproject.org>
2017-05-30 15:38:17 +02:00
Remi Collet 60b1829e1c Patch from the upstream git
https://github.com/kkos/oniguruma/issues/57 (CVE-2017-9224)

Thanks to Mamoru TASAKA <mtasaka@fedoraproject.org>
2017-05-30 15:37:11 +02:00
Remi Collet 1e0c4386ab Patch from the upstream git
https://github.com/kkos/oniguruma/issues/55 (CVE-2017-9226)
b4bf968ad52afe14e60a2dc8a95d3555c543353a Modified for onig 5.9.6
f015fbdd95f76438cd86366467bb2b39870dd7c6 Modified for onig 5.9.6

Thanks to Mamoru TASAKA <mtasaka@fedoraproject.org>
2017-05-30 15:35:42 +02:00
Fabien Villepinte 2dee44c74c Fix Bug #74386 Phar::__construct(): wrong number of parameters by reflection 2017-05-29 08:29:30 +01:00
Sara Golemon 8dcfec9789 Bugfix #74556 stream_socket_get_name() returns empty string
The original bug report had it returning '\0',
but with a fix to abstract name handling (6d2d0bbda7)
it now actually returns ''.

Neither of these are good, as per unix(7)
an empty socket name indicates an unbound name
and "should not be inspected".
2017-05-28 08:48:18 -07:00
Sara Golemon 6d2d0bbda7 Fix abstract name handling to be binary safe
Per unix(7):
abstract: an abstract socket address is distinguished (from a
pathname socket) by the fact that sun_path[0] is a null byte
('\0').  The socket's address in this namespace is given by the
additional bytes in sun_path that are covered by the specified
length of the address structure.  (Null bytes in the name have no
special significance.)  The name has no connection with filesystem
pathnames.  When the address of an abstract socket is returned,
the returned addrlen is greater than sizeof(sa_family_t) (i.e.,
greater than 2), and the name of the socket is contained in the
first (addrlen - sizeof(sa_family_t)) bytes of sun_path.

The existing implementation was assuming significance in null bytes
contained in the abstract address identifier.
2017-05-28 08:45:44 -07:00
Sara Golemon 05849a242a Bugfix #74598 ftp:// ignores context 2017-05-27 21:12:49 -07:00
Xinchen Hui 60912e66c8 Fixed bug #74663 (Segfault with opcache.memory_protect and validate_timestamp) 2017-05-27 22:42:27 +08:00
Xinchen Hui ece7d223e8 Correct the location 2017-05-27 12:11:53 +08:00
Xinchen Hui 5269c4cacb Fixed bug #74657 (Undefined constants in array properties result in broken properties) 2017-05-27 12:06:43 +08:00
David Caldwell 49d1cdc393 ext/ldap/test: Test that ldap_connect() uses defaults from ldap.conf (openldap) 2017-05-25 21:27:11 +00:00
David Caldwell d51b8f915f ext/ldap: Allow default host from ldap.conf to work.
This fixes an regression introduced in
e7af0fe1eb. Previously, calling
ldap_connect() with no parameters would pass NULL to ldap_init(),
which causes it to use the default host specified in
/etc/ldap/ldap.conf (on Ubuntu).

When the code changed to use ldap_initialize(), it initialized a uri,
even if there were no parameters passed to ldap_connect(). Because of
this, there's no way to pass a NULL into ldap_initialize(), making it
impossible to use the default uri from ldap.conf.

This commit bypasses the uri creation when there is no host argument,
passing on a NULL to ldap_initialize() which restores the old PHP 5.5
behavior.
2017-05-25 00:47:11 +00:00
jhdxr 872e43d6e5 Fixed bug #74478 2017-05-24 18:01:41 +02:00
Anatol Belski fff1cab367 time to move next 2017-05-23 12:31:03 +02:00
Anatol Belski c4ae856912 move to the next sdk version for AppVeyor 2017-05-20 13:48:35 +02:00
Anatol Belski 464c1639ae follow up fix on bug #74022 2017-05-18 12:03:13 +02:00
Xinchen Hui 0954ea8d6d Added cleanup 2017-05-17 23:24:58 +08:00
Xinchen Hui ef09bc0645 Added test for bug #74600 2017-05-17 23:21:18 +08:00
Xinchen Hui e347b2ded6 Added test for bug #74596 2017-05-17 22:42:18 +08:00
Xinchen Hui 8a1713e39c Merge branch 'PHP-7.0' of git.php.net:/php-src into PHP-7.0
* 'PHP-7.0' of git.php.net:/php-src:
  variation of icu libraries causes failure
2017-05-16 19:32:33 +08:00
Xinchen Hui 9f49ebb5ba Fixed bug #74600 (crash (SIGSEGV) in _zend_hash_add_or_update_i) 2017-05-16 19:32:13 +08:00
Steve Walk d74fbfb38f variation of icu libraries causes failure 2017-05-16 12:46:27 +02:00
Xinchen Hui 89dd7fb328 Fixed bug #74596 (SIGSEGV with opcache.revalidate_path enabled)
Yeah, no test script is provided.. I got some troubles to make a one
2017-05-16 13:22:08 +08:00
Anatol Belski 777929b1ae switch to Postgres 9.6 for appveyor 2017-05-15 17:47:41 +02:00
Sara Golemon b8e0351978 Remove typo from test header 2017-05-10 16:50:19 -07:00
Xinchen Hui 1b22e9dc2e Fixed tests when using cumstom php.ini(session.save_handler) 2017-05-09 11:13:41 +08:00
Xinchen Hui d40a852919 Merge branch 'fix_74541' of https://github.com/villfa/php-src into PHP-7.0
* 'fix_74541' of https://github.com/villfa/php-src:
  Fix Bug #74541 Wrong reflection on session_start()
2017-05-09 11:04:39 +08:00
Xinchen Hui 99549ce79c Merge branch 'patch-1' of https://github.com/ifdattic/php-src into PHP-7.0
* 'patch-1' of https://github.com/ifdattic/php-src:
  Fix typo: exectute => execute
2017-05-09 11:01:33 +08:00
Fabien Villepinte b39c70b4a7 Fix Bug #74541 Wrong reflection on session_start() 2017-05-08 22:42:09 +02:00
Anatol Belski 1a06fae543 sync bin sdk version 2017-05-08 19:38:48 +02:00
Anatol Belski ca870dfee7 [ci skip] update libs versions file 2017-05-08 13:10:13 +02:00
Andrew Marcinkevičius abad134681 Fix typo: exectute => execute 2017-05-08 13:59:05 +03:00
Xinchen Hui b966a8b5fa Fixed another potential dangling pointer 2017-05-08 11:36:07 +08:00
Xinchen Hui 87d56a3d07 Fixed bug #74546 (SIGILL in ZEND_FETCH_CLASS_CONSTANT_SPEC_CONST_CONST_HANDLER()) 2017-05-08 11:32:08 +08:00
Anatol Belski 5c957b502e [ci skip] update NEWS 2017-05-07 13:04:21 +02:00
Anatol Belski 561f1afe6e Fixed bug #74547 mysqli::change_user() doesn't accept null as $database argument w/strict_types 2017-05-06 15:06:34 +02:00
Anatol Belski 622dc2a611 [ci skip] update NEWS 2017-05-02 14:53:32 +02:00
Christian Weiske c0c0871911 Fixed bug #51918 Phar::webPhar() does not handle requests sent through PUT and DELETE method
phar: Support DELETE, HEAD and PUT HTTP methods in Phar::webPhar

Up to now only GET and POST requests could be handled with Phar::webPhar(),
which is insufficient for today's REST APIs.
This patch expands the list of supported HTTP methods.
2017-05-02 14:44:47 +02:00
Anatol Belski 36c53036e7 [ci skip] update NEWS 2017-05-02 12:38:04 +02:00
Anatol Belski 20a608d9da Fixed bug #74510 win32/sendmail.c anchors CC header but not BCC 2017-05-02 12:31:00 +02:00
Fabien Villepinte 4c0e50c88a Fix bug #74457 Wrong reflection on XMLReader::expand 2017-05-02 06:24:46 +01:00
Fabien Villepinte f50df1d0e3 Fix bug #74468 wrong reflection on Collator::sortWithSortKeys 2017-05-02 06:20:40 +01:00
Anatol Belski a581e64199 Tests to ensure BC with undocumented behavior used in hacks
Should become obsolete, once behaviors change.
2017-05-01 18:01:05 +02:00
Nikita Popov 1967950dc3 Fix typo in SplFixedArray has_dimension implementation 2017-05-01 12:15:26 +02:00
Michael Heimpold d9dfac90bf Fix compiler warnings when compiled against musl libc
musl libc is complaining when <sys/poll.h> is used instead of <poll.h>
so change this.

This issue was reported for OpenWrt/LEDE where musl libc is the standard
C library instead of e.g. glibc, see the following link for the original PR:
https://github.com/openwrt/packages/pull/4263

Signed-off-by: Philip Prindeville <philipp@redfish-solutions.com>
Signed-off-by: Michael Heimpold <mhei@heimpold.de>

--

v3: refined checks/fallback paths as suggested by @bukka

v2: rebased to resolve merge conflict in main/php_network.h

v1: initial PR
2017-04-30 20:24:56 +01:00
Jakub Zelenka a0b9554f94 Fix possible memory leak in openssl_encrypt and openssl_decrypt 2017-04-27 15:44:26 +01:00
Jakub Zelenka 7b392c7154 Prefer using DIRECTORY_SEPARATOR in OpenSSL config path 2017-04-27 15:10:55 +01:00
Jakub Zelenka e7166ea9be Add oid_section to the testing openssl.cnf
It tests repeated OID addition
2017-04-27 15:09:58 +01:00
Anatol Belski e67096dbbb [ci skip] update NEWS 2017-04-27 11:35:00 +02:00
Anatol Belski 09ef61e3ca Revert "Detect invalid port in xp_socket parse ip address"
This reverts commit bab0b99f37.
2017-04-27 02:49:12 +02:00
Anatol Belski bf3e2dce7b Revert "Follow up patch regarding bug #74216, see bug #74429"
This reverts commit cda7dcf4ca.
2017-04-27 02:49:01 +02:00
Anatol Belski 36301bd615 sync bin sdk version 2017-04-26 17:04:29 +02:00
Jakub Zelenka c0203c0ceb Do not add already added object to the internal OpenSSL table
This fixes OpenSSL 1.1 where adding object with OID that has been
already added causes an error - preventing of duplication.
2017-04-26 14:59:15 +01:00
Remi Collet f639b64dca rely on bundle config, instead of system one 2017-04-26 14:41:40 +02:00
Anatol Belski 8cfaea656c skip the test on OpenSSL < 1.1 for now 2017-04-26 14:39:03 +02:00
2079 changed files with 60283 additions and 1152637 deletions

No files matched your search

+2 -3
View File
@@ -18,13 +18,12 @@ clone_depth: 64
cache:
- c:\build-cache
- c:\build-cache\sdk -> .appveyor.yml
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.0.1
PHP_BUILD_SDK_BRANCH: php-sdk-2.0.13
# ext and env setup for tests
#MYSQL_TEST_PASSWD: Password12!
#MYSQL_TEST_USER: root
@@ -43,7 +42,7 @@ environment:
services:
# the setup scripts have to be touched, once some other db version is used
- mysql
- postgresql95
- postgresql96
platform:
- x64
+25 -6
View File
@@ -1,16 +1,35 @@
; http://editorconfig.org/
# http://editorconfig.org/
root = true
[*.{c,h}]
charset = UTF-8
end_of_line = LF
[*.{c,h,awk,w32,bat,mk,frag}]
charset = utf-8
end_of_line = lf
indent_size = 4
indent_style = tab
insert_final_newline = true
tab_width = 4
trim_trailing_whitespace = true
insert_final_newline = true
[*.yml]
[*.{php,phpt}]
charset = utf-8
end_of_line = lf
indent_size = 4
indent_style = space
trim_trailing_whitespace = true
insert_final_newline = true
[*.{yml,m4,sh}]
charset = utf-8
end_of_line = lf
indent_size = 2
indent_style = space
trim_trailing_whitespace = true
insert_final_newline = true
[*.md]
charset = utf-8
end_of_line = lf
indent_style = space
trim_trailing_whitespace = false
insert_final_newline = true
-4
View File
@@ -15,11 +15,8 @@ ext/dba/libflatfile/flatfile.c ident
ext/dba/libcdb/cdb_make.c ident
ext/dba/libcdb/cdb.c ident
ext/filter/filter.c ident
ext/zip/php_zip.c ident
README.input_filter ident
run-tests.php ident
sapi/nsapi/nsapi.c ident
sapi/continuity/capi.c ident
Zend/RFCs/002.txt ident
Zend/RFCs/003.txt ident
ext/exif/exif.c ident
@@ -32,7 +29,6 @@ UPGRADING.INTERNALS merge=NEWS
/ext/bz2/tests/with_strings.phpt -crlf
/ext/dom/tests/bug40836.phpt -crlf
/ext/dom/tests/domelement.phpt -crlf
/ext/ereg/tests/eregi_basic_002.phpt -crlf
/ext/iconv/tests/iconv004.phpt -crlf
/ext/iconv/tests/iconv_basic.phpt -crlf
/ext/iconv/tests/iconv_strpos.phpt -crlf
-2
View File
@@ -262,9 +262,7 @@ pear/phpize
pear/run-tests
pear/php-config
pear/scripts
sapi/apache/libphp7.module
sapi/apache2handler/libphp7.module
sapi/apache_hooks/libphp7.module
sapi/cgi/php-cgi
sapi/cgi/php-cgi.1
sapi/cli/php.1
+1
View File
@@ -1,3 +1,4 @@
dist: trusty
language: c
sudo: false
addons:
+1 -1
View File
@@ -165,7 +165,7 @@ User Functions/Methods Naming Conventions
'foobar'
'foo_bar'
Internal Function Naming Conventions
Internal Function Naming Convensions
----------------------
1. Functions that are part of the external API should be named
+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
+4 -4
View File
@@ -5,7 +5,7 @@ INSTALL_DATA = $(INSTALL) -m 644
DEFS = -DPHP_ATOM_INC -I$(top_builddir)/include -I$(top_builddir)/main -I$(top_srcdir)
COMMON_FLAGS = $(DEFS) $(INCLUDES) $(EXTRA_INCLUDES) $(CPPFLAGS) $(PHP_FRAMEWORKPATH)
all: $(all_targets)
all: $(all_targets)
@echo
@echo "Build complete."
@echo "Don't forget to run 'make test'."
@@ -112,13 +112,13 @@ test: all
clean:
find . -name \*.gcno -o -name \*.gcda | xargs rm -f
find . -name \*.lo -o -name \*.o | xargs rm -f
find . -name \*.la -o -name \*.a | xargs rm -f
find . -name \*.la -o -name \*.a | xargs rm -f
find . -name \*.so | xargs rm -f
find . -name .libs -a -type d|xargs rm -rf
rm -f libphp$(PHP_MAJOR_VERSION).la $(SAPI_CLI_PATH) $(SAPI_CGI_PATH) $(SAPI_MILTER_PATH) $(SAPI_LITESPEED_PATH) $(SAPI_FPM_PATH) $(OVERALL_TARGET) modules/* libs/*
distclean: clean
rm -f Makefile config.cache config.log config.status Makefile.objects Makefile.fragments libtool main/php_config.h main/internal_functions_cli.c main/internal_functions.c stamp-h sapi/apache/libphp$(PHP_MAJOR_VERSION).module sapi/apache_hooks/libphp$(PHP_MAJOR_VERSION).module buildmk.stamp Zend/zend_dtrace_gen.h Zend/zend_dtrace_gen.h.bak Zend/zend_config.h TSRM/tsrm_config.h
rm -f Makefile config.cache config.log config.status Makefile.objects Makefile.fragments libtool main/php_config.h main/internal_functions_cli.c main/internal_functions.c stamp-h buildmk.stamp Zend/zend_dtrace_gen.h Zend/zend_dtrace_gen.h.bak Zend/zend_config.h TSRM/tsrm_config.h
rm -f php7.spec main/build-defs.h scripts/phpize
rm -f ext/date/lib/timelib_config.h ext/mbstring/oniguruma/config.h ext/mbstring/libmbfl/config.h ext/oci8/oci8_dtrace_gen.h ext/oci8/oci8_dtrace_gen.h.bak
rm -f scripts/man1/phpize.1 scripts/php-config scripts/man1/php-config.1 sapi/cli/php.1 sapi/cgi/php-cgi.1 ext/phar/phar.1 ext/phar/phar.phar.1
@@ -135,7 +135,7 @@ prof-gen:
prof-clean:
find . -name \*.lo -o -name \*.o | xargs rm -f
find . -name \*.la -o -name \*.a | xargs rm -f
find . -name \*.la -o -name \*.a | xargs rm -f
find . -name \*.so | xargs rm -f
rm -f libphp$(PHP_MAJOR_VERSION).la $(SAPI_CLI_PATH) $(SAPI_CGI_PATH) $(SAPI_MILTER_PATH) $(SAPI_LITESPEED_PATH) $(SAPI_FPM_PATH) $(OVERALL_TARGET) modules/* libs/*
+516 -793
View File
File diff suppressed because it is too large. Load diff
+1 -1
View File
@@ -79,7 +79,7 @@ The next few rules are more of a technical nature::
should be noted in both PHP-5.4/NEWS and PHP-5.5/NEWS but
not master, which is not a public released version yet.
3. Do not commit multiple files and dump all messages in one commit. If you
3. Do not commit multiple file and dump all messages in one commit. If you
modified several unrelated files, commit each group separately and
provide a nice commit message for each one. See example below.
+6 -6
View File
@@ -17,7 +17,7 @@ It is recommended to do so a couple of days before the packaging day, to
have enough time to investigate failures, communicate with the authors and
commit the fixes.
The RM for the branch is also responsible for keeping the CI green on
ongoing basis between the releases. Check the CI status for your branch
ongoing bases between the releases. Check the CI status for your branch
periodically and resolve the failures ASAP. See more in:
https://wiki.php.net/rfc/travis_ci
@@ -31,7 +31,7 @@ team (Bjori) on hand.
6. Verify the tags to be extra sure everything was tagged properly.
7. Moving extensions from/to PECL requires write access to the destination.
7. Moving extensions from/to PECL requires write acces to the destination.
Most developers should have this.
Moving extensions from php-src to PECL
@@ -274,8 +274,8 @@ to upgrade.
10. Wait an hour or two, then send a mail to php-announce@lists.php.net,
php-general@lists.php.net and internals@lists.php.net with a text similar to
http://news.php.net/php.internals/17222.
Please make sure that the mail to php-announce@ is its own completely separate email.
This is to make sure that replies to the announcement on php-general@ or internals@
Please make sure that the mail to php-announce@ is its own completely seperate email.
This is to make sure that repiles to the announcement on php-general@ or internals@
will not accidentally hit the php-announce@ mailinglist.
Re-releasing the same version (or -pl)
@@ -312,6 +312,6 @@ to upgrade.
5. Wait an hour or two, then send a mail to php-announce@lists.php.net,
php-general@lists.php.net and internals@lists.php.net with a text similar to
the news entry.
Please make sure that the mail to php-announce@ is its own completely separate email.
This is to make sure that replies to the announcement on php-general@ or internals@
Please make sure that the mail to php-announce@ is its own completely seperate email.
This is to make sure that repiles to the announcement on php-general@ or internals@
will not accidentally hit the php-announce@ mailinglist.
+1 -1
View File
@@ -11,7 +11,7 @@ Pull Requests
=============
PHP accepts pull requests via github. Discussions are done on github, but
depending on the topic can also be relayed to the official PHP developer
mailing list internals@lists.php.net.
mailinglist internals@lists.php.net.
New features require an RFC and must be accepted by the developers.
See https://wiki.php.net/rfc and https://wiki.php.net/rfc/voting for more
+1 -4
View File
@@ -42,10 +42,7 @@ char *alloca ();
#endif
#ifndef MAXPATHLEN
# if _WIN32
# include "win32/ioutil.h"
# define MAXPATHLEN PHP_WIN32_IOUTIL_MAXPATHLEN
# elif PATH_MAX
# ifdef PATH_MAX
# define MAXPATHLEN PATH_MAX
# elif defined(MAX_PATH)
# define MAXPATHLEN MAX_PATH
+22 -76
View File
@@ -33,7 +33,6 @@
#include <Sddl.h>
#include "tsrm_win32.h"
#include "zend_virtual_cwd.h"
#include "win32/ioutil.h"
#ifdef ZTS
static ts_rsrc_id win32_globals_id;
@@ -208,42 +207,29 @@ TSRM_API int tsrm_win32_access(const char *pathname, int mode)
DWORD sec_desc_length = 0, desired_access = 0, granted_access = 0;
BYTE * psec_desc = NULL;
BOOL fAccess = FALSE;
realpath_cache_bucket * bucket = NULL;
char * real_path = NULL;
PHP_WIN32_IOUTIL_INIT_W(pathname)
if (!pathw) {
return -1;
}
if (mode == 1 /*X_OK*/) {
DWORD type;
int ret;
ret = GetBinaryTypeW(pathw, &type) ? 0 : -1;
PHP_WIN32_IOUTIL_CLEANUP_W()
return ret;
return GetBinaryType(pathname, &type) ? 0 : -1;
} else {
if(!IS_ABSOLUTE_PATH(pathname, strlen(pathname)+1)) {
real_path = (char *)malloc(MAXPATHLEN);
real_path = (char *)malloc(MAX_PATH);
if(tsrm_realpath(pathname, real_path) == NULL) {
goto Finished;
}
pathname = real_path;
PHP_WIN32_IOUTIL_REINIT_W(pathname);
}
if(php_win32_ioutil_access(pathname, mode)) {
PHP_WIN32_IOUTIL_CLEANUP_W()
if(access(pathname, mode)) {
free(real_path);
return errno;
}
/* If only existence check is made, return now */
if (mode == 0) {
PHP_WIN32_IOUTIL_CLEANUP_W()
free(real_path);
return 0;
}
@@ -299,11 +285,10 @@ TSRM_API int tsrm_win32_access(const char *pathname, int mode)
if(bucket == NULL && real_path == NULL) {
/* We used the pathname directly. Call tsrm_realpath */
/* so that entry is created in realpath cache */
real_path = (char *)malloc(MAXPATHLEN);
real_path = (char *)malloc(MAX_PATH);
if(tsrm_realpath(pathname, real_path) != NULL) {
pathname = real_path;
bucket = realpath_cache_lookup(pathname, (int)strlen(pathname), t);
PHP_WIN32_IOUTIL_REINIT_W(pathname);
}
}
}
@@ -340,13 +325,13 @@ TSRM_API int tsrm_win32_access(const char *pathname, int mode)
}
/* Get size of security buffer. Call is expected to fail */
if(GetFileSecurityW(pathw, sec_info, NULL, 0, &sec_desc_length)) {
if(GetFileSecurity(pathname, sec_info, NULL, 0, &sec_desc_length)) {
goto Finished;
}
psec_desc = (BYTE *)malloc(sec_desc_length);
if(psec_desc == NULL ||
!GetFileSecurityW(pathw, sec_info, (PSECURITY_DESCRIPTOR)psec_desc, sec_desc_length, &sec_desc_length)) {
!GetFileSecurity(pathname, sec_info, (PSECURITY_DESCRIPTOR)psec_desc, sec_desc_length, &sec_desc_length)) {
goto Finished;
}
@@ -388,7 +373,6 @@ Finished:
real_path = NULL;
}
PHP_WIN32_IOUTIL_CLEANUP_W()
if(fAccess == FALSE) {
errno = EACCES;
return errno;
@@ -475,15 +459,14 @@ TSRM_API FILE *popen_ex(const char *command, const char *type, const char *cwd,
{
FILE *stream = NULL;
int fno, type_len, read, mode;
STARTUPINFOW startup;
STARTUPINFO startup;
PROCESS_INFORMATION process;
SECURITY_ATTRIBUTES security;
HANDLE in, out;
DWORD dwCreateFlags = 0;
BOOL res;
process_pair *proc;
char *cmd = NULL;
wchar_t *cmdw = NULL, *cwdw = NULL, *envw = NULL;
char *cmd;
int i;
char *ptype = (char *)type;
HANDLE thread_token = NULL;
@@ -507,42 +490,18 @@ TSRM_API FILE *popen_ex(const char *command, const char *type, const char *cwd,
ptype++;
}
cmd = (char*)malloc(strlen(command)+strlen(TWG(comspec))+sizeof(" /c ")+2);
if (!cmd) {
return NULL;
}
sprintf(cmd, "%s /c \"%s\"", TWG(comspec), command);
cmdw = php_win32_cp_any_to_w(cmd);
if (!cmdw) {
free(cmd);
return NULL;
}
if (cwd) {
cwdw = php_win32_ioutil_any_to_w(cwd);
if (!cwdw) {
free(cmd);
free(cmdw);
return NULL;
}
}
security.nLength = sizeof(SECURITY_ATTRIBUTES);
security.bInheritHandle = TRUE;
security.lpSecurityDescriptor = NULL;
if (!type_len || !CreatePipe(&in, &out, &security, 2048L)) {
free(cmdw);
free(cwdw);
free(cmd);
return NULL;
}
memset(&startup, 0, sizeof(STARTUPINFOW));
memset(&startup, 0, sizeof(STARTUPINFO));
memset(&process, 0, sizeof(PROCESS_INFORMATION));
startup.cb = sizeof(STARTUPINFOW);
startup.cb = sizeof(STARTUPINFO);
startup.dwFlags = STARTF_USESTDHANDLES;
startup.hStdError = GetStdHandle(STD_ERROR_HANDLE);
@@ -574,28 +533,19 @@ TSRM_API FILE *popen_ex(const char *command, const char *type, const char *cwd,
}
}
envw = php_win32_cp_env_any_to_w(env);
if (envw) {
dwCreateFlags |= CREATE_UNICODE_ENVIRONMENT;
} else {
if (env) {
free(cmd);
free(cmdw);
free(cwdw);
return NULL;
}
cmd = (char*)malloc(strlen(command)+strlen(TWG(comspec))+sizeof(" /c ")+2);
if (!cmd) {
return NULL;
}
sprintf(cmd, "%s /c \"%s\"", TWG(comspec), command);
if (asuser) {
res = CreateProcessAsUserW(token_user, NULL, cmdw, &security, &security, security.bInheritHandle, dwCreateFlags, envw, cwdw, &startup, &process);
res = CreateProcessAsUser(token_user, NULL, cmd, &security, &security, security.bInheritHandle, dwCreateFlags, env, cwd, &startup, &process);
CloseHandle(token_user);
} else {
res = CreateProcessW(NULL, cmdw, &security, &security, security.bInheritHandle, dwCreateFlags, envw, cwdw, &startup, &process);
res = CreateProcess(NULL, cmd, &security, &security, security.bInheritHandle, dwCreateFlags, env, cwd, &startup, &process);
}
free(cmd);
free(cmdw);
free(cwdw);
free(envw);
if (!res) {
return NULL;
@@ -730,7 +680,10 @@ TSRM_API void *shmat(int key, const void *shmaddr, int flags)
if (NULL == shm->addr) {
int err = GetLastError();
SET_ERRNO_FROM_WIN32_CODE(err);
/* Catch more errors */
if (ERROR_NOT_ENOUGH_MEMORY == err) {
_set_errno(ENOMEM);
}
return (void*)-1;
}
@@ -811,17 +764,10 @@ TSRM_API int win32_utime(const char *filename, struct utimbuf *buf) /* {{{ */
{
FILETIME mtime, atime;
HANDLE hFile;
PHP_WIN32_IOUTIL_INIT_W(filename)
if (!pathw) {
return -1;
}
hFile = CreateFileW(pathw, GENERIC_WRITE, FILE_SHARE_WRITE|FILE_SHARE_READ, NULL,
hFile = CreateFile(filename, GENERIC_WRITE, FILE_SHARE_WRITE|FILE_SHARE_READ, NULL,
OPEN_ALWAYS, FILE_FLAG_BACKUP_SEMANTICS, NULL);
PHP_WIN32_IOUTIL_CLEANUP_W()
/* OPEN_ALWAYS mode sets the last error to ERROR_ALREADY_EXISTS but
the CreateFile operation succeeds */
if (GetLastError() == ERROR_ALREADY_EXISTS) {
+747 -423
View File
File diff suppressed because it is too large. Load diff
+281 -48
View File
@@ -1,10 +1,25 @@
PHP 7.1 INTERNALS UPGRADE NOTES
PHP 7.0 INTERNALS UPGRADE NOTES
0. Wiki Examples
1. Internal API changes
e. Codepage handling on Windows
f. Path handling on Windows
g. SAPI logging
e. New data types
f. zend_parse_parameters() specs
g. sprintf() formats
h. HashTable API
i. New portable macros for large file support
j. New portable macros for integers
k. get_class_entry object handler info
l. get_class_name object handler info
m. Other portable macros info
n. ZEND_ENGINE_2 removal
o. Updated final class modifier
p. TSRM changes
q. gc_collect_cycles() is now hookable
r. PDO uses size_t for lengths
s. Resource API changes
t. Optimized strings concatenation.
u. Streams changes
v. Sort algorithm changes
2. Build system changes
a. Unix build system changes
@@ -24,56 +39,218 @@ changes. See: https://wiki.php.net/phpng-upgrading
1. Internal API changes
========================
e. Codepage handling on Windows
e. New data types
String
Besides the old way of accepting the strings with 's', the new 'S' ZPP spec
was introduced. It expects an argument of the type zend_string *. String lengths
in it are bound to the size_t datatype.
Integer types
Integers do no more depend on the firm 'long' type. Instead a platform
dependent integer type is used, it is called zend_long. That datatype is
defined dynamically to guarantee the consistent 64 bit support. The zval
field representing user land integer it bound to zend_long.
Signed integer is defined as zend_long, unsigned integer as zend_ulong
inside Zend.
Other datatypes
zend_off_t - portable off_t analogue
zend_stat_t - portable 'struct stat' analogue
These datatypes are declared to be portable across platforms. Thus, direct
usage of the functions like fseek, stat, etc. as well as direct usage of
off_t and struct stat is strongly not recommended. Instead the portable
macros should be used.
zend_fseek - portable fseek equivalent
zend_ftell - portable ftell equivalent
zend_lseek - portable lseek equivalent
zend_fstat - portable fstat equivalent
zend_stat - portable stat equivalent
f. zend_parse_parameters() specs
The new spec 'S' introduced, which expects an argument of type zend_string *.
The 'l' spec expects a parameter of the type zend_long, not long anymore.
The 's' spec expects parameters of the type char * and size_t, no int anymore.
g. sprintf() formats
New printf modifier 'p' was implemented to platform independently output zend_long,
zend_ulong and php_size_t datatypes. That modifier can be used with 'd', 'u', 'x' and 'o'
printf format specs with spprintf, snprintf and the wrapping printf implementations.
%pu is sufficient for both zend_ulong and php_size_t. the code using %p spec to output
pointer address might need to be enclosed into #ifdef when it unlickily followed by 'd',
'u', 'x' or 'o'.
The only exceptions are the snprintf and zend_sprintf functions yet, because in some cases
they can use the implemenations available on the system, not the PHP one. With snprintf the
macros ZEND_LONG_FMT and ZEND_ULONG_FMT should be used.
h. HashTable API
Datatype for array indexes was changed to zend_ulong, for string keys to zend_string *.
i. New portable macros for large file support
Function(s) Alias Comment
stat, _stat64 zend_stat for use with zend_stat_t
fstat, _fstat64 zend_fstat for use with zend_stat_t
lseek, _lseeki64 zend_lseek for use with zend_off_t
ftell, _ftelli64 zend_ftell for use with zend_off_t
fseek, _fseeki64 zend_fseek for use with zend_off_t
j. New portable macros for integers
Function(s) Alias Comment
snprintf with "%ld" or "%lld", _ltoa_s, _i64toa_s ZEND_LTOA for use with zend_long
atol, atoll, _atoi64 ZEND_ATOL for use with zend_long
strtol, strtoll, _strtoi64 ZEND_STRTOL for use with zend_long
strtoul, strtoull, _strtoui64 ZEND_STRTOUL for use with zend_long
abs, llabs, _abs64 ZEND_ABS for use with zend_long
- ZEND_LONG_MAX replaces LONG_MAX where appropriate
- ZEND_LONG_MIN replaces LONG_MIN where appropriate
- ZEND_ULONG_MAX replaces ULONG_MAX where appropriate
- SIZEOF_ZEND_LONG reworked SIZEOF_ZEND_LONG representing the size of zend_long datatype
- ZEND_SIZE_MAX Max value of size_t
- Z_L casts an integral constant to zend_long
- Z_UL casts an integral constant to zend_ulong
The macro ZEND_ENABLE_ZVAL_LONG64 reveals whether zval operates on 64 or 32 bit integer.
k. The get_class_entry object handler is no longer available. Instead
zend_object.ce is always used.
l. The get_class_name object handler is now only used for displaying class
names in debugging functions like var_dump(). It is no longer used in
get_class(), get_parent_class() or similar.
The handler is now obligatory, no longer accepts a `parent` argument and
must return a non-NULL zend_string*, which will be released by the caller.
m. Other portable macros info
ZEND_SECURE_ZERO - zeroes chunk of memory
ZEND_VALID_SOCKET - validates a php_socket_t variable
ZEND_FASTCALL is defined to use __vectorcall convention on VS2013 and above
ZEND_NORETURN is defined as __declspec(noreturn) on VS
n. The ZEND_ENGINE_2 macro has been removed. A ZEND_ENGINE_3 macro has been added.
o. Removed ZEND_ACC_FINAL_CLASS in favour of ZEND_ACC_FINAL, turning final class
modifier now a different class entry flag. Update your extensions.
p. TSRM changes
The TSRM layer undergone significant changes. It is not necessary anymore to
pass the tsrm_ls pointer explicitly. The TSRMLS_* macros should not be used
in any new developments.
The recommended way accessing globals in TS builds is by implementing it
to use a local thread unique pointer to the corresponding data pool. These
are the new macros that serve to achieve this goal:
- ZEND_TSRMG - based on TSRMG and if static pointer for data pool access is
implemented, will use it
- ZEND_TSRMLS_CACHE_EXTERN - to be used in a header shared across multiple
C/C++ files
- ZEND_TSRMLS_CACHE_DEFINE - to be used in the main extension C/C++ file
- ZEND_TSRMLS_CACHE_UPDATE - to be integrated at the top of the globals
ctor or RINIT function
- ZEND_ENABLE_STATIC_TSRMLS_CACHE - to be used in the config.[m4|w32] for
enabling the globals access per thread unique pointer
- TSRMLS_CACHE - expands to the variable name which links to the thread
unique data pool
Note that usually it will work without implementing the globals access per
a thread unique pointer, however it might cause a slowdown. The reason is
that the access model to the extension/SAPI own globals as well as the
access to the core globals is determined in the compilation phase depending
on whether ZEND_ENABLE_STATIC_TSRMLS_CACHE macro is defined.
Due to the current compiler evolution state, the TSRMLS_CACHE pointer
(when implemented) has to be present and updated in every binary unit which
is not compiled statically into PHP. So any DLL, DSO, EXE, etc. has to take
care about defining and updating it's TSRMLS cache. An update should happen
before any globals was accessed.
Porting an extension or SAPI is usually as easy as removing all the TSRMLS_*
occurrences and integrating the macros mentioned above. However if tsrm_ls
is used explicitly, its usage can be considered obsolete in most cases.
Additionally, if an extension triggers its own threads, TSRMLS_CACHE shouldn't
be passed to that threads directly.
When working with CTOR/DTOR for the extension globals, only the data passed
as parameters should be touched. For example, don't use code like
free(MYEXT_G(vars)); inside globals destructor, as it possibly can destroy
the data from a wrong thread. Instead use the pointer to the data delivered
into the destructor. So the previous example could look like
free(my_struct->vars); given the income was casted to (struct my_struct *).
A new macro was introduced to simplify the declaration to the extension
globals. A simplified declaration looks as follows
#define MYEXT_G(v) ZEND_MODULE_GLOBALS_ACCESSOR(myext, v)
Another new macro ZEND_MODULE_GLOBALS_BULK(myext) delivers the corresponding
globals struct as a whole.
Two new storage specifiers was introduced.
ZEND_EXT_TLS - expand to an appropriate thread specific storage specifier in
the thread safe build, expands to empty in a non thread safe
build.
ZEND_TLS - expands to an appropriate thread specific storage specifier
with static visibility in the thread safe build, expands to
static specifier in a non thread safe build.
A set of new APIs was introduced, which allows to handle codepage
conversions. The corresponding prototypes and macros are contained
in win32/codepage.h.
Variables declared with these storage specifiers can not be shared across
threads. While ZEND_TLS enforces the local scope visibility, ZEND_EXT_TLS
pertains to the visiblity across several compilation units. In both cases,
there's no portable way to achieve the visibility across shared objects.
Thus, these specifiers are not compatible with ZEND_API and PHPAPI specifiers.
Functions with php_win32_cp_* signatures provide handling for various
codepage aspects. Primarily they are in use at various places in the
I/O utils code and directly in the core where necessary, providing
conversions to/from UTF-16. Arbitrary conversions between codepages
are possible as well, whereby UTF-16 will be always an intermediate
state in this case.
q. gc_collect_cycles() is now a function pointer, and can be replaced in the
same manner as zend_execute_ex() if needed (for example, to include the
time spent in the garbage collector in a profiler). The default
implementation has been renamed to zend_gc_collect_cycles(), and is
exported with ZEND_API.
For input length arguments, the macro PHP_WIN32_CP_IGNORE_LEN can be
passed, then the API will calculate the length. For output length
arguments, the macro PHP_WIN32_CP_IGNORE_LEN_P can be passed, then
the API won't set the output length.
r. In accordance with general use of size_t as string length, all PDO API
functions now use size_t for string length.
The mapping between encodings and codepages is provided by the predefined
array of data contained in win32/cp_enc_map.c. To change the data,
a generator win32/cp_enc_map_gen.c needs to be edited and run.
s. Removed ZEND_REGISTER/FETCH_RESOURCE, use zend_fetch_resource and
and zend_register_resource instead, zend_fetch_resource accepts a zend_resource *
as first argument, if you still need to fetch a resource from zval, use
zend_fetch_resource_ex. More details can be found in Zend/zend_list.c.
f. Path handling on Windows
t. Optimized strings concatenation.
ZEND_ADD_STRING/VAR/CHAR are replaced with ZEND_ROPE_INIT, ZEND_ROPE_ADD,
ZEND_ROPE_END.
Instead of reallocation and copying string on each ZEND_ADD_STRING/VAR/CAHR,
collect all the strings and then allocate and construct the resulting string once.
A set of new APIs was introduced, which allows to handle UTF-8 paths. The
corresponding prototypes and macros are contained in win32/ioutil.h.
u. Streams changes
- It is possible to do blocking reads on Windows pipes. It can be done either
using context stream option PHP_STREAM_OPTION_PIPE_BLOCKING or
adding STREAM_USE_BLOCKING_PIPE when opening the stream.
Functions with php_win32_ioutil_* signatures provide POSIX I/O analogues.
These functions are integrated in various places across the code base to
support Unicode filenames. While accepting char * arguments, internally
the conversion to wchar_t * happens. Internally almost no ANSI APIs are
used, but directly their wide equivalents. The string conversion rules
correspond to those already present in the core and depend on the current
encoding settings. Doing so allows to move away from the ANSI Windows API
with its dependency on the system OEM/ANSI codepage.
Thanks to the wide API usage, the long paths are now supported as well. The
PHP_WIN32_IOUTIL_MAXPATHLEN macro is defined to 2048 bytes and will override
the MAXPATHLEN in files where the header is included.
The most optimal use case for scripts is utilizing UTF-8 for any I/O
related functions. UTF-8 filenames are supported on any system disregarding
the system OEM/ANSI codepage.
g. SAPI logging
The log_message callback in the SAPI struct was extended with the severity
argument. This allows SAPI modules to implement mapping between PHP and
corresponding server error levels. A reference mapping implementation
can be found in apache2handler.
v. Sort algorithm changes
- Improved zend_qsort(using hybrid sorting algo) for better performance,
and also renamed zend_qsort to zend_sort.
- Added stable sorting algo zend_insert_sort.
w. Tick functions internal API change
Tick functions have different declaration now. They expect a single
parameter while before they were parameterless. When registering the
tick function a value for this parameter must be passed. This value will be
provided to the tick function on every execution.
========================
2. Build system changes
@@ -82,10 +259,66 @@ changes. See: https://wiki.php.net/phpng-upgrading
a. Unix build system changes
b. Windows build system changes
Static analysis with clang and Cppcheck is supported by passing "clang" or
"cppcheck" keyword to the --with-analyzer configure option.
- Besides Visual Studio, building with Clang or Intel Composer is now
possible. To enable an alternative toolset, add the option
--with-toolset=[vs,clang,icc] to the configure line. The default
toolset is vs. Still clang or icc need the correct environment
which involves many tools from the vs toolset.
The toolset option is supported by phpize as well.
AWARENESS The only recommended and supported toolset to produce production
ready binaries is Visual Studio. Still other compilers can be used now for
testing and analyzing purposes.
- configure.js now produces response files which are passed to the linker
and library manager. This solves the issues with the long command lines
which can exceed the OS limit.
- with clang toolset, an option --with-uncritical-warn-choke is available,
which suppresses the most frequent false positive warnings
- the --with-mp option will by default utilize all the available cores. It's
enabled by default for release builds and can be disabled with the special
"disable" keyword.
========================
3. Module changes
========================
Session:
- PS_MOD_UPDATE_TIMESTAMP() session save handler definition is added. New
save handler should use PS_MOD_UPDATE_TIMESTAMP() definition. Save handler
must not refer/change PS() variables directly from save handler. Use
parameters.
- PS_MOD()/PS_MOD_SID() macro exist only for transition. Beware these
save handlers are less secure and slower than PS_MOD_UPDATE_TIMESTAMP().
- PS(invalid_session_id) was removed. It was never worked as it supposed.
To report invalid session ID, use PS_VALIDATE_SID() handler.
- PS_VALIDATE_SID() defines session ID validation handler. This handler
must validate if requested session ID exists in session data storage or not.
Do not access PS(id) directly, but use this handler and it's parameter.
- PS_UPDATE_TIMESTAMP() defines timestamp updating handler. This handler
must update session data timestamp for GC if it is needed. e.g. Memcache
updates timestamp on read, so it does not need to update timestamp. Return
SUCCESS simply for this case.
- PS_CREATE_SID() should check session ID collision. Return NULL for failure.
- More documentation can be found in ext/session/mod_files.c as comments.
mod_files.c may be used as reference implementation.
Openssl:
- several ext/openssl functions require the inclusion of the applink shim
as documented in the OpenSSL FAQ https://www.openssl.org/support/faq.html#PROG2
to properly work on Windows. While this primarily affects the OpenSSL
functionality, the shim needs to be included into the executable file
which loads the extension DLL, not into the extension DLL itself. Alternatively
it can be compiled and linked with the main program as a separate object file.
More information and explanation in the linked OpenSSL FAQ.
Thus, this primarily affects any WAMP or other redistributions bundling the
official PHP release zipballs or building from sources. The applink shim is
already integrated with all the PHP executables from the official distribution
starting with 7.0.0beta1.
+2 -2
View File
@@ -370,10 +370,10 @@ AC_CHECK_FUNCS(mremap)
AC_ARG_ENABLE(zend-signals,
[ --disable-zend-signals whether to enable zend signal handling],[
[ --enable-zend-signals Use zend signal handling],[
ZEND_SIGNALS=$enableval
],[
ZEND_SIGNALS=yes
ZEND_SIGNALS=no
])
AC_CHECK_FUNC(sigaction, [
+8 -13
View File
@@ -17,20 +17,11 @@ function test3($a, $b) {
test1();
test2(1);
try {
test2();
} catch (Throwable $e) {
echo "Exception: " . $e->getMessage() . "\n";
}
test2();
test3(1,2);
call_user_func("test1");
try {
call_user_func("test3", 1);
} catch (Throwable $e) {
echo "Exception: " . $e->getMessage() . "\n";
}
call_user_func("test3", 1);
call_user_func("test3", 1, 2);
class test {
@@ -47,10 +38,14 @@ echo "Done\n";
--EXPECTF--
int(0)
int(1)
Exception: Too few arguments to function test2(), 0 passed in %s001.php on line 18 and exactly 1 expected
Warning: Missing argument 1 for test2(), called in %s on line %d
int(0)
int(2)
int(0)
Exception: Too few arguments to function test3(), 1 passed in %s001.php on line 27 and exactly 2 expected
Warning: Missing argument 2 for test3()%s
int(1)
int(2)
int(1)
+19 -12
View File
@@ -23,19 +23,11 @@ function test3($a, $b) {
test1();
test1(10);
test2(1);
try {
test2();
} catch (Throwable $e) {
echo "Exception: " . $e->getMessage() . "\n";
}
test2();
test3(1,2);
call_user_func("test1");
try {
call_user_func("test3", 1);
} catch (Throwable $e) {
echo "Exception: " . $e->getMessage() . "\n";
}
call_user_func("test3", 1);
call_user_func("test3", 1, 2);
class test {
@@ -70,7 +62,14 @@ int(1)
Warning: func_get_arg(): Argument 1 not passed to function in %s on line %d
bool(false)
Exception: Too few arguments to function test2(), 0 passed in %s002.php on line %d and exactly 1 expected
Warning: Missing argument 1 for test2(), called in %s on line %d and defined in %s on line %d
Warning: func_get_arg(): Argument 0 not passed to function in %s on line %d
bool(false)
Warning: func_get_arg(): Argument 1 not passed to function in %s on line %d
bool(false)
int(1)
int(2)
@@ -85,7 +84,15 @@ bool(false)
Warning: func_get_arg(): Argument 1 not passed to function in %s on line %d
bool(false)
Exception: Too few arguments to function test3(), 1 passed in %s002.php on line %d and exactly 2 expected
Warning: Missing argument 2 for test3()%s
int(1)
Warning: func_get_arg(): Argument 1 not passed to function in %s on line %d
bool(false)
Warning: func_get_arg(): Argument 2 not passed to function in %s on line %d
bool(false)
int(1)
int(2)
+12 -12
View File
@@ -18,19 +18,11 @@ function test3($a, $b) {
test1();
test1(10);
test2(1);
try {
test2();
} catch (Throwable $e) {
echo "Exception: " . $e->getMessage() . "\n";
}
test2();
test3(1,2);
call_user_func("test1");
try {
call_user_func("test3", 1);
} catch (Throwable $e) {
echo "Exception: " . $e->getMessage() . "\n";
}
call_user_func("test3", 1);
call_user_func("test3", 1, 2);
class test {
@@ -55,7 +47,10 @@ array(1) {
[0]=>
int(1)
}
Exception: Too few arguments to function test2(), 0 passed in %s003.php on line %d and exactly 1 expected
Warning: Missing argument 1 for test2(), called in %s on line %d and defined in %s on line %d
array(0) {
}
array(2) {
[0]=>
int(1)
@@ -64,7 +59,12 @@ array(2) {
}
array(0) {
}
Exception: Too few arguments to function test3(), 1 passed in %s003.php on line %d and exactly 2 expected
Warning: Missing argument 2 for test3()%s
array(1) {
[0]=>
int(1)
}
array(2) {
[0]=>
int(1)
+37 -1
View File
@@ -31,4 +31,40 @@ $test->bar();
?>
--EXPECTF--
Fatal error: Cannot re-assign $this in %s030.php on line 11
object(Exception)#%d (7) {
["message":protected]=>
string(3) "foo"
["string":"Exception":private]=>
string(0) ""
["code":protected]=>
int(0)
["file":protected]=>
string(%d) "%s030.php"
["line":protected]=>
int(%d)
["trace":"Exception":private]=>
array(1) {
[0]=>
array(6) {
["file"]=>
string(%d) "%s030.php"
["line"]=>
int(%d)
["function"]=>
string(3) "bar"
["class"]=>
string(3) "foo"
["type"]=>
string(2) "->"
["args"]=>
array(0) {
}
}
}
["previous":"Exception":private]=>
NULL
}
'test' => '0'
'test_2' => '1'
'test_3' => '2'
ok
-8
View File
@@ -38,19 +38,11 @@ var_dump($c);
echo "Done\n";
?>
--EXPECTF--
Warning: A non-numeric value encountered in %s on line %d
int(75636)
Notice: A non well formed numeric value encountered in %s on line %d
int(951858)
int(48550510)
float(75661.68)
Warning: A non-numeric value encountered in %s on line %d
int(75636)
Notice: A non well formed numeric value encountered in %s on line %d
int(951858)
int(48550510)
float(75661.68)
-5
View File
@@ -19,13 +19,8 @@ var_dump($c);
echo "Done\n";
?>
--EXPECTF--
Warning: A non-numeric value encountered in %s on line %d
Exception: Unsupported operand types
Warning: A non-numeric value encountered in %s on line %d
Fatal error: Uncaught Error: Unsupported operand types in %s:%d
Stack trace:
#0 {main}
-15
View File
@@ -1,15 +0,0 @@
--TEST--
closure binding to anonymous class
--FILE--
<?php
$class = new class {};
$foo = function() {
return $this;
};
$closure = Closure::bind($foo, $class, $class);
var_dump($closure());
?>
--EXPECTF--
object(class@anonymous)#1 (0) {
}
-16
View File
@@ -1,16 +0,0 @@
--TEST--
anonymous class trait binding
--FILE--
<?php
trait TaskTrait {
function run() {
return 'Running...';
}
}
$class = new class() {
use TaskTrait;
};
var_dump($class->run());
?>
--EXPECTF--
string(10) "Running..."
+1 -1
View File
@@ -154,7 +154,7 @@ Warning: assert(): assert(0 && ($a = function () {
$x = $a ? $b : $c;
$x = $a ?: $c;
$x = $a ?? $b;
[$a, $b, $c] = [1, 2 => 'x', 'z' => 'c'];
list($a, $b, $c) = [1, 2 => 'x', 'z' => 'c'];
@foo();
$y = clone $x;
yield 1 => 2;
@@ -1,19 +0,0 @@
--TEST--
Misoptimization when variable is modified by assert()
--INI--
zend.assertions=1
--FILE--
<?php
function test() {
$i = 0;
assert('$i = new stdClass');
$i += 1;
var_dump($i);
}
test();
?>
--EXPECTF--
Notice: Object of class stdClass could not be converted to int in %s on line %d
int(2)
@@ -1,56 +0,0 @@
--TEST--
Various null return conditions of dim/obj assignments
--FILE--
<?php
function test() {
$array = [PHP_INT_MAX => 42];
$true = true;
var_dump($array[] = 123);
var_dump($array[[]] = 123);
var_dump($array[new stdClass] = 123);
var_dump($true[123] = 456);
var_dump($array[] += 123);
var_dump($array[[]] += 123);
var_dump($array[new stdClass] += 123);
var_dump($true[123] += 456);
var_dump($true->foo = 123);
var_dump($true->foo += 123);
}
test();
?>
--EXPECTF--
Warning: Cannot add element to the array as the next element is already occupied in %s on line %d
NULL
Warning: Illegal offset type in %s on line %d
NULL
Warning: Illegal offset type in %s on line %d
NULL
Warning: Cannot use a scalar value as an array in %s on line %d
NULL
Warning: Cannot add element to the array as the next element is already occupied in %s on line %d
NULL
Warning: Illegal offset type in %s on line %d
NULL
Warning: Illegal offset type in %s on line %d
NULL
Warning: Cannot use a scalar value as an array in %s on line %d
NULL
Warning: Attempt to assign property of non-object in %s on line %d
NULL
Warning: Attempt to assign property of non-object in %s on line %d
NULL
+2 -9
View File
@@ -6,16 +6,9 @@ $a = new stdClass();
$x = "";
$a->$x = "string('')";
var_dump($a);
$a->{"\0"} = 42;
var_dump($a);
?>
--EXPECTF--
object(stdClass)#1 (1) {
[""]=>
string(10) "string('')"
}
Fatal error: Uncaught Error: Cannot access property started with '\0' in %s:%d
Fatal error: Uncaught Error: Cannot access empty property in %sbug29015.php:4
Stack trace:
#0 {main}
thrown in %s on line %d
thrown in %sbug29015.php on line 4
-29
View File
@@ -1,29 +0,0 @@
--TEST--
Bug #29368.1 (The destructor is called when an exception is thrown from the constructor).
--FILE--
<?php
function throwme($arg)
{
throw new Exception;
}
class foo {
function __construct() {
echo "Inside constructor\n";
throwme($this);
}
function __destruct() {
echo "Inside destructor\n";
}
}
try {
$bar = new foo;
} catch(Exception $exc) {
echo "Caught exception!\n";
}
?>
--EXPECT--
Inside constructor
Caught exception!
+1 -1
View File
@@ -3,7 +3,7 @@ Bug #29883 (isset gives invalid values on strings)
--FILE--
<?php
$x = "bug";
var_dump(isset($x[-10]));
var_dump(isset($x[-1]));
var_dump(isset($x["1"]));
echo $x["1"]."\n";
?>
+1 -1
View File
@@ -18,7 +18,7 @@ var_dump(isset($a['b']));
$simpleString = "Bogus String Text";
echo isset($simpleString->wrong)?"bug\n":"ok\n";
echo isset($simpleString["wrong"])?"bug\n":"ok\n";
echo isset($simpleString[-20])?"bug\n":"ok\n";
echo isset($simpleString[-1])?"bug\n":"ok\n";
echo isset($simpleString[0])?"ok\n":"bug\n";
echo isset($simpleString["0"])?"ok\n":"bug\n";
echo isset($simpleString["16"])?"ok\n":"bug\n";
+9 -13
View File
@@ -19,19 +19,15 @@ function NormalTest($a)
echo "Hi!";
}
try {
NormalTest();
} catch (Throwable $e) {
echo "Exception: " . $e->getMessage() . "\n";
}
try {
FooTest();
} catch (Throwable $e) {
echo "Exception: " . $e->getMessage() . "\n";
}
NormalTest();
FooTest();
FooTest(new Foo());
?>
--EXPECTF--
Exception: Too few arguments to function NormalTest(), 0 passed in %sbug33996.php on line 18 and exactly 1 expected
Exception: Too few arguments to function FooTest(), 0 passed in %sbug33996.php on line 23 and exactly 1 expected
Hello!
Warning: Missing argument 1 for NormalTest(), called in %sbug33996.php on line %d and defined in %sbug33996.php on line %d
Hi!
Fatal error: Uncaught TypeError: Argument 1 passed to FooTest() must be an instance of Foo, none given, called in %sbug33996.php on line %d and defined in %sbug33996.php:%d
Stack trace:
#0 %s(%d): FooTest()
#1 {main}
thrown in %sbug33996.php on line %d
+4 -6
View File
@@ -43,9 +43,7 @@ Non-static method A::A_ftk() should not be called statically
1 %sbug38047.php:13 get_error_context()
2 %sbug38047.php:36 kalus_error_handler()
Fatal error: Uncaught ArgumentCountError: Too few arguments to function A::A_ftk(), 0 passed in %sbug38047.php on line 36 and exactly 1 expected in %sbug38047.php:7
Stack trace:
#0 %sbug38047.php(36): A::A_ftk()
#1 {main}
thrown in %sbug38047.php on line 7
Missing argument 1 for A::A_ftk(), called in %sbug38047.php on line 36 and defined
1 %sbug38047.php:13 get_error_context()
2 %sbug38047.php:7 kalus_error_handler()
3 %sbug38047.php:36 A_ftk()
+1 -1
View File
@@ -9,7 +9,7 @@ $foo[0]->bar = "xyz";
echo "Done\n";
?>
--EXPECTF--
Fatal error: Uncaught Error: Cannot use string offset as an object in %s:%d
Fatal error: Uncaught Error: Cannot use string offset as an array in %s:%d
Stack trace:
#0 {main}
thrown in %s on line %d
+1 -1
View File
@@ -7,7 +7,7 @@ $b = &$a[1];
$b = "f";
echo $a;
--EXPECTF--
Fatal error: Uncaught Error: Cannot create references to/from string offsets in %sbug49866.php:3
Fatal error: Uncaught Error: Cannot create references to/from string offsets nor overloaded objects in %sbug49866.php:3
Stack trace:
#0 {main}
thrown in %sbug49866.php on line 3
+3 -3
View File
@@ -10,14 +10,14 @@ class A {
}
$a = new A();
$prop = "\0";
$prop = null;
unset($a->$prop);
?>
--EXPECTF--
Fatal error: Uncaught Error: Cannot access property started with '\0' in %s:%d
Fatal error: Uncaught Error: Cannot access empty property in %s:%d
Stack trace:
#0 %s(%d): A->__unset('\x00')
#0 %s(%d): A->__unset('')
#1 {main}
thrown in %s on line %d
+3 -3
View File
@@ -10,14 +10,14 @@ class A {
}
$a = new A();
$prop = "\0";
$prop = null;
$a->$prop = 2;
?>
--EXPECTF--
Fatal error: Uncaught Error: Cannot access property started with '\0' in %s:%d
Fatal error: Uncaught Error: Cannot access empty property in %s:%d
Stack trace:
#0 %s(%d): A->__set('\x00', 2)
#0 %s(%d): A->__set('', 2)
#1 {main}
thrown in %s on line %d
+3 -3
View File
@@ -10,14 +10,14 @@ class A {
}
$a = new A();
$prop = "\0";
$prop = null;
var_dump($a->$prop);
?>
--EXPECTF--
Fatal error: Uncaught Error: Cannot access property started with '\0' in %s:%d
Fatal error: Uncaught Error: Cannot access empty property in %s:%d
Stack trace:
#0 %s(%d): A->__get('\x00')
#0 %s(%d): A->__get('')
#1 {main}
thrown in %s on line %d
+1 -1
View File
@@ -8,7 +8,7 @@ class MyClass {
$this->myRef = $value;
}
}
$myGlobal=new MyClass();
$myGlobal=new MyClass($myGlobal);
$myGlobal->myRef=&$myGlobal;
$myGlobal->myNonExistentProperty="ok\n";
echo $myGlobal;
-65
View File
@@ -1,65 +0,0 @@
--TEST--
Bug #53432: Assignment via string index access on an empty string converts to array
--FILE--
<?php
$str = '';
var_dump($str[0] = 'a');
var_dump($str);
$str = '';
var_dump($str[5] = 'a');
var_dump($str);
$str = '';
var_dump($str[-1] = 'a');
var_dump($str);
$str = '';
var_dump($str['foo'] = 'a');
var_dump($str);
$str = '';
try {
var_dump($str[] = 'a');
} catch (Error $e) {
echo "Error: {$e->getMessage()}\n";
}
var_dump($str);
$str = '';
try {
var_dump($str[0] += 1);
} catch (Error $e) {
echo "Error: {$e->getMessage()}\n";
}
var_dump($str);
$str = '';
try {
var_dump($str[0][0] = 'a');
} catch (Error $e) {
echo "Error: {$e->getMessage()}\n";
}
var_dump($str);
?>
--EXPECTF--
string(1) "a"
string(1) "a"
string(1) "a"
string(6) " a"
Warning: Illegal string offset: -1 in %s on line %d
NULL
string(0) ""
Warning: Illegal string offset 'foo' in %s on line %d
string(1) "a"
string(1) "a"
Error: [] operator not supported for strings
string(0) ""
Error: Cannot use assign-op operators with string offsets
string(0) ""
Error: Cannot use string offset as an array
string(0) ""
+1 -1
View File
@@ -6,7 +6,7 @@ function f(callable $c) {}
f();
?>
--EXPECTF--
Fatal error: Uncaught ArgumentCountError: Too few arguments to function f(), 0 passed in %s on line 3 and exactly 1 expected in %s:2
Fatal error: Uncaught TypeError: Argument 1 passed to f() must be callable, none given, called in %s on line 3 and defined in %s:%d
Stack trace:
#0 %s(%d): f()
#1 {main}
-20
View File
@@ -1,20 +0,0 @@
--TEST--
Bug #62814: It is possible to stiffen child class members visibility
--FILE--
<?php
class A {
private function test() { }
}
class B extends A {
protected function test() { }
}
class C extends B {
private function test() { }
}
?>
--EXPECTF--
Fatal error: Access level to C::test() must be protected (as in class B) or weaker in %s on line %d
-2
View File
@@ -1,7 +1,5 @@
--TEST--
Bug #63734 (Garbage collector can free zvals that are still referenced)
--INI--
zend.enable_gc = 1
--FILE--
<?php
class C {
+3 -8
View File
@@ -57,13 +57,8 @@ $bar = foo3();
string(9) "not catch"
NULL
Fatal error: Uncaught Exception: not catched in %sbug65784.php:42
Fatal error: Uncaught Error: Class 'NotExists' not found in %sbug65784.php:%d
Stack trace:
#0 %sbug65784.php(52): foo3()
#0 %s(%d): foo3()
#1 {main}
Next Error: Class 'NotExists' not found in %sbug65784.php:46
Stack trace:
#0 %sbug65784.php(52): foo3()
#1 {main}
thrown in %sbug65784.php on line 46
thrown in %sbug65784.php on line %d
+3 -1
View File
@@ -13,4 +13,6 @@ $x = $c->test();
print_r($x);
unset($c, $x);
--EXPECTF--
Fatal error: Cannot unset $this in %sbug68370.php on line 4
Array
(
)
-1
View File
@@ -28,7 +28,6 @@ class Bar {
}
public function __destruct() {
if (!isset(self::$instance)) return;
Foo::getInstance();
}
}
-2
View File
@@ -1,7 +1,5 @@
--TEST--
Bug #69446 (GC leak relating to removal of nested data after dtors run)
--INI--
zend.enable_gc = 1
--FILE--
<?php
$bar = NULL;
-2
View File
@@ -1,7 +1,5 @@
--TEST--
Bug #69446 (GC leak relating to removal of nested data after dtors run)
--INI--
zend.enable_gc = 1
--FILE--
<?php
$bar = NULL;
-2
View File
@@ -1,7 +1,5 @@
--TEST--
Bug #69534 (Cycle leaks through declared properties on internal classes)
--INI--
zend.enable_gc = 1
--FILE--
<?php
class Node extends SplObjectStorage {
-22
View File
@@ -1,22 +0,0 @@
--TEST--
Bug #69676: Resolution of self::FOO in class constants not correct (variation)
--FILE--
<?php
class Foo {
const A = 'Foo::A';
const B = self::A . ' and ' . self::C;
const C = 'Foo::C';
}
class Bar extends Foo {
const A = 'Bar::A';
const C = 'Bar::C';
}
var_dump(Bar::B);
?>
--EXPECT--
string(17) "Foo::A and Foo::C"
-69
View File
@@ -1,69 +0,0 @@
--TEST--
Bug #69676: Resolution of self::FOO in class constants not correct (variation)
--FILE--
<?php
class P {
const N = 'P';
}
class A extends P {
const selfN = self::N;
const parentN = parent::N;
const N = 'A';
}
class B extends A {
const N = 'B';
}
var_dump(B::selfN); // A
var_dump(B::parentN); // P
class A2 {
const selfN = self::N;
const N = 'A2';
}
class B2 extends A2 {
const indSelfN = self::selfN;
const N = 'B2';
}
class C2 extends B2 {
const N = 'C2';
}
var_dump(C2::indSelfN); // A2
class A3 {
const selfN = self::N;
const N = 'A3';
}
class B3 extends A3 {
const exprSelfN = "expr" . self::selfN;
const N = 'B3';
}
class C3 extends B3 {
const N = 'C3';
}
var_dump(C3::exprSelfN); // exprA3
class A4 {
const selfN = self::N;
const N = 'A4';
}
class B4 extends A4 {
const N = 'B4';
public $prop = self::selfN;
}
class C4 extends B4 {
const N = 'C4';
}
var_dump((new C4)->prop); // A4
?>
--EXPECT--
string(1) "A"
string(1) "P"
string(2) "A2"
string(6) "exprA3"
string(2) "A4"
-42
View File
@@ -1,42 +0,0 @@
--TEST--
Collection of some cycles on unfinished generators
--FILE--
<?php
// CV
function gen1() {
$gen = yield;
yield;
}
$gen = gen1();
$gen->send($gen);
// This
class Test {
public $gen;
public function gen2() {
yield;
}
}
$test = new Test;
$test->gen = $test->gen2();
// Closure object
$gen3 = (function() use (&$gen3) {
yield;
})();
// Yield from array
function gen4() {
yield from [yield];
}
$gen = gen4();
$gen->send($gen);
?>
===DONE===
--EXPECT--
===DONE===
-44
View File
@@ -1,44 +0,0 @@
--TEST--
Generator cycle collection edge cases
--FILE--
<?php
// Extra args
function gen1() {
yield;
}
$obj = new stdClass;
$obj->gen = gen1($obj);
// Symtable
function gen2() {
$varName = 'a';
$$varName = yield;
yield;
}
$gen = gen2();
$gen->send($gen);
// Symtable indirect
function gen3() {
$varName = 'a';
$$varName = 42;
$var = yield;
yield;
}
$gen = gen3();
$gen->send($gen);
// Yield from root
function gen4() {
yield from yield;
}
$gen = gen4();
$gen2 = gen4($gen);
$gen2->send([1, 2, 3]);
$gen->send($gen2);
?>
===DONE===
--EXPECT--
===DONE===
+1 -1
View File
@@ -34,4 +34,4 @@ try {
string(36) "Cannot use string offset as an array"
string(27) "Cannot unset string offsets"
string(41) "Only variables can be passed by reference"
string(41) "Cannot increment/decrement string offsets"
string(64) "Cannot increment/decrement overloaded objects nor string offsets"
+20 -4
View File
@@ -53,27 +53,43 @@ string(3) "1st"
string(3) "2nd"
NULL
string(3) "4th"
array(3) {
array(4) {
[0]=>
string(3) "1st"
[1]=>
&string(3) "2nd"
[2]=>
NULL
[3]=>
string(3) "4th"
}
array(2) {
array(4) {
[0]=>
NULL
[1]=>
string(3) "2nd"
[2]=>
NULL
[3]=>
string(3) "4th"
}
array(2) {
array(4) {
[0]=>
NULL
[1]=>
&string(3) "2nd"
[2]=>
NULL
[3]=>
string(3) "4th"
}
array(1) {
array(4) {
[0]=>
NULL
[1]=>
NULL
[2]=>
NULL
[3]=>
string(3) "4th"
}
+1 -1
View File
@@ -15,7 +15,7 @@ var_dump($c);
?>
--EXPECTF--
Warning: Cannot bind method SplDoublyLinkedList::count() to object of class cls in %s on line %d
Warning: Cannot bind internal method SplDoublyLinkedList::count() to object of class cls in %s on line %d
NULL
Warning: Cannot rebind scope of closure created by ReflectionFunctionAbstract::getClosure() in %s on line %d
+1 -5
View File
@@ -19,8 +19,4 @@ try {
?>
--EXPECTF--
Fatal error: Uncaught ArgumentCountError: Too few arguments to function foo(), 0 passed in %sbug70689.php on line 12 and exactly 1 expected in %sbug70689.php:3
Stack trace:
#0 %sbug70689.php(12): foo()
#1 {main}
thrown in %sbug70689.php on line 3
Missing argument 1 for foo(), called in %sbug70689.php on line %d and defined
-2
View File
@@ -1,7 +1,5 @@
--TEST--
Bug #70805 (Segmentation faults whilst running Drupal 8 test suite) (Crash)
--INI--
zend.enable_gc = 1
--FILE--
<?php
class A {
-2
View File
@@ -1,7 +1,5 @@
--TEST--
Bug #70805 (Segmentation faults whilst running Drupal 8 test suite) (Memleak)
--INI--
zend.enable_gc = 1
--FILE--
<?php
class A {
-47
View File
@@ -1,47 +0,0 @@
--TEST--
Bug #70918 (Segfault using static outside of class scope)
--FILE--
<?php
try {
static::x;
} catch (Error $e) {
var_dump($e->getMessage());
}
try {
parent::x;
} catch (Error $e) {
var_dump($e->getMessage());
}
try {
self::x;
} catch (Error $e) {
var_dump($e->getMessage());
}
try {
new static;
} catch (Error $e) {
var_dump($e->getMessage());
}
try {
static::x();
} catch (Error $e) {
var_dump($e->getMessage());
}
try {
static::$i;
} catch (Error $e) {
var_dump($e->getMessage());
}
?>
--EXPECT--
string(52) "Cannot access static:: when no class scope is active"
string(52) "Cannot access parent:: when no class scope is active"
string(50) "Cannot access self:: when no class scope is active"
string(52) "Cannot access static:: when no class scope is active"
string(52) "Cannot access static:: when no class scope is active"
string(52) "Cannot access static:: when no class scope is active"
-13
View File
@@ -1,13 +0,0 @@
--TEST--
Bug #71196 (Memory leak with out-of-order live ranges)
--FILE--
<?php
try {
$a = "1";
[1, (y().$a.$a) . ($a.$a)];
} catch (Error $e) {
var_dump($e->getMessage());
}
?>
--EXPECT--
string(30) "Call to undefined function y()"
-22
View File
@@ -1,22 +0,0 @@
--TEST--
Bug #71266 (Missing separation of properties HT in foreach etc)
--FILE--
<?php
$one = 1;
$two = 2;
$arr = ['foo' => $one, 'bar' => $two];
$obj = (object) $arr;
foreach ($obj as $val) {
var_dump($val);
$obj->bar = 42;
}
$arr = ['foo' => $one, 'bar' => $two];
$obj = (object) $arr;
next($obj);
var_dump(current($arr));
?>
--EXPECT--
int(1)
int(42)
int(1)
+3 -1
View File
@@ -1,5 +1,7 @@
--TEST--
bug #71428.1: inheritance with null default values
--XFAIL--
This is a BC break
--FILE--
<?php
class A {
@@ -9,5 +11,5 @@ class B extends A {
public function m(array $a = []) {}
}
--EXPECTF--
Warning: Declaration of B::m(array $a = Array) should be compatible with A::m(?array $a = NULL) in %sbug71428.1.php on line 7
Warning: Declaration of B::m(array $a = Array) should be compatible with A::m(array $a = NULL) in %sbug71428.1.php on line 7
+3 -1
View File
@@ -1,5 +1,7 @@
--TEST--
bug #71428: Validation type inheritance with = NULL
--XFAIL--
This is a BC break
--FILE--
<?php
class A { }
@@ -7,5 +9,5 @@ class B { public function m(A $a = NULL, $n) { echo "B.m";} };
class C extends B { public function m(A $a , $n) { echo "C.m";} };
?>
--EXPECTF--
Warning: Declaration of C::m(A $a, $n) should be compatible with B::m(?A $a, $n) in %sbug71428.3.php on line 4
Warning: Declaration of C::m(A $a, $n) should be compatible with B::m(A $a = NULL, $n) in %sbug71428.3.php on line 4
-16
View File
@@ -1,16 +0,0 @@
--TEST--
Bug #71539 (Memory error on $arr[$a] =& $arr[$b] if RHS rehashes)
--FILE--
<?php
$array = [];
$array[0] =& $array[''];
$array[0] = 42;
var_dump($array);
?>
--EXPECT--
array(2) {
[""]=>
&int(42)
[0]=>
&int(42)
}
-30
View File
@@ -1,30 +0,0 @@
--TEST--
Bug #71539.1 (Memory error on $arr[$a] =& $arr[$b] if RHS rehashes)
--FILE--
<?php
$x = (object)['a'=>1,'b'=>2,'c'=>3,'d'=>4,'e'=>5,'f'=>6,'g'=>7];
$x->h =& $x->i;
$x->h = 42;
var_dump($x);
?>
--EXPECT--
object(stdClass)#1 (9) {
["a"]=>
int(1)
["b"]=>
int(2)
["c"]=>
int(3)
["d"]=>
int(4)
["e"]=>
int(5)
["f"]=>
int(6)
["g"]=>
int(7)
["i"]=>
&int(42)
["h"]=>
&int(42)
}
-30
View File
@@ -1,30 +0,0 @@
--TEST--
Bug #71539.2 (Memory error on $arr[$a] =& $arr[$b] if RHS rehashes)
--FILE--
<?php
$a = [0,1,2,3,4,5,6];
$a[200] =& $a[100];
$a[100] =42;
var_dump($a);
?>
--EXPECT--
array(9) {
[0]=>
int(0)
[1]=>
int(1)
[2]=>
int(2)
[3]=>
int(3)
[4]=>
int(4)
[5]=>
int(5)
[6]=>
int(6)
[100]=>
&int(42)
[200]=>
&int(42)
}
-19
View File
@@ -1,19 +0,0 @@
--TEST--
Bug #71539.3 (Memory error on $arr[$a] =& $arr[$b] if RHS rehashes)
--FILE--
<?php
$array = [];
$array[0][0] =& $array[''];
$array[0][0] = 42;
var_dump($array);
?>
--EXPECT--
array(2) {
[""]=>
&int(42)
[0]=>
array(1) {
[0]=>
&int(42)
}
}
-19
View File
@@ -1,19 +0,0 @@
--TEST--
Bug #71539.4 (Memory error on $arr[$a] =& $arr[$b] if RHS rehashes)
--FILE--
<?php
$array = [0=>[]];
$array[0][0] =& $array[0][''];
$array[0][0] = 42;
var_dump($array);
?>
--EXPECT--
array(1) {
[0]=>
array(2) {
[""]=>
&int(42)
[0]=>
&int(42)
}
}
-19
View File
@@ -1,19 +0,0 @@
--TEST--
Bug #71539.5 (Memory error on $arr[$a] =& $arr[$b] if RHS rehashes)
--FILE--
<?php
$array = [];
$array['']->prop =& $array[0];
$array[0] = 42;
var_dump($array);
?>
--EXPECT--
array(2) {
[0]=>
&int(42)
[""]=>
object(stdClass)#1 (1) {
["prop"]=>
&int(42)
}
}
-15
View File
@@ -1,15 +0,0 @@
--TEST--
Bug #71539.5 (Memory error on $arr[$a] =& $arr[$b] if RHS rehashes)
--FILE--
<?php
$name = 'a';
for ($i = 0; $i < 100000; $i++) {
if ($name != 'i') {
$$name =& $GLOBALS;
}
$name++;
}
?>
OK
--EXPECT--
OK
-27
View File
@@ -1,27 +0,0 @@
--TEST--
Bug #71572: String offset assignment from an empty string inserts null byte
--FILE--
<?php
$str = "abc";
var_dump($str{0} = "");
var_dump($str{1} = "");
var_dump($str{3} = "");
var_dump($str{10} = "");
var_dump($str);
?>
==DONE==
--EXPECTF--
Warning: Cannot assign an empty string to a string offset in %s on line %d
NULL
Warning: Cannot assign an empty string to a string offset in %s on line %d
NULL
Warning: Cannot assign an empty string to a string offset in %s on line %d
NULL
Warning: Cannot assign an empty string to a string offset in %s on line %d
NULL
string(3) "abc"
==DONE==
-30
View File
@@ -1,30 +0,0 @@
--TEST--
Bug #71818 (Memory leak when array altered in destructor)
--INI--
zend.enable_gc = 1
--FILE--
<?php
class MemoryLeak
{
public function __construct()
{
$this->things[] = $this;
}
public function __destruct()
{
$this->things[] = null;
}
private $things = [];
}
ini_set('memory_limit', '10M');
for ($i = 0; $i < 100000; ++$i) {
$obj = new MemoryLeak();
}
echo "OK\n";
?>
--EXPECT--
OK
-14
View File
@@ -1,14 +0,0 @@
--TEST--
Bug #72107: Segfault when using func_get_args as error handler
--FILE--
<?php
set_error_handler('func_get_args');
function test($a) {
echo $undef;
}
test(1);
?>
--EXPECTF--
Warning: Cannot call func_get_args() dynamically in %s on line %d
Notice: Undefined variable: undef in %s on line %d
+2 -3
View File
@@ -14,6 +14,5 @@ class Hello implements Foo {
}
echo "OK\n";
?>
--EXPECTF--
Fatal error: Declaration of Hello::bar(array $baz = Array) must be compatible with Foo::bar(?array $baz = NULL) in %s on line %d
--EXPECT--
OK
+1 -1
View File
@@ -7,4 +7,4 @@ $var11 = new StdClass();
$var16 = error_reporting($var11);
?>
--EXPECTF--
Recoverable fatal error: Object of class stdClass could not be converted to string in %sbug72162.php on line %d
Catchable fatal error: Object of class stdClass could not be converted to string in %sbug72162.php on line %d
-35
View File
@@ -1,35 +0,0 @@
--TEST--
Bug #72177 Scope issue in __destruct after ReflectionProperty::setValue()
--FILE--
<?php
class Child
{
protected $bar;
public function __destruct()
{
$this->bar = null;
}
}
class Parnt
{
protected $child;
public function doSomething()
{
$this->child = new Child();
$prop = new \ReflectionProperty($this, 'child');
$prop->setAccessible(true);
$prop->setValue($this, null);
}
}
$p = new Parnt();
$p->doSomething();
echo "OK\n";
?>
--EXPECT--
OK
-34
View File
@@ -1,34 +0,0 @@
--TEST--
Bug #72177 Scope issue in __destruct after ReflectionProperty::setValue()
--FILE--
<?php
class Foo
{
private $bar = 'bar';
public function __construct()
{
unset($this->bar);
}
}
class Bar extends Foo
{
private $baz = 'baz';
private static $tab = 'tab';
public function __get(string $name)
{
var_dump($this->baz);
var_dump(self::$tab);
return $name;
}
}
$r = new ReflectionProperty(Foo::class, 'bar');
$r->setAccessible(true);
echo "OK\n";
?>
--EXPECT--
OK
-27
View File
@@ -1,27 +0,0 @@
--TEST--
Bug #72188 (Nested try/finally blocks losing return value)
--FILE--
<?php
function test() {
try {
return 5;
} finally {
try {
echo 1;
} finally {
echo 2;
}
}
}
$a = test();
if($a !== 5) {
echo "FAILED: expected 5, received ", var_export($a), PHP_EOL;
} else {
echo "Passed", PHP_EOL;
}
?>
--EXPECT--
12Passed
-16
View File
@@ -1,16 +0,0 @@
--TEST--
Bug #72215 (Wrong return value if var modified in finally)
--FILE--
<?php
function test() {
$a = 1;
try {
return $a;
} finally {
$a = 2;
}
}
var_dump(test());
?>
--EXPECT--
int(1)
-21
View File
@@ -1,21 +0,0 @@
--TEST--
Bug #72215.1 (Wrong return value if var modified in finally)
--FILE--
<?php
function &test(&$b) {
$a =& $b;
try {
return $a;
} finally {
$a = 2;
}
}
$x = 1;
$y =& test($x);
var_dump($y);
$x = 3;
var_dump($y);
?>
--EXPECT--
int(2)
int(3)
-22
View File
@@ -1,22 +0,0 @@
--TEST--
Bug #72215.1 (Wrong return value if var modified in finally)
--FILE--
<?php
function &test(&$b) {
$a =& $b;
try {
return $a;
} finally {
$a =& $c;
$a = 2;
}
}
$x = 1;
$y =& test($x);
var_dump($y);
$x = 3;
var_dump($y);
?>
--EXPECT--
int(1)
int(3)
-15
View File
@@ -1,15 +0,0 @@
--TEST--
Bug #72215.3 (Wrong return value if var modified in finally)
--FILE--
<?php
function &test() {
try {
return $a;
} finally {
$a = 2;
}
}
var_dump(test());
?>
--EXPECT--
int(2)
-16
View File
@@ -1,16 +0,0 @@
--TEST--
Bug #72216 (Return by reference with finally is not memory safe)
--FILE--
<?php
function &test() {
$a = ["ok"];
try {
return $a[0];
} finally {
$a[""] = 42;
}
}
var_dump(test());
?>
--EXPECT--
string(2) "ok"
-11
View File
@@ -1,11 +0,0 @@
--TEST--
Bug #72221 (Segmentation fault in stream_get_line / zend_memnstr_ex)
--FILE--
<?php
$fp = fopen("php://memory", "r+");
fwrite($fp, str_repeat("baad", 1024*1024));
rewind($fp);
stream_get_line($fp, 1024*1024*2, "aaaa");
echo "Done\n";
--EXPECT--
Done
-18
View File
@@ -1,18 +0,0 @@
--TEST--
Misoptimize due to type narrowing
--FILE--
<?php
function test() {
$b = false;
$x = (1<<53)+1;
do {
$x = 1.0 * ($x - (1<<53));
} while ($b);
return $x;
}
var_dump(test());
?>
--EXPECT--
float(1)
-17
View File
@@ -1,17 +0,0 @@
--TEST--
Bug #72347 (VERIFY_RETURN type casts visible in finally)
--FILE--
<?php
function test() : int {
$d = 1.5;
try {
return $d;
} finally {
var_dump($d);
}
}
var_dump(test());
?>
--EXPECT--
float(1.5)
int(1)
-20
View File
@@ -1,20 +0,0 @@
--TEST--
Bug #72373: TypeError after Generator function w/declared return type finishes
--FILE--
<?php
function foo() : Generator {
yield 1;
yield 2;
yield 3;
}
foreach (foo() as $bar) {
echo $bar . "\n";
}
?>
--EXPECT--
1
2
3
-10
View File
@@ -1,10 +0,0 @@
--TEST--
Bug #72395 (list() regression)
--FILE--
<?php
list(,,$a,,$b,) = array(1, 2, 3, 4, 5, 6);
var_dump($a, $b);
?>
--EXPECT--
int(3)
int(5)
-14
View File
@@ -1,14 +0,0 @@
--TEST--
Bug #72441 (Segmentation fault: RFC list_keys)
--FILE--
<?php
$array = [];
list(
'' => $foo,
$bar
) = $array;
?>
--EXPECTF--
Fatal error: Cannot mix keyed and unkeyed array entries in assignments in %sbug72441.php on line %d
-39
View File
@@ -1,39 +0,0 @@
--TEST--
Bug #72543 (different references behavior comparing to PHP 5)
--FILE--
<?php
function create_references(&$array) {
foreach ($array as $key => $value) {
create_references($array[$key]);
}
}
function change_copy($copy) {
$copy['b']['z']['z'] = $copy['b'];
}
$data = [
'a' => [
'b' => [],
],
];
create_references($data);
$copy = $data['a'];
var_dump($copy);
change_copy($copy);
var_dump($copy); //RECURSION
?>
--EXPECT--
array(1) {
["b"]=>
array(0) {
}
}
array(1) {
["b"]=>
array(0) {
}
}
-19
View File
@@ -1,19 +0,0 @@
--TEST--
Bug #72543.1 (different references behavior comparing to PHP 5)
--FILE--
<?php
$arr = [];
$arr[0] = null;
$ref =& $arr[0];
unset($ref);
$arr[0][0] = $arr[0];
var_dump($arr);
?>
--EXPECT--
array(1) {
[0]=>
array(1) {
[0]=>
NULL
}
}
-19
View File
@@ -1,19 +0,0 @@
--TEST--
Bug #72543.2 (different references behavior comparing to PHP 5)
--FILE--
<?php
$arr = [];
$arr[0] = null;
$ref =& $arr[0];
unset($ref);
$arr[0][$arr[0]] = null;
var_dump($arr);
?>
--EXPECT--
array(1) {
[0]=>
array(1) {
[""]=>
NULL
}
}
-12
View File
@@ -1,12 +0,0 @@
--TEST--
Bug #72543.3 (different references behavior comparing to PHP 5)
--FILE--
<?php
$x = new stdClass;
$x->a = 1;
$ref =& $x->a;
unset($ref);
var_dump($x->a + ($x->a = 2));
?>
--EXPECT--
int(3)
-11
View File
@@ -1,11 +0,0 @@
--TEST--
Bug #72543.4 (different references behavior comparing to PHP 5)
--FILE--
<?php
$arr = [1];
$ref =& $arr[0];
unset($ref);
var_dump($arr[0] + ($arr[0] = 2));
?>
--EXPECT--
int(3)
-10
View File
@@ -1,10 +0,0 @@
--TEST--
Bug #72543.5 (different references behavior comparing to PHP 5)
--FILE--
<?php
$arr = [1];
$ref =& $arr[0];
var_dump($arr[0] + ($arr[0] = 2));
?>
--EXPECT--
int(4)
-26
View File
@@ -1,26 +0,0 @@
--TEST--
Bug #72598 (Reference is lost after array_slice())
--FILE--
<?php
function ref(&$ref) {
var_dump($ref);
}
new class {
function __construct() {
$args = [&$this];
for ($i = 0; $i < 2; $i++) {
$a = array_slice($args, 0, 1);
call_user_func_array('ref', $a);
}
}
};
?>
--EXPECTF--
Warning: Parameter 1 to ref() expected to be a reference, value given in %sbug72598.php on line 11
object(class@anonymous)#1 (0) {
}
Warning: Parameter 1 to ref() expected to be a reference, value given in %sbug72598.php on line 11
object(class@anonymous)#1 (0) {
}
-27
View File
@@ -1,27 +0,0 @@
--TEST--
Bug #72598.2 (Reference is lost after array_slice())
--FILE--
<?php
function ref(&$ref) {
var_dump($ref);
$ref = 1;
}
new class {
function __construct() {
$b = 0;
$args = [&$b];
unset($b);
for ($i = 0; $i < 2; $i++) {
$a = array_slice($args, 0, 1);
call_user_func_array('ref', $a);
}
}
};
?>
--EXPECTF--
Warning: Parameter 1 to ref() expected to be a reference, value given in %sbug72598_2.php on line 14
int(0)
Warning: Parameter 1 to ref() expected to be a reference, value given in %sbug72598_2.php on line 14
int(0)
-22
View File
@@ -1,22 +0,0 @@
--TEST--
Bug #72918 (negative offset inside a quoted string leads to parse error)
--FILE--
<?php
$array = [-3 => 'foo'];
$string = 'abcde';
echo "$array[-3]\n";
echo "$string[-3]\n";
echo <<<EOT
$array[-3]
$string[-3]
EOT;
?>
===DONE===
--EXPECT--
foo
c
foo
c
===DONE===
Loaded 100 of 2079 files, more files were not shown because too many files have changed in this diff. Show more