1
0
mirror of https://github.com/php/php-src.git synced 2026-04-28 02:33:17 +02:00
Commit Graph

113482 Commits

Author SHA1 Message Date
Nikita Popov 650115c827 Improve exif tag name fetching 2019-10-18 16:55:05 +02:00
Nikita Popov 56e3e6f135 Implement a cache for exif tag name lookups 2019-10-18 16:54:56 +02:00
Nikita Popov e5324a2484 Limit the amount of errors generated during exif parsing
Emitting errors is fairly expensive, to the point that parsing
a file with a huge number of invalid tags can take seconds.
Generating ten thousand errors is unlikely to help anybody, but
constitutes a potential DOS vector.
2019-10-18 16:54:49 +02:00
Christoph M. Becker 81806db90b Fix test case
Cf. <https://github.com/php/php-src/pull/4687>.
2019-10-18 16:23:56 +02:00
Christoph M. Becker 197568d634 Merge branch 'PHP-7.3' into PHP-7.4
* PHP-7.3:
  Fix #70153 \DateInterval incorrectly unserialized
2019-10-18 15:33:25 +02:00
Christoph M. Becker c7c7ab53ac Merge branch 'PHP-7.2' into PHP-7.3
* PHP-7.2:
  Fix #70153 \DateInterval incorrectly unserialized
2019-10-18 15:32:08 +02:00
m.yakunin d2cde0bfd3 Fix #70153 \DateInterval incorrectly unserialized
Added a separate macro for reading 'days' property, so that bool(false)
is correctly converted to the proper internal representation.
2019-10-18 15:31:14 +02:00
Alex Porto dos Santos a6a2d167d8 Update array access syntax deprecated
Update array access syntax deprecated in line 175 and 204
Deprecated: Array and string offset access syntax with curly braces is deprecated in /home/alex/php/hello/ext_skel.php on line 175
Deprecated: Array and string offset access syntax with curly braces is deprecated in /home/alex/php/hello/ext_skel.php on line 204
2019-10-17 23:39:55 +02:00
Nikita Popov cf85eb2468 Integrate property types with variance system
Property types are invariant, but may still have to load classes in
order to check for class aliases. This class loading should follow
the same rules as all other variance checks, rather than just
loading unconditionally.

This change integrates property type invariance checks into the
variance system as a new obligation type, and prevent early binding
if the type check cannot be performed.
2019-10-17 13:37:04 +02:00
Fabien Villepinte 8b160f530c Change port to avoid collision with others tests
The 64321 port is already used with the ext/openssl tests.
2019-10-16 20:50:54 +02:00
Derick Rethans 3f7cc8361c Merge branch 'PHP-7.3' into PHP-7.4 2019-10-15 21:00:57 +01:00
Derick Rethans 3725a446ba Import timelib version 2018.03 2019-10-15 21:00:39 +01:00
Sara Golemon 15d7cd9e18 Silence undefined index warning when openssl not available. 2019-10-15 15:37:56 -04:00
Christoph M. Becker 8e06504e94 Prevent parallel testing conflicts
disk_free_space_basic.phpt already uses this directory, so we rename
it.
2019-10-15 16:29:46 +02:00
Derick Rethans 6e2635d2f2 Update NEWS for 7.4.0RC5 2019-10-15 11:29:33 +00:00
Derick Rethans 998be7752c Update NEWS for PHP 7.4.0RC4 2019-10-15 11:28:15 +00:00
Joe Watkins 042e3b227e Merge branch 'PHP-7.3' into PHP-7.4
* PHP-7.3:
  Fix checksum calculation for opcache
2019-10-14 16:50:23 +02:00
Joe Watkins 22ac57b064 Merge branch 'PHP-7.2' into PHP-7.3
* PHP-7.2:
  Fix checksum calculation for opcache
2019-10-14 16:49:48 +02:00
Mitch Hagstrand e2a6bf482f Fix checksum calculation for opcache 2019-10-14 16:46:42 +02:00
Nikita Popov 641f9615cc Fix handling of overflowing invalid octal in tokenizer
If token_get_all() is used, we still need to correctly distinguish
LNUMBER vs DNUMBER here for backwards compatibility.
2019-10-14 16:36:27 +02:00
Nikita Popov c518932c03 Add "-pthread" to EXTRA_LDFLAGS_PROGRAM as well 2019-10-14 11:33:39 +02:00
Christoph M. Becker f6bd5dcbe9 Fix test case
`MSG_EOR` and `MSG_EOF` are not necessarily defined, in which case the
test would fail.
2019-10-12 16:28:57 +02:00
Christoph M. Becker c10d3d3a35 Fix potential heap corruption
`tmp` is allocated by `malloc()`, so we must not `LocalFree()` it.
2019-10-12 16:16:14 +02:00
Christoph M. Becker 586f8515d5 Merge branch 'PHP-7.3' into PHP-7.4
* PHP-7.3:
  Fix #78665: Multicasting may leak memory
2019-10-12 14:46:10 +02:00
Christoph M. Becker 7439d48bea Merge branch 'PHP-7.2' into PHP-7.3
* PHP-7.2:
  Fix #78665: Multicasting may leak memory
