1
0
mirror of https://github.com/php/php-src.git synced 2026-03-24 00:02:20 +01:00
Commit Graph

140047 Commits

Author SHA1 Message Date
Ilija Tovilo
0c303b2043 Merge branch 'PHP-8.3' into PHP-8.4
* PHP-8.3:
  [skip ci] Bump retries in benchmark diff when looking for benchmarked commits
2025-08-06 22:29:36 +02:00
Ilija Tovilo
44618752f9 [skip ci] Bump retries in benchmark diff when looking for benchmarked commits 2025-08-06 22:28:56 +02:00
Ilija Tovilo
c3467bd173 Merge branch 'PHP-8.3' into PHP-8.4
* PHP-8.3:
  [skip ci] Fix Symfony COMMUNITY build for new phpunit version
2025-08-06 15:10:17 +02:00
Ilija Tovilo
3aa4209ef6 Merge branch 'PHP-8.2' into PHP-8.3
* PHP-8.2:
  [skip ci] Fix Symfony COMMUNITY build for new phpunit version
2025-08-06 15:10:07 +02:00
Ilija Tovilo
a8cea0c09b Merge branch 'PHP-8.1' into PHP-8.2
* PHP-8.1:
  [skip ci] Fix Symfony COMMUNITY build for new phpunit version
2025-08-06 15:10:01 +02:00
Ilija Tovilo
0ac37fb74d [skip ci] Fix Symfony COMMUNITY build for new phpunit version
--exclude-group no longer accepts a comma-separated list. Doc block comments are
no longer supported, switch to attributes.
2025-08-06 15:07:45 +02:00
Ilija Tovilo
0b1aa86c71 Merge branch 'PHP-8.3' into PHP-8.4
* PHP-8.3:
  [skip ci] Skip segfaulting OOM test in GH actions on Win
2025-08-06 14:29:36 +02:00
Ilija Tovilo
5be04e25fd [skip ci] Skip segfaulting OOM test in GH actions on Win
This only fails on the PHP-8.3 branch, most likely to be related to the
environment as discussed with Niels.
2025-08-06 14:28:47 +02:00
Ilija Tovilo
d628ed5963 Merge branch 'PHP-8.3' into PHP-8.4
* PHP-8.3:
  COMMUNTIY build grouping adjustments
2025-08-06 14:20:32 +02:00
Ilija Tovilo
bf6a74d2f9 Merge branch 'PHP-8.2' into PHP-8.3
* PHP-8.2:
  COMMUNTIY build grouping adjustments
2025-08-06 14:20:26 +02:00
Ilija Tovilo
9cbc09d189 Merge branch 'PHP-8.1' into PHP-8.2
* PHP-8.1:
  COMMUNTIY build grouping adjustments
2025-08-06 14:20:17 +02:00
Ilija Tovilo
a63e97667e COMMUNTIY build grouping adjustments
Unconditionally execute assignment of EXIT_CODE. Otherwise, the variable bleeds
into the next iteration. Also add newline before ::endgroup::. ASAN does not add
a trailing newline.
2025-08-06 14:18:43 +02:00
Ilija Tovilo
e7c8361089 Merge branch 'PHP-8.3' into PHP-8.4
* PHP-8.3:
  [skip ci] Add fuzzer binaries to .gitignore
