1
0
mirror of https://github.com/php/php-src.git synced 2026-04-22 23:48:14 +02:00
Commit Graph

125376 Commits

Author SHA1 Message Date
Dmitry Stogov 116fa65482 Fixed ZEND_MAP_PTR_KIND_PTR (it is not used) 2021-08-23 14:04:02 +03:00
Dmitry Stogov 476c333a8e Reorder updates to avoid race conditions 2021-08-23 11:47:30 +03:00
Nikita Popov 8c67abb67f Drop gz aliases from func info
Func info does not need to include function aliases, we'll look
up based on the primary function name.
2021-08-23 10:41:41 +02:00
Nikita Popov 6385006102 Merge branch 'PHP-8.0'
* PHP-8.0:
  Mark PDO::setAttribute() $value as mixed
2021-08-20 16:53:25 +02:00
Nikita Popov 2e343fcb42 Mark PDO::setAttribute() $value as mixed
For consistency with PDOStatement::setAttribute(). Attribute values
can for example also be bool.

This is backwards-compatible, as mixed is the same as no type for
parameter variance.
2021-08-20 16:51:52 +02:00
Nikita Popov 2ff496e871 Handle resource table reallocation during shutdown
New resources may be created while closing resources during
shutdown. This may result in a reallocation of arData and use
after free.

This problem was exposed by 7f7a90b2bc,
which creates one resources less, and thus moved the reallocation
to shutdown for a number of existing tests. However, the general
problem already existed previously.

We don't try to also close the newly added resources -- we will
later perform a graceful reverse destroy of the table, which will
catch any remaining cases.
2021-08-20 15:37:46 +02:00
Nikita Popov 05a217927a Declare php_user_filter::$stream property
This property is temporarily set during the filter() call. I have
no idea why this wasn't added as an argument to filter() instead.
2021-08-20 14:50:25 +02:00
Nikita Popov 7f7a90b2bc Remove php_user_filter::$filter property
This property was formerly used to hold the php_stream_filter
pointer for destruction purposes. However, this is no longer used,
and we don't need to create this resource at all.
2021-08-20 14:39:53 +02:00
Nikita Popov 841d0b30eb Slightly clean up cookies handling
Make the property always an array with an empty array default.
Properly separate the array on modification to compensate.
2021-08-20 14:27:24 +02:00
Nikita Popov de6cf68ac4 Fix missing string copy
I changed this to a zend_string_copy, but that's not correct in
this case, as we still append to the string below.