2019-10-12 14:44:55 +02:00
Christoph M. Becker 900bdcbd03 Fix #78665: Multicasting may leak memory 2019-10-12 14:43:43 +02:00
Gerard Roche db54b0fa18 Azure: Publish code coverage results
* Add an Azure Publish Code Coverage Results task
* Add `make gcovr-html` to generate a gcovr test coverage report in HTML
* Add `make gcovr-xml` to generate a gcovr test coverage report in XML
* Remove `test` target dependency from `make lcov-html`;
  Run the two targets together instead: `make test lcov-html`.

Re: https://github.com/php/php-src/pull/4739#issuecomment-534911441

See: https://externals.io/message/107113,
https://docs.microsoft.com/en-us/azure/devops/pipelines/tasks/test/publish-code-coverage-results?view=azure-devops,
and https://github.com/php/php-src/pull/4759.
2019-10-11 17:44:36 +02:00
Nikita Popov aa10e20830 Add upgrading note for round(-0.0) change
As cmb pointed out, the new behavior is compliant with POSIX:
https://pubs.opengroup.org/onlinepubs/9699919799/functions/round.html.
2019-10-11 17:09:06 +02:00
Nikita Popov 3718a95526 Remove configure checks for ltp when using --enable-gcov
gcov builds can also be used with other tools like gcovr, so remove
the hard dependency on LTP.
2019-10-11 16:51:03 +02:00
Remi Collet a78b09c9b8 NEWS 2019-10-11 13:38:15 +02:00
Remi Collet 5a024d2c5b Fix #78662: stream_write bad error detection 2019-10-11 13:36:58 +02:00
Fabien Villepinte 8b8c226dbf Replace port already used
Closes GH-4811.
2019-10-11 10:57:09 +02:00
Nikita Popov e4aac082a2 Merge branch 'PHP-7.3' into PHP-7.4 2019-10-10 16:14:52 +02:00
Nikita Popov 74ac3dd6e2 Merge branch 'PHP-7.2' into PHP-7.3 2019-10-10 16:14:37 +02:00
Nikita Popov 46561dab6a Fix leak in phar open 2019-10-10 16:14:21 +02:00
Dmitry Stogov 33958ccb36 Revert "Fixed CLI/CGI/FPM build, when they are built together with Apache SAPI"
This reverts commit db094b4b2e.
2019-10-10 16:28:59 +03:00
Dmitry Stogov 1bb1a1ee28 Revert "Don't buid static libaraies when only DSO required"
This reverts commit f633c34757.
2019-10-10 16:28:59 +03:00
Dmitry Stogov b64a182233 Revert "Link executable files using non PIC object files. This reduces PIC overhead and improves performance."
This reverts commit eef85229d0.
2019-10-10 16:28:59 +03:00
Nikita Popov 5a076e670a Return error_zval form get_property_ptr_ptr on exception
This goes in the reverse direction of 4463acb951.
After looking around a bit, it seems that we already check for
Z_ISERROR_P() on the get_property_ptr_ptr return value in other places.
So do this in zend_fetch_property_address() as well, and also make
sure that EG(error_zval) is indeed returned on exception in
get_property_ptr_ptr.

In particular, this fixes the duplicate exceptions that we used to
get because first get_property_ptr_ptr threw one and then
read_property throws the same exception again.
2019-10-10 15:14:04 +02:00
Nikita Popov 4463acb951 Explicitly check for exceptions in by-ref obj prop assign
Relying on setting ERROR if an exception happened during the
property address fetch is both a bit fragile and may pessimize
other codepaths that will check for exceptions in the VM. Adding
an extra exception check instead, which should also allow us to
drop the use of ERROR in this area in master.
2019-10-10 14:41:35 +02:00
Nikita Popov 12f4e9e020 Fix leak when property AST evaluation fails 2019-10-10 12:44:55 +02:00
Nikita Popov f43f493e09 Also check for exception after stream_eof 2019-10-10 12:08:04 +02:00
Nikita Popov b02cf8b66e Merge branch 'PHP-7.3' into PHP-7.4 2019-10-10 11:41:51 +02:00
Nikita Popov 4ba8d78100 Merge branch 'PHP-7.2' into PHP-7.3 2019-10-10 11:41:29 +02:00
Nikita Popov 96c84b7bc1 Fix leak on static method call on non-existent class 2019-10-10 11:40:49 +02:00
Nikita Popov 6878c583b0 Report error if stream_read is not implemented
We need to return -1 in this case. Slightly restructure the code
to avoid unnecessary conditions.
2019-10-10 11:13:10 +02:00
Nikita Popov 382f9b28e8 Fix leak on "Cannot assign by reference to overloaded object" error 2019-10-10 10:07:54 +02:00
Nikita Popov 5b44560dfc Merge branch 'PHP-7.3' into PHP-7.4 2019-10-09 17:33:52 +02:00
Nikita Popov a0163417ef Merge branch 'PHP-7.2' into PHP-7.3 2019-10-09 17:33:44 +02:00
Nikita Popov daf1fc6e31 Avoid float to int cast UB in exif 2019-10-09 17:33:29 +02:00