2025-08-06 14:01:25 +02:00
Ilija Tovilo
c286cb8a1e [skip ci] Add fuzzer binaries to .gitignore 2025-08-06 14:00:44 +02:00
Shivam Mathur
6147be32fc Merge branch 'PHP-8.3' into PHP-8.4 2025-08-06 00:05:28 +00:00
Shivam Mathur
f08ac4f1c9 Merge branch 'PHP-8.2' into PHP-8.3 2025-08-06 00:04:58 +00:00
Shivam Mathur
871de14ceb Merge branch 'PHP-8.1' into PHP-8.2 2025-08-06 00:03:49 +00:00
Shivam Mathur
8199cad99f Fix master branch check in find-target-branch.bat (#19385) 2025-08-06 05:32:36 +05:30
Ilija Tovilo
fbc705c3bd Merge branch 'PHP-8.3' into PHP-8.4
* PHP-8.3:
  [skip ci] Group component output in community job
2025-08-05 15:44:21 +02:00
Ilija Tovilo
cdfd663266 Merge branch 'PHP-8.2' into PHP-8.3
* PHP-8.2:
  [skip ci] Group component output in community job
2025-08-05 15:44:07 +02:00
Ilija Tovilo
dde094a442 Merge branch 'PHP-8.1' into PHP-8.2
* PHP-8.1:
  [skip ci] Group component output in community job
2025-08-05 15:43:58 +02:00
Ilija Tovilo
1c65cc3998 [skip ci] Group component output in community job 2025-08-05 15:43:46 +02:00
Ilija Tovilo
9f800aedfe Merge branch 'PHP-8.3' into PHP-8.4
* PHP-8.3:
  [skip ci] Add zend_jit_arm64.c to gitignore
2025-08-04 23:12:33 +02:00
Ilija Tovilo
bfd42b060d Merge branch 'PHP-8.2' into PHP-8.3
* PHP-8.2:
  [skip ci] Add zend_jit_arm64.c to gitignore
2025-08-04 23:12:22 +02:00
Ilija Tovilo
f077c9d233 [skip ci] Add zend_jit_arm64.c to gitignore
This is not generated in CI since moving to macOS 14, which is arm based.
2025-08-04 23:12:09 +02:00
Ilija Tovilo
44d63a8ac0 Merge branch 'PHP-8.3' into PHP-8.4
* PHP-8.3:
  Upgrade to macOS 14 and backport necessary changes
2025-08-04 22:21:21 +02:00
Ilija Tovilo
234159d911 Merge branch 'PHP-8.2' into PHP-8.3
* PHP-8.2:
  Upgrade to macOS 14 and backport necessary changes
2025-08-04 22:20:06 +02:00
Ilija Tovilo
7ba4453f8f Merge branch 'PHP-8.1' into PHP-8.2
* PHP-8.1:
  Upgrade to macOS 14 and backport necessary changes
2025-08-04 22:19:59 +02:00
Ilija Tovilo
e9e432a35d Upgrade to macOS 14 and backport necessary changes 2025-08-04 22:12:30 +02:00
Ilija Tovilo
bd7ffc911d Merge branch 'PHP-8.3' into PHP-8.4
* PHP-8.3:
  Fix filtering of INI directives to respect leading whitespaces
2025-08-04 16:56:51 +02:00
Arndt Kaiser
9d29283392 Fix filtering of INI directives to respect leading whitespaces
Directives are now correctly filtered out if the line in the php.ini
file begins with whitespace characters.

Closes GH-19348
2025-08-04 16:55:46 +02:00
Dmitry Stogov
ac1cd9c26e Update IR
IR commit: 6e2aea0ebfef2c741ebec30c57aa492df0d4e319
2025-08-04 17:26:24 +03:00
Ilija Tovilo
b3f4863373 Merge branch 'PHP-8.3' into PHP-8.4
* PHP-8.3:
  Fix circumvented type check with return by ref + finally
2025-08-01 00:36:28 +02:00
Ilija Tovilo
d0fad34230 Fix circumvented type check with return by ref + finally
Fixes GH-18736
Closes GH-19172
2025-08-01 00:35:48 +02:00
Ilija Tovilo
5d40592fe2 Fix stale nInternalPosition on rehashing
Since GH-13188 we're no longer immediately updating iterator positions when
deleting array elements. zend_hash_rehash() needs to adapt accordingly by
adjusting nInternalPosition for IS_UNDEF elements. This is already the case for
array iterators.

Fixes GH-19280
Closes GH-19323
2025-07-31 21:55:08 +02:00
Niels Dossche
771bfaf34d Remove dynamic defs from property hooks
Otherwise this hits an assertion failure in pass2 reversal and causes a
subsequent crash.

Closes GH-19206.
2025-07-31 20:22:11 +02:00
Niels Dossche
9ce51dad8b Add missing hooks JIT restart code
Closes GH-19207.
2025-07-31 20:21:40 +02:00
Niels Dossche
b82c8ba7fe Merge branch 'PHP-8.3' into PHP-8.4
* PHP-8.3:
  Fix GH-19300: Nested array_multisort invocation with error breaks
2025-07-31 19:01:13 +02:00
Niels Dossche
a96b05e63f Fix GH-19300: Nested array_multisort invocation with error breaks
There are 2 issues:
1. When a MULTISORT_ABORT happens, it frees func, but func may point to
   ARRAYG(multisort_func), which would be a problem with nested
   invocations as it can destroy that of the "parent" invocation.
   To solve this, delay assigning to the globals.
2. The old globals were not restored which means that nested invocations
   with different flags will cause a wrong sorting function to be used.

Closes GH-19319.
2025-07-31 19:00:45 +02:00
Arnaud Le Blanc
781d77ac54 Merge branch 'PHP-8.3' into PHP-8.4
* PHP-8.3:
  Prevent throwing in running generator
2025-07-31 14:29:01 +02:00
Arnaud Le Blanc
6fa8a25a40 Prevent throwing in running generator
Generator::throw() on a running generator is not allowed. It throws "Cannot
resume an already running generator" when trying to resume the generator to
handle the provided exception.

However, when calling Generator::throw() on a generator with a non-Generator
delegate, we release the delegate regardless. If a Fiber was suspended in
the delegate, this causes use after frees when the Fiber is resumed.

Fix this by throwing "Cannot resume an already running generator" earlier.

Fixes GH-19326
Closes GH-19327
2025-07-31 14:26:41 +02:00
Arnaud Le Blanc
a430ee2dd2 Merge branch 'PHP-8.3' into PHP-8.4
* PHP-8.3:
  Prevent resumption of generator suspended in yield from
2025-07-31 08:46:06 +02:00
Arnaud Le Blanc
0406a55c92 Prevent resumption of generator suspended in yield from
Normally we prevent generators from being resumed while they are already
running, but we failed to do so for generators delegating to non-Generators. As
a result such generator can be resumed, terminated, which causes unexpected
results (crashes) later.

In gh19306.phpt in particular, the generator delegate It::getIterator() suspends
while being called by generator g(). We then resume g(), which throws while
trying to resume It::getIterator(). This causes g() and It::getIterator()
to be released. We then UAF when resuming the Fiber in It::getIterator().

Fix this by ensuring that generators are marked as running while they fetch
the next value from the delegate.

Fixes GH-19306
Closes GH-19315
2025-07-31 08:45:19 +02:00
Niels Dossche
a08df32f18 Merge branch 'PHP-8.3' into PHP-8.4
* PHP-8.3:
  Fix GH-19303: Unpacking empty packed array into uninitialized array causes assertion failure
2025-07-30 22:48:59 +02:00
Niels Dossche
5bd5f352e5 Fix GH-19303: Unpacking empty packed array into uninitialized array causes assertion failure
Having an empty result array is not a problem, because zend_hash_extend()
will initialize it. Except it does not when the number of elements to add
equals 0, which leaves the array uninitialized and therefore does not
set the packed flag, causing the assertion failure.

Technically, removing the assert would also work and save a check.
On the other hand, this check could also prevent some real work to be
done and should be relatively cheap as we already have to compute the
sum anyway.

Closes GH-19318.
2025-07-30 22:47:11 +02:00
Arnaud Le Blanc
28ed4e6ec0 Merge branch 'PHP-8.3' into PHP-8.4
* PHP-8.3:
  Prevent operands from being released during comparison
2025-07-30 18:11:32 +02:00
Arnaud Le Blanc
bc4b6ce7a8 Prevent operands from being released during comparison
Fixes GH-19305
Closes GH-19309
2025-07-30 18:09:24 +02:00
Ilija Tovilo
138ebf481b Merge branch 'PHP-8.3' into PHP-8.4
* PHP-8.3:
  Fix failed assertion with throwing __toString in binary const expr
2025-07-30 13:34:32 +02:00
Ilija Tovilo
80022c035b Fix failed assertion with throwing __toString in binary const expr
Solve this with the same pattern as ZEND_AST_GREATER[_EQUAL].

Fixes OSS-Fuzz #434346548
Closes GH-19291
2025-07-30 13:34:01 +02:00
Niels Dossche
6fda0a5617 Merge branch 'PHP-8.3' into PHP-8.4
* PHP-8.3:
  Reset global pointers to prevent use-after-free
2025-07-30 09:23:33 +02:00