Also fix a test on 32-bit.
2021-08-20 14:15:23 +02:00
Nikita Popov 50484b59cd Move derefs into accessor macros
These derefs are mostly there to be defensive, but clutter the
code somewhat. Move them directly into the access macros.
2021-08-20 14:15:23 +02:00
Kamil Tekiela a893a4901f Implement mysqlnd_set_persistent_string (#7371) 2021-08-20 12:03:46 +01:00
Nikita Popov 6b05d958aa Make internal SoapServer/SoapClient state private
This was previously implicitly public due to the use of dynamic
properties. Make this internal state private.

If someone complains, we can consider relaxing this to protected
or public on a case-by-case basis.
2021-08-20 12:54:39 +02:00
Nikita Popov e6c6abf6b4 Declare remaining SoapClient properties 2021-08-20 12:50:19 +02:00
Nikita Popov b3b1658492 Remove dead code
This was checking for the headerfault property, but not actually
doing anything with it.
2021-08-20 12:28:58 +02:00
Nikita Popov aa4898ef2e Use separate property to request digit auth
Currently, _digest is used both to request that digest auth be
used (_digest == null) and to later store the _digest parameters.

This relies on the ability to distinguish between _digest being
null and it being not set, which is not present with declared
properties. (Well, technically it is, we could just leave it
uninitialized, but that would be non-idiomatic.)

Resolve this by splitting into separate _use_digest and _digest
properties.
2021-08-20 10:41:36 +02:00
Nikita Popov 32d663e198 Declare SoapFault properties 2021-08-20 10:08:22 +02:00
Nikita Popov 44befbdc01 Don't convert Error exception to SoapFault
Error exceptions should generally not be converted into domain-
specific exception types. They indicate programming errors that
should not be handled locally.
2021-08-20 10:06:11 +02:00
Nikita Popov 018cb891cf Declare some SoapClient properties
This is only a subset of all properties for now (those without
underscore).
2021-08-19 16:15:41 +02:00
Nikita Popov e861cb5c31 Simplify some strtolower operations in ext/soap 2021-08-19 16:10:30 +02:00
Nikita Popov e6d4b3077d Simplify constructor invocation in ext/soap
Use ce->constructor and zend_call_known_instance_method. There
is no need to look up a method with the same name as the class
anymore.
2021-08-19 16:04:43 +02:00
Nikita Popov 7d4f2f5392 Declare SoapHeader properties 2021-08-19 14:27:09 +02:00
Nikita Popov bdf8b9ed2d Declare SoapServer::$service property 2021-08-19 14:10:21 +02:00
Nikita Popov c58c926034 Declare SoapVar properties 2021-08-19 12:35:37 +02:00
Nikita Popov 030bb36ed7 Declare SoapParam properties 2021-08-19 11:48:56 +02:00
Nikita Popov 6cc4e3280e Only assign $severity for ErrorException
This code is used by generic EH_THROW with arbitrary Exception
types, while only ErrorException has a $severity property. We
don't want this code to add $severity properties to random
exception types like PDOException.
2021-08-19 11:05:08 +02:00
Nikita Popov 29c6eb6cf5 Declare Directory properties
Some error handling test changes, as changes to the $handle
property are now detected earlier.
2021-08-19 10:39:23 +02:00
hassan 7e84b1ee00 Fix path printing in ext_skel (#7387) 2021-08-19 09:43:32 +02:00
Bob Weinand 1440d15e00 Add missing zend_test requirement to ffi test for bug80847 2021-08-18 17:16:54 +02:00
Christoph M. Becker eaa3532b04 Merge branch 'PHP-8.0'
* PHP-8.0:
  Fix #78819: Heap Overflow in msg_send
2021-08-18 16:39:36 +02:00
Christoph M. Becker 465b3ab2f9 Merge branch 'PHP-7.4' into PHP-8.0
* PHP-7.4:
  Fix #78819: Heap Overflow in msg_send
2021-08-18 16:37:58 +02:00
Christoph M. Becker 9494b1cdc4 Fix #78819: Heap Overflow in msg_send
We need to use the proper type.

Closes GH-7386.
2021-08-18 16:35:16 +02:00
Christoph M. Becker 7c53e7def8 Merge branch 'PHP-8.0'
* PHP-8.0:
  Fix #73122: Integer Overflow when concatenating strings
2021-08-18 14:54:29 +02:00
Christoph M. Becker d71a0dcc76 Merge branch 'PHP-7.4' into PHP-8.0
* PHP-7.4:
  Fix #73122: Integer Overflow when concatenating strings
2021-08-18 14:52:59 +02:00
Christoph M. Becker 0b7dffb41f Fix #73122: Integer Overflow when concatenating strings
We must avoid integer overflows in memory allocations, so we introduce
an additional check in the VM, and bail out in the rare case of an
overflow.

Closes GH-7381.
2021-08-18 14:49:09 +02:00
Nikita Popov a991fe51f8 Test file cache mix (file -> shm) 2021-08-18 14:24:46 +02:00
Nikita Popov ba8e5d336b Merge branch 'PHP-8.0'
* PHP-8.0:
  Test file_cache prime shm + use file combination
  Fix repeated file cache unserialization of zval string
2021-08-18 12:39:47 +02:00
Nikita Popov 3454ea36a4 Test file_cache prime shm + use file combination
We're currently only testing prime shm + use shm and prime file +
use file.

This adds testing for the prime shm + use file combination. The
prime file + use shm combination is broken on PHP-8.0, so not
tested.
2021-08-18 12:38:36 +02:00
Nikita Popov de7ba3e737 Fix repeated file cache unserialization of zval string
The IS_UNSERIALIZED check here does not work if the string is
interned (serialized with file_cache_only=0) but unserialization
happens with file_cache_only=1. In this case the unserializde
string will be in the str area after mem, which is not included
in the script size, and which is also not accessible at this
point without threading through more information. Work around
the problem by checking for the serialized representation instead.
2021-08-18 12:38:27 +02:00
MARiA so cute aec08cc841 Improve the success rate when use mkdir() in multiprocessing environment (#7383)
Improve the success rate when use mkdir() in multiprocessing environment
2021-08-18 12:34:04 +02:00
Nikita Popov 0b98ac69d9 Merge branch 'PHP-8.0'
* PHP-8.0:
  Backport Laravel test hack
2021-08-18 09:57:38 +02:00
Nikita Popov 8f1a217a1f Merge branch 'PHP-7.4' into PHP-8.0
* PHP-7.4:
  Backport Laravel test hack
2021-08-18 09:57:31 +02:00
Nikita Popov 51147e2f18 Backport Laravel test hack
The way to work around this changed, backport the version from
master.
2021-08-18 09:55:24 +02:00
Nikita Popov e86a0a905d Assert that file cache does not contain references 2021-08-17 17:13:19 +02:00
Ben Ramsey 90a6003835 The master branch is now for 8.1.0RC1 2021-08-17 09:40:29 -05:00
Christoph M. Becker 0422b85aaf Merge branch 'PHP-8.0'
* PHP-8.0:
  Revert "Fix #73122: Integer Overflow when concatenating strings"
  Fix #73122: Integer Overflow when concatenating strings
2021-08-17 16:00:01 +02:00
Christoph M. Becker 11cb508006 Merge branch 'PHP-7.4' into PHP-8.0
* PHP-7.4:
  Revert "Fix #73122: Integer Overflow when concatenating strings"
  Fix #73122: Integer Overflow when concatenating strings
2021-08-17 15:58:58 +02:00
Christoph M. Becker f3c45c1731 Revert "Fix #73122: Integer Overflow when concatenating strings"
This reverts commit f1ce8d5f58, which has
been accidentially pushed.
2021-08-17 15:57:32 +02:00
Christoph M. Becker f1ce8d5f58 Fix #73122: Integer Overflow when concatenating strings
We must avoid integer overflows in memory allocations, so we introduce
an additional check in the VM, and bail out in the rare case of an
overflow.  Since the recent fix for bug #74960 still doesn't catch all
possible overflows, we fix that right away.
2021-08-17 15:48:58 +02:00
Nikita Popov ddc21b0902 Fix phar test
As the REPORT_ERRORS flag is now respected, this no longer
throws a warning (in addition to the exception).
2021-08-17 14:57:17 +02:00