Commit Graph

134280 Commits

Author SHA1 Message Date
Niels Dossche
6edbbc1c3e Implement GH-12385: flush headers without body when calling flush()
Closes GH-12785.
2023-12-01 17:15:57 +01:00
Niels Dossche
2af22ab786 Merge branch 'PHP-8.3'
* PHP-8.3:
  Fix GH-12826: Weird pointers issue in nested loops
  Fix GH-12838: [SOAP] Temporary WSDL cache files not being deleted
2023-12-01 17:12:33 +01:00
Niels Dossche
b175ea4215 Fix GH-12826: Weird pointers issue in nested loops
This regressed in cd53ce838a.
The loop with `zend_hash_iterators_update` hangs forever because
`iter_pos` can't advance to idx. This is because the
`zend_hash_iterators_lower_pos` upper bound is `target->nNumUsed`,
but that is set to `source->nNumOfElements`.
That means that if there are holes in the array, we still loop over all
the buckets but the number of bucket slots will not match.
Fix it by changing the assignment.

Closes GH-12831.
2023-12-01 17:12:18 +01:00
Niels Dossche
c46fd35f7b Merge branch 'PHP-8.2' into PHP-8.3
* PHP-8.2:
  Fix GH-12838: [SOAP] Temporary WSDL cache files not being deleted
2023-12-01 17:11:43 +01:00
Niels Dossche
4eee81b509 Fix GH-12838: [SOAP] Temporary WSDL cache files not being deleted
If there are two users that can execute the script that caches a WSDL,
but the script is owned by a single user, then the caching code will
name the cached file with the file owner username and a hash of the uri.
When one of the two tries to rename the file created by the other
process, this does not work because it has no permission to do so.
This then leaves temporary files floating in the temp directory.

To fix the immediate problem, unlink the file after rename has failed.
On the long term, this has to be fixed by taking the username of the
process instead of the username of the file owner.

Closes GH-12841.
2023-12-01 17:10:58 +01:00
Ilija Tovilo
30acbba2ca
Merge branch 'PHP-8.3'
* PHP-8.3:
  Fix leak of call->extra_named_params on internal __call
2023-12-01 16:50:56 +01:00
Ilija Tovilo
b7a468cd06
Merge branch 'PHP-8.2' into PHP-8.3
* PHP-8.2:
  Fix leak of call->extra_named_params on internal __call
2023-12-01 16:50:49 +01:00
Ilija Tovilo
f203edd3c5
Fix leak of call->extra_named_params on internal __call
Fixes GH-12835
Closes GH-12836
2023-12-01 16:49:16 +01:00
Jakub Zelenka
2d8f7df3b4
Merge branch 'PHP-8.3' 2023-12-01 14:49:22 +00:00
Jakub Zelenka
c74fc4c5b0
Merge branch 'PHP-8.2' into PHP-8.3 2023-12-01 14:47:57 +00:00
Jakub Zelenka
2303e76740
Merge branch 'PHP-8.1' into PHP-8.2 2023-12-01 14:45:48 +00:00
Patrick Prasse
df259f88da
Fix bug GH-12705: Segmentation fault in fpm_status_export_to_zval
Closes GH-12706
2023-12-01 14:43:58 +00:00
Dmitry Stogov
77781f0cbc Merge branch 'PHP-8.3'
* PHP-8.3:
  Fixed type inference
2023-12-01 17:09:53 +03:00
Dmitry Stogov
8c9b5996be Merge branch 'PHP-8.2' into PHP-8.3
* PHP-8.2:
  Fixed type inference
