]>
granicus.if.org Git - php/log
George Peter Banyard [Mon, 30 Mar 2020 02:11:12 +0000 (04:11 +0200)]
Fix format for tm member objects as they are stored as integers
Closes GH-5326
Nikita Popov [Mon, 30 Mar 2020 14:27:38 +0000 (16:27 +0200)]
Clarify that return throws
Nikita Popov [Mon, 30 Mar 2020 14:26:28 +0000 (16:26 +0200)]
mb_detect_order(): Use proper array|string argument
Nikita Popov [Mon, 30 Mar 2020 14:17:35 +0000 (16:17 +0200)]
Remove persistent arg from parse_encoding_array()
It is always zero.
Nikita Popov [Mon, 30 Mar 2020 14:13:36 +0000 (16:13 +0200)]
mb_check_encoding(): Make var a proper array|string arg
Nikita Popov [Mon, 30 Mar 2020 14:06:41 +0000 (16:06 +0200)]
mb_detect_encoding(): Use proper array|string parameter
Needed to add support for nullabiltiy in some places.
Tyson Andre [Sun, 29 Mar 2020 21:42:11 +0000 (17:42 -0400)]
Do constant evaluation for str_contains in opcache
Both arguments must be strings.
str_contains deliberately does not emit a warning for an empty needle.
Closes GH-5324
Nikita Popov [Mon, 30 Mar 2020 13:51:04 +0000 (15:51 +0200)]
mb_convert_variables(): Make $from an array|string argument
Nikita Popov [Mon, 30 Mar 2020 13:41:55 +0000 (15:41 +0200)]
mb_convert_encoding(): Make $input a proper array|string arg
Nikita Popov [Mon, 30 Mar 2020 13:39:13 +0000 (15:39 +0200)]
mb_convert_encoding(): Make $from_encodings a proper array|string arg
Switching to FastZPP, as we don't support this in normal zpp.
Michael Voříšek [Fri, 27 Mar 2020 10:53:37 +0000 (11:53 +0100)]
Add test to make sure that (self::class)::method() is not forwarding LSB
Related with Bug #79419.
Closes GH-5310.
Nikita Popov [Mon, 30 Mar 2020 12:15:16 +0000 (14:15 +0200)]
Parse mb_convert_encoding() encodings only once
Instead of re-parsing them for every converted value. Also reuse
the generic parse_array() helper.
Nikita Popov [Mon, 30 Mar 2020 12:46:10 +0000 (14:46 +0200)]
Properly report unknown encoding in encoding lists
And clean up the related array and list parsing code.
Dmitry Stogov [Mon, 30 Mar 2020 11:27:01 +0000 (14:27 +0300)]
cleanup
Nikita Popov [Mon, 30 Mar 2020 10:29:11 +0000 (12:29 +0200)]
Move encoding fetching outside php_mb_stripos()
Nikita Popov [Mon, 30 Mar 2020 10:10:52 +0000 (12:10 +0200)]
Remove unnecessary NULL check
This is a required zpp parameter, it cannot be null.
Dmitry Stogov [Mon, 30 Mar 2020 09:50:19 +0000 (12:50 +0300)]
Initialize variable numbers
Nikita Popov [Mon, 30 Mar 2020 08:58:33 +0000 (10:58 +0200)]
Disable Symfony test on PHP 8
Symfony is currently has an expected incompatibility with PHP 8:
Fatal error: Declaration of Symfony\Component\HttpClient\Response\MockResponse::schedule(Symfony\Component\HttpClient\Response\MockResponse $response, array &$runningResponses): void must be compatible with Symfony\Component\HttpClient\Response\ResponseTrait::schedule(Symfony\Component\HttpClient\Response\ResponseTrait $response, array &$runningResponses): void in /home/vsts/work/1/s/symfony/src/Symfony/Component/HttpClient/Response/MockResponse.php on line 135
Disable the job until this is fixed.
Nikita Popov [Mon, 30 Mar 2020 08:54:34 +0000 (10:54 +0200)]
Merge branch 'PHP-7.4'
* PHP-7.4:
Don't check directory nlink in stat tests
Nikita Popov [Mon, 30 Mar 2020 08:52:25 +0000 (10:52 +0200)]
Don't check directory nlink in stat tests
It seems like on many filesystems nlink for directories is the
number of subdirectories (plus two, due to . and ..). However,
this is not a POSIX requirement, and some filesystems don't
implement it this way. This seems to be the case for whatever is
used on the Travis AArch64 builders now.
Nikita Popov [Mon, 30 Mar 2020 08:37:12 +0000 (10:37 +0200)]
SCCP: Optimize strpos with empty needle
This is no longer special cases in PHP 8.
Christoph M. Becker [Mon, 30 Mar 2020 07:18:20 +0000 (09:18 +0200)]
Merge branch 'PHP-7.4'
* PHP-7.4:
Fix #74940: DateTimeZone loose comparison always true
Christoph M. Becker [Wed, 4 Mar 2020 18:20:10 +0000 (19:20 +0100)]
Fix #74940: DateTimeZone loose comparison always true
Since `DateTimeZone` does not implement a `compare_objects` handler,
nor has any properties, two `DateTimeZone` instances always compare as
being equal, even if they designate totally different timezones. Even
worse, after calling `var_dump()` on these objects, the actual
comparison may yield a correct result.
We therefore introduce a `compare_objects` handlers, which prevents
different behavior before/after `var_dump()`, and which allows us to
clearly define the intended semantics.
Christoph M. Becker [Mon, 30 Mar 2020 06:58:45 +0000 (08:58 +0200)]
Merge branch 'PHP-7.4'
* PHP-7.4:
Fix #79427: Integer Overflow in shmop_open()
Christoph M. Becker [Mon, 30 Mar 2020 06:57:29 +0000 (08:57 +0200)]
Merge branch 'PHP-7.3' into PHP-7.4
* PHP-7.3:
Fix #79427: Integer Overflow in shmop_open()
Christoph M. Becker [Sun, 29 Mar 2020 14:56:57 +0000 (16:56 +0200)]
Fix #79427: Integer Overflow in shmop_open()
If `shm.shm_segsz > ZEND_LONG_MAX` the assignment to `shmop->size` a
few lines below would overflow, so we catch that early and bail out if
necessary.
Jakub Zelenka [Sun, 29 Mar 2020 19:21:24 +0000 (20:21 +0100)]
Merge branch 'PHP-7.4'
Andre Nathan [Tue, 4 Feb 2020 12:53:16 +0000 (09:53 -0300)]
Allow numeric [UG]ID in FPM listen.{owner,group}
Remi Collet [Sun, 29 Mar 2020 12:24:12 +0000 (14:24 +0200)]
Merge branch 'PHP-7.4'
* PHP-7.4:
NEWS
Fix #79424 ext/zip: don't use gl_pathc after call to globfree
Remi Collet [Sun, 29 Mar 2020 12:23:28 +0000 (14:23 +0200)]
NEWS
Remi Collet [Sun, 29 Mar 2020 12:23:03 +0000 (14:23 +0200)]
Merge branch 'PHP-7.3' into PHP-7.4
* PHP-7.3:
Fix #79424 ext/zip: don't use gl_pathc after call to globfree
Max Rees [Fri, 27 Mar 2020 17:57:24 +0000 (12:57 -0500)]
Fix #79424 ext/zip: don't use gl_pathc after call to globfree
This breaks on Linux with the musl libc, since it zeroes out gl_pathc during
globfree.
Dmitry Stogov [Fri, 27 Mar 2020 12:20:21 +0000 (15:20 +0300)]
BIND_GLOBAL and BIND_STATIC don't use value of the first operand
Christoph M. Becker [Fri, 13 Mar 2020 14:48:53 +0000 (15:48 +0100)]
Fix #76999: mb_regex_set_options() return current options
When setting new options, `mb_regex_set_options()` is supposed to
return the *previous* options.
Dmitry Stogov [Fri, 27 Mar 2020 09:24:15 +0000 (12:24 +0300)]
Removed useless variable
Christoph M. Becker [Thu, 26 Mar 2020 22:17:37 +0000 (23:17 +0100)]
Merge branch 'PHP-7.4'
* PHP-7.4:
Add missing 'skip' to bug79332.phpt skip message
Christoph M. Becker [Thu, 26 Mar 2020 22:15:55 +0000 (23:15 +0100)]
Merge branch 'PHP-7.3' into PHP-7.4
* PHP-7.3:
Add missing 'skip' to bug79332.phpt skip message
Lukas Berger [Thu, 26 Mar 2020 17:39:39 +0000 (10:39 -0700)]
Add missing 'skip' to bug79332.phpt skip message
The skip message must start with the word 'skip', otherwise the test will not be skipped.
*Before:*
Running selected tests.
TEST 1/1 [ext/com_dotnet/tests/bug79332.phpt]
========DIFF========
001+ Fatal error: Uncaught Error: Class 'COMPersistHelper' not found in /srv/php/ext/com_dotnet/tests/bug79332.php:2
001- A com_exception has been thrown
002+ Stack trace:
003+ #0 {main}
004+ thrown in /srv/php/ext/com_dotnet/tests/bug79332.php on line 2
========DONE========
FAIL Bug #79332 (php_istreams are never freed) [ext/com_dotnet/tests/bug79332.phpt]
*After:*
Running selected tests.
SKIP Bug #79332 (php_istreams are never freed) [ext/com_dotnet/tests/bug79332.phpt] reason: com_dotnet extension not available
Nikita Popov [Thu, 26 Mar 2020 10:49:27 +0000 (11:49 +0100)]
Remove rand_r implementation
We already use our own mt13397 implementation nowadays, so we no
longer need this shim.
Nikita Popov [Mon, 23 Mar 2020 09:18:00 +0000 (10:18 +0100)]
Remove HAVE_REALPATH checks
We do not actually use realpath(), but a custom implementation.
Make sure the realpath() function is always available.
Closes GH-5290.
Nikita Popov [Thu, 23 Mar 2017 15:14:39 +0000 (16:14 +0100)]
Add PhpToken class
RFC: https://wiki.php.net/rfc/token_as_object
Relative to the RFC, this also adds a __toString() method,
as discussed on list.
Closes GH-5176.
Nikita Popov [Thu, 9 Jan 2020 14:04:33 +0000 (15:04 +0100)]
Check abstract method signatures coming from traits
RFC: https://wiki.php.net/rfc/abstract_trait_method_validation
Closes GH-5068.
Dmitry Stogov [Thu, 26 Mar 2020 07:29:34 +0000 (10:29 +0300)]
Merge branch 'PHP-7.4'
* PHP-7.4:
Explicitly declare the char as signed in zend_ffi_val.
George Peter Banyard [Thu, 26 Mar 2020 02:20:10 +0000 (03:20 +0100)]
Explicitly declare the char as signed in zend_ffi_val.
This causes issues down the line as char are unsigned on some platforms,
e.g. ARM and cause a [-Wtype-limits] warning to be emitted.
George Peter Banyard [Thu, 26 Mar 2020 02:20:10 +0000 (03:20 +0100)]
Explicitly declare the char as signed in zend_ffi_val.
This causes issues down the line as char are unsigned on some platforms,
e.g. ARM and cause a [-Wtype-limits] warning to be emitted.
Christoph M. Becker [Wed, 25 Mar 2020 21:49:57 +0000 (22:49 +0100)]
Fix php_exec() output length
If trailing whitespace is stripped, we have to propagate the change of
`bufl` back to php_exec().
George Peter Banyard [Wed, 25 Mar 2020 20:44:03 +0000 (21:44 +0100)]
Fix -Wtype-limits warning by using correct type declaration in JIT trace
Namely int as that is the type of 'definition'
Closes GH-5299
Dmitry Stogov [Wed, 25 Mar 2020 20:09:32 +0000 (23:09 +0300)]
Separate zend_jit_var_supports_reg() and cleanup
Dmitry Stogov [Wed, 25 Mar 2020 20:07:21 +0000 (23:07 +0300)]
Fixed incorrect "TSSA start" headers
Dmitry Stogov [Wed, 25 Mar 2020 14:38:08 +0000 (17:38 +0300)]
Merge branch 'PHP-7.4'
* PHP-7.4:
Fixed bug #79412 (Opcache chokes and uses 100% CPU on specific script).
Dmitry Stogov [Wed, 25 Mar 2020 14:31:33 +0000 (17:31 +0300)]
Merge branch 'PHP-7.3' into PHP-7.4
* PHP-7.3:
Fixed bug #79412 (Opcache chokes and uses 100% CPU on specific script).
Dmitry Stogov [Wed, 25 Mar 2020 14:31:06 +0000 (17:31 +0300)]
Fixed bug #79412 (Opcache chokes and uses 100% CPU on specific script).
Máté Kocsis [Wed, 25 Mar 2020 11:33:38 +0000 (12:33 +0100)]
Fix #75958 Return void instead of true
Máté Kocsis [Wed, 25 Mar 2020 08:24:52 +0000 (09:24 +0100)]
Add stubs for SplDoublyLinkedList
Closes GH-5293
Dmitry Stogov [Wed, 25 Mar 2020 10:22:01 +0000 (13:22 +0300)]
Add new line before basic-block labels (except for the first BB0)
Dmitry Stogov [Wed, 25 Mar 2020 09:42:04 +0000 (12:42 +0300)]
Always print numeric opline numbers
Nikita Popov [Wed, 25 Mar 2020 10:11:30 +0000 (11:11 +0100)]
Clean up php_exec() implementation a bit
Nikita Popov [Wed, 25 Mar 2020 09:51:32 +0000 (10:51 +0100)]
Merge branch 'PHP-7.4'
* PHP-7.4:
Fix bug #79410 (system() swallows last chunk if it is exactly 4095 bytes without newline)
Nikita Popov [Wed, 25 Mar 2020 09:50:57 +0000 (10:50 +0100)]
Merge branch 'PHP-7.3' into PHP-7.4
* PHP-7.3:
Fix bug #79410 (system() swallows last chunk if it is exactly 4095 bytes without newline)
Christian Schneider [Tue, 24 Mar 2020 15:43:17 +0000 (16:43 +0100)]
Fix bug #79410 (system() swallows last chunk if it is exactly 4095 bytes without newline)
Closes GH-5292.
Dmitry Stogov [Wed, 25 Mar 2020 07:49:01 +0000 (10:49 +0300)]
Rename "var" to "stack". This is an abstract stack that holds TSSA variable numbers.
Dmitry Stogov [Tue, 24 Mar 2020 19:44:11 +0000 (22:44 +0300)]
Make SSA dump format controlled by opcache.jit_debug more readable (always print opcode number).
This doesn't affect dumps controlled by opcache.opt_debug_level.
Máté Kocsis [Wed, 18 Mar 2020 19:58:45 +0000 (20:58 +0100)]
Improve error messages of ext/hash
Closes GH-5275
Máté Kocsis [Wed, 18 Mar 2020 19:58:37 +0000 (20:58 +0100)]
Promote warnings to exceptions in ext/hash
Máté Kocsis [Sun, 22 Mar 2020 18:27:00 +0000 (19:27 +0100)]
Add stubs for SPL iterators
Closes GH-5286
Máté Kocsis [Wed, 18 Mar 2020 21:44:02 +0000 (22:44 +0100)]
Improve error messages of various extensions
Closes GH-5278
Máté Kocsis [Wed, 18 Mar 2020 20:39:56 +0000 (21:39 +0100)]
Improve error messages of ext/reflection
Closes GH-5277
Nikita Popov [Mon, 23 Mar 2020 16:14:42 +0000 (17:14 +0100)]
Merge branch 'PHP-7.4'
* PHP-7.4:
Add test file
Nikita Popov [Mon, 23 Mar 2020 16:14:16 +0000 (17:14 +0100)]
Merge branch 'PHP-7.3' into PHP-7.4
* PHP-7.3:
Add test file
Nikita Popov [Mon, 23 Mar 2020 16:13:57 +0000 (17:13 +0100)]
Add test file
Forgot the git add again...
Nikita Popov [Mon, 23 Mar 2020 16:12:55 +0000 (17:12 +0100)]
Merge branch 'PHP-7.4'
* PHP-7.4:
Handle NULL caller_call_opline
Nikita Popov [Mon, 23 Mar 2020 16:12:12 +0000 (17:12 +0100)]
Merge branch 'PHP-7.3' into PHP-7.4
* PHP-7.3:
Handle NULL caller_call_opline
Nikita Popov [Mon, 23 Mar 2020 16:10:54 +0000 (17:10 +0100)]
Handle NULL caller_call_opline
This can happen if there is an EXIT in the call arguments, in which
case the DO_CALL opcode may be eliminated as unreachable.
Christoph M. Becker [Mon, 23 Mar 2020 15:33:26 +0000 (16:33 +0100)]
Merge branch 'PHP-7.4'
* PHP-7.4:
Fix leak on Windows as well
Christoph M. Becker [Mon, 23 Mar 2020 15:31:45 +0000 (16:31 +0100)]
Fix leak on Windows as well
Cf. <http://git.php.net/?p=php-src.git;a=commit;h=
db08ef0d3274b239a6b9e68d71d02bb6acb71d82 >
Christoph M. Becker [Mon, 23 Mar 2020 15:26:19 +0000 (16:26 +0100)]
Merge branch 'PHP-7.4'
* PHP-7.4:
Fix test for Windows
Christoph M. Becker [Mon, 23 Mar 2020 15:23:33 +0000 (16:23 +0100)]
Merge branch 'PHP-7.3' into PHP-7.4
* PHP-7.3:
Fix test for Windows
Christoph M. Becker [Mon, 23 Mar 2020 15:19:25 +0000 (16:19 +0100)]
Fix test for Windows
Windows filenames may very well contain a colon, so we adjust the test
accordingly.
Christoph M. Becker [Mon, 23 Mar 2020 13:31:16 +0000 (14:31 +0100)]
Merge branch 'PHP-7.4'
* PHP-7.4:
Fix #79200: Some iconv functions cut Windows-1258
Nikita Popov [Mon, 23 Mar 2020 13:22:51 +0000 (14:22 +0100)]
Don't use quiet zpp in RecursiveIteratorIterator ctor
Don't be a special snowflake, generate a standard TypeError here.
Christoph M. Becker [Mon, 23 Mar 2020 13:13:24 +0000 (14:13 +0100)]
Merge branch 'PHP-7.3' into PHP-7.4
* PHP-7.3:
Fix #79200: Some iconv functions cut Windows-1258
Christoph M. Becker [Mon, 16 Mar 2020 12:09:16 +0000 (13:09 +0100)]
Fix #79200: Some iconv functions cut Windows-1258
To cater to potentially state-dependent encodings, we have to reset the
conversion descriptor into its initial shift state to properly finish
the conversion. Furthermore, state-dependent encodings may not show
progress when comparing `in_left` before and after the conversion; we
rather have to see whether `out_left` has decreased. Also we have to
cater to the fact that the final potentially state resetting call does
not signal failure, but we still have to break respective loops
afterwards.
Christoph M. Becker [Mon, 23 Mar 2020 12:59:22 +0000 (13:59 +0100)]
Merge branch 'PHP-7.4'
* PHP-7.4:
Fix #79393: Null coalescing operator failing with SplFixedArray
Máté Kocsis [Mon, 23 Mar 2020 11:26:47 +0000 (12:26 +0100)]
Fix ZPP of SplFileInfo::openFile()
Máté Kocsis [Sat, 21 Mar 2020 22:34:29 +0000 (23:34 +0100)]
Add stubs for SplFileInfo et al.
Closes GH-5287
Christoph M. Becker [Mon, 23 Mar 2020 12:31:08 +0000 (13:31 +0100)]
Merge branch 'PHP-7.3' into PHP-7.4
* PHP-7.3:
Fix #79393: Null coalescing operator failing with SplFixedArray
Christoph M. Becker [Wed, 18 Mar 2020 16:39:27 +0000 (17:39 +0100)]
Fix #79393: Null coalescing operator failing with SplFixedArray
We favor the KISS principle over optimization[1] – SPL is already
special enough.
[1] <https://github.com/php/php-src/pull/2489/commits/
352f3d4476a79bb86136b431719df7394e5a8d4e #r112498098>ff
Nikita Popov [Mon, 23 Mar 2020 11:01:15 +0000 (12:01 +0100)]
Merge branch 'PHP-7.4'
* PHP-7.4:
Fix RSA memory leak in mysqlnd auth
Nikita Popov [Mon, 23 Mar 2020 10:54:55 +0000 (11:54 +0100)]
Fix RSA memory leak in mysqlnd auth
Nikita Popov [Mon, 23 Mar 2020 10:12:42 +0000 (11:12 +0100)]
Fix signed integer overflow UB in dasm
Should hopefully fix the ubsan and community builds.
Nikita Popov [Mon, 23 Mar 2020 10:03:56 +0000 (11:03 +0100)]
Fix pointer UB in dynasm
Looks like newer GCC versions started warning about this.
Nikita Popov [Mon, 23 Mar 2020 08:45:44 +0000 (09:45 +0100)]
Minor cleanup in spl_direcotry
* Rename variable for clarity
* Reduce section with replaced error handling
* Drop comment code line
ZoDream [Mon, 23 Mar 2020 01:45:34 +0000 (09:45 +0800)]
Repair ext_skel.php to create the basic framework for a PHP extension
Copy the arginfo stubs file, and drop the %EXTNAME%_ to make things line up.
Closes GH-5289.
Tyson Andre [Sat, 21 Mar 2020 15:56:44 +0000 (11:56 -0400)]
Fix compilation error on mac with -Wshift-negative-value
Fix for mac OS build error seen in
ccc49ead681add7bdf6a021c7a3420aff543bc1e
when shifting -1 (max argument count?)
```
ext/opcache/jit/zend_jit_trace.c:1668:2:
error: shifting a negative signed value is undefined
[-Werror,-Wshift-negative-value]
TRACE_FRAME_INIT(frame, op_array, 0, -1);
```
Closes GH-5284.
Tyson Andre [Sat, 21 Mar 2020 14:58:35 +0000 (10:58 -0400)]
Skip ftruncate_bug76422 if disk_free_space() <= 4GB
Followup to https://github.com/php/php-src/pull/5043
In the middle of running this test with TESTS=-j9,
run-tests.php stopped the test suite because the partition started
with 3.5GB of free disk space and new test files couldn't be created.
Reclaiming the disk space of that file also took a while.
Closes GH-5283
Dmitry Stogov [Fri, 20 Mar 2020 13:59:02 +0000 (16:59 +0300)]
Add tracing JIT guards for INTI_FCALL_BY_NAME and INIT_NS_FCALL_BY_NAME
Remi Collet [Fri, 20 Mar 2020 13:08:57 +0000 (14:08 +0100)]
bump zip version
Christoph M. Becker [Fri, 20 Mar 2020 13:00:11 +0000 (14:00 +0100)]
Note that `active => true` has to be kept for `$QA_RELEASES`
Otherwise the bug tracker and test failure reporting will not work as
intended (and maybe there are even more issues).
Dmitry Stogov [Fri, 20 Mar 2020 12:36:40 +0000 (15:36 +0300)]
JIT for INIT_NS_FCALL_BY_NAME
Remi Collet [Fri, 20 Mar 2020 11:13:15 +0000 (12:13 +0100)]
add missing test