2023-12-01 17:09:09 +03:00
Dmitry Stogov
1e55c97601 Fixed type inference
Fixes oss-fuzz #64577, #64579, #64589
2023-12-01 17:08:16 +03:00
Jakub Zelenka
0c29d5edb7
Update release-process docs with info about first version release (#12765)
This is some additional info that might help to future RM's - those are the bits that are stumbled and felt they need to be clarified when releasing PHP-8.3.0
2023-12-01 11:58:52 +00:00
Peter Kokot
dc1fbe4027
Remove duplicated socket check (#12839)
Check is already done in configure.ac.
2023-12-01 11:57:38 +00:00
Peter Kokot
63ae7635c4
Remove ODBCRouter artifacts (#12846)
ODBCRouter flavor in odbc extension(s) was removed in PHP 7.3 via
398be731e6.
2023-12-01 10:26:33 +00:00
Peter Kokot
359f78492e
Remove outdated link to PHP introduction in PHP FPM (#12842) 2023-12-01 10:26:18 +00:00
Vinicius Dias
f1af7223f8
Fixing incorrect error message when passing null to join/implode's array parameter (#12683)
Closes GH-12682
2023-12-01 09:55:20 +00:00
Dmitry Stogov
c779bdc953 Fix Windoes build 2023-12-01 12:41:42 +03:00
Dmitry Stogov
bf6b66febe Restored support for CPU cache demotion 2023-12-01 11:56:02 +03:00
Dmitry Stogov
9c0ca381d7 Update IR
IR commit: ed4fd9e5efeb676e88b29c40893d7e8154cab44b
2023-12-01 11:54:51 +03:00
Niels Dossche
f283f50f1a Merge branch 'PHP-8.3'
* PHP-8.3:
  Add missing NULL checks for spl autoload table
  Add missing NULL pointer checks related to the previous call frame
2023-12-01 09:11:32 +01:00
Niels Dossche
0e69329bb0 Merge branch 'PHP-8.2' into PHP-8.3
* PHP-8.2:
  Add missing NULL checks for spl autoload table
  Add missing NULL pointer checks related to the previous call frame
2023-12-01 09:09:58 +01:00
Niels Dossche
9a69bb2d58 Add missing NULL checks for spl autoload table
Closes GH-12840.
2023-12-01 09:09:17 +01:00
Niels Dossche
bedf1083f3 Add missing NULL pointer checks related to the previous call frame 2023-12-01 09:08:47 +01:00
Dmitry Stogov
4d51d588b9 JIT: Specify fastcall calling convenrion through dummy function prototype 2023-11-30 21:35:32 +03:00
Dmitry Stogov
4630f77ee4 Update IR
IR commit: a746ceb6506b21705bd35473144c60194ae3191d
2023-11-30 21:34:26 +03:00
Niels Dossche
f3ece813ff
Optimize size of ext/dom (#12830)
* Remove unused upper case tag static data

* Shrink size of static binary search tree

This also makes it more efficient on the data cache.

* Update patches
2023-11-29 22:27:00 +01:00
Niels Dossche
37a1e191dd Merge branch 'PHP-8.3'
* PHP-8.3:
  Test fixes for libxml2 2.12.0
2023-11-29 20:53:21 +01:00
Niels Dossche
5be5a3dfdb Merge branch 'PHP-8.2' into PHP-8.3
* PHP-8.2:
  Test fixes for libxml2 2.12.0
2023-11-29 20:53:13 +01:00
Niels Dossche
061058a9b1 Test fixes for libxml2 2.12.0 2023-11-29 20:52:01 +01:00
Niels Dossche
ae83d6ab07
Fix issues related to libxml2 2.12.0 (#12802)
* Avoid passing NULL to xmlSwitchToEncoding

This otherwise switches to UTF-8 on libxml2 2.12.0

* Split tests for different error reporting behaviour in libxml2 2.12.0

* Avoid deprecation warnings for libxml2 2.12.0

We can't fully get rid of the parser globals as there are still APIs
that implicitly use them.

* Temporarily disable part of test for libxml 2.12.0 regression

See https://gitlab.gnome.org/GNOME/libxml2/-/issues/634

* Review fixes

* [ci skip] Update test description
2023-11-29 20:46:35 +01:00
Ilija Tovilo
e3de478f66
Merge branch 'PHP-8.3'
* PHP-8.3:
  Fix travis_wait
2023-11-29 10:36:15 +01:00
Ilija Tovilo
2751aa3894
Merge branch 'PHP-8.2' into PHP-8.3
* PHP-8.2:
  Fix travis_wait
2023-11-29 10:35:34 +01:00
Ilija Tovilo
706e51ad8a
Fix travis_wait
It seems travis_wait is broken. Output skipped tests to avoid the timeout.

Closes GH-12822
2023-11-29 10:35:09 +01:00
Dmitry Stogov
29a70828b9 Update IR
IR commit: 81047af575864c5dfd5fda62394ada46cc9cae27
2023-11-29 12:27:05 +03:00
yang yuhan
566100d7fe
Enhance moving PHP code pages into huge pages (#12806)
The former implementation of huge pages for PHP code segments may
fail to map in certain scenarios. For instance, if the initial
'r-x-' segment is not PHP, it will result in a failure to map into
huge pages. Consequently, the optimization for huge pages with PHP
code will no longer be effective.

This patch improves the implementation by accurately matching all
'r-x-' segments until it locates the PHP code segment. Subsequently,
it performs the necessary huge page mapping.


Reviewed-by: chen-hu-97 <hu1.chen@intel.com>

Signed-off-by: PeterYang12 <yuhan.yang@intel.com>
2023-11-29 10:49:23 +03:00
Ilija Tovilo
407fba9a64
Merge branch 'PHP-8.3'
* PHP-8.3:
  [skip ci] Skip resource intensive tidy test on GA
2023-11-29 00:27:54 +01:00
Ilija Tovilo
340c58de98
Merge branch 'PHP-8.2' into PHP-8.3
* PHP-8.2:
  [skip ci] Skip resource intensive tidy test on GA
2023-11-29 00:27:44 +01:00
Ilija Tovilo
752192700f
[skip ci] Skip resource intensive tidy test on GA 2023-11-29 00:27:17 +01:00
Dmitry Stogov
8495522963 Merge branch 'PHP-8.3'
* PHP-8.3:
  Fixed GH-8251: Narrowing occurred during type inference of ZEND_FETCH_DIM_W
2023-11-28 23:34:45 +03:00
Dmitry Stogov
64851873da Merge branch 'PHP-8.2' into PHP-8.3
* PHP-8.2:
  Fixed GH-8251: Narrowing occurred during type inference of ZEND_FETCH_DIM_W
2023-11-28 23:33:45 +03:00
Dmitry Stogov
423a1e586e Fixed GH-8251: Narrowing occurred during type inference of ZEND_FETCH_DIM_W 2023-11-28 22:49:39 +03:00
Alex Dowad
175b438abe Fix spurious failures of php-fuzz-mbstring 2023-11-28 21:04:17 +02:00
Niels Dossche
f1bc43b418
Use size_t for string lengths in ext/xml compat layer (#12808)
This is _not_ exploitable right now because libxml guarantees right now
a maximum string length of 1M bytes. But if that limit were to ever
change this could overflow in the future leading to exploits.
Again, not exploitable right now, but just making it more future-proof.
2023-11-28 19:51:25 +01:00
Niels Dossche
803cd824e5
Optimizations for mb_trim (#12803)
* Fast path for when there is nothing to trim in mb_trim

* Make mb_trim decide between linear search vs hash table lookup

Using empirical experiments I noticed that on my i7-4790 the hash table
approach becomes faster once we have more than 4 code points in the trim
characters, when evaluated on the worst case.

This patch changes the logic so that a hash table is used for a large
number of trim characters, and linear search when the number of trim
characters is <= 4.
2023-11-28 19:49:36 +01:00
Dmitry Stogov
fc1b467d0b Merge branch 'PHP-8.3'
* PHP-8.3:
  Fixed GH-12812: Integer string in variable used as offset produces wrong undefined array key warning (#12817)
2023-11-28 21:46:37 +03:00
Dmitry Stogov
8b5767af75 Merge branch 'PHP-8.2' into PHP-8.3
* PHP-8.2:
  Fixed GH-12812: Integer string in variable used as offset produces wrong undefined array key warning (#12817)
2023-11-28 21:20:35 +03:00