Commit graph

140618 commits

Author SHA1 Message Date
Calvin Buckley
fca13796ef
Merge branch 'PHP-8.4'
* PHP-8.4:
  Attempt at ppc64 CI (#17945)
2025-03-03 12:41:51 -04:00
Calvin Buckley
7ae8f93e45
Merge branch 'PHP-8.3' into PHP-8.4
* PHP-8.3:
  Attempt at ppc64 CI (#17945)
2025-03-03 12:41:41 -04:00
Calvin Buckley
1615a21cd8
Merge branch 'PHP-8.2' into PHP-8.3
* PHP-8.2:
  Attempt at ppc64 CI (#17945)
2025-03-03 12:41:27 -04:00
Calvin Buckley
aae9cd7b11
Merge branch 'PHP-8.1' into PHP-8.2
* PHP-8.1:
  Attempt at ppc64 CI (#17945)
2025-03-03 12:40:46 -04:00
Calvin Buckley
4694c3e997
Attempt at ppc64 CI (#17945)
This assumes gentoo (which has best ppc64be support of mainstream
distributions).

(Rebased onto the new workflow_call approach)
2025-03-03 10:04:02 -04:00
Pascal Chevrel
ff88701b77
Fix GH-17956 Internal dev server 404 page is not responsive
Add a basic viewport html meta tag with responsive mode parameters
See: https://developer.mozilla.org/en-US/docs/Web/HTML/Viewport_meta_tag

Updated existing tests

close GH-17957
2025-03-03 12:05:00 +00:00
Niels Dossche
0097ad8eb3
Merge branch 'PHP-8.4'
* PHP-8.4:
  Fix GH-17938: UAF with zend_test opline observer and magic_quotes_gpc=1 (#17958)
2025-03-03 08:22:55 +01:00
Niels Dossche
4c751ec04c
Merge branch 'PHP-8.3' into PHP-8.4
* PHP-8.3:
  Fix GH-17938: UAF with zend_test opline observer and magic_quotes_gpc=1 (#17958)
2025-03-03 08:22:49 +01:00
Niels Dossche
98e0501343
Drop support for -z CLI/CGI option
This functionality didn't actually work.
This was discussed on the mailing list [1] and no one objected.

[1] https://externals.io/message/126368

Closes GH-17883.
2025-03-03 08:21:56 +01:00
Niels Dossche
504056888c
Fix GH-17938: UAF with zend_test opline observer and magic_quotes_gpc=1 (#17958) 2025-03-03 08:20:48 +01:00
Niels Dossche
1ae2c871d0
Avoid unnecessary string refcounting in ext/date (#17890) 2025-03-02 22:55:06 +01:00
Niels Dossche
d95b9d6d32
Merge branch 'PHP-8.4'
* PHP-8.4:
  Fix GH-17736: Assertion failure zend_reference_destroy()
2025-03-02 22:41:21 +01:00
Niels Dossche
ee4a9a4a7c
Merge branch 'PHP-8.3' into PHP-8.4
* PHP-8.3:
  Fix GH-17736: Assertion failure zend_reference_destroy()
2025-03-02 22:37:07 +01:00
Niels Dossche
ce8ab5f16a
Fix GH-17736: Assertion failure zend_reference_destroy()
The cache slot for FETCH_OBJ_W in function `test` is primed with the
class for C. The next call uses a simplexml instance and reuses the same
cache slot. simplexml's get_property_ptr handler does not use the cache
slot, so the old values remain in the cache slot. When
`zend_handle_fetch_obj_flags` is called this is not guarded by a check
for the class entry. So we end up using the prop_info from the property
C::$a instead of the simplexml property.

This patch adds a reset to the cache slots in the property address fetch
code and also in the extensions with a non-standard reference handler.
This keeps the run time cache consistent and avoids the issue without
complicating the fast paths.

Closes GH-17739.
2025-03-02 22:33:32 +01:00
Calvin Buckley
3677871347
Use pkg-config for ext/ldap without a directory (#17441)
* Use pkg-config for ext/ldap without a directory

The existing check is not very good. OpenLDAP has been shipping a
pkg-config file for a while now, and that's preferable over trying to
manually find it.

Note that for older OpenLDAP or non-OpenLDAP implementations, a
directory can still be passed to use the old logic. Note that Oracle
LDAP is busted and going away soon; I'm not sure for other LDAP
implementations.

Tested on macOS 14.

* Convert added ifs to AS_IF
2025-02-28 14:39:31 -04:00
Jakub Zelenka
2e7b6dac31
Merge branch 'PHP-8.4' 2025-02-28 14:52:37 +01:00
Jakub Zelenka
4936c32772
Merge branch 'PHP-8.3' into PHP-8.4 2025-02-28 14:51:52 +01:00
Jakub Zelenka
6bb56fe0cf
Change openssl_x509_verify test to use cert generator (#17882)
This also prevents verifying cert with SHA1 signature
2025-02-28 14:51:12 +01:00
Niels Dossche
0c4d13a822
Merge branch 'PHP-8.4'
* PHP-8.4:
  Fix branch target in zend_jit_push_call_frame() (#17949)
2025-02-28 09:22:32 +01:00
Niels Dossche
9e779dae7b
Merge branch 'PHP-8.3' into PHP-8.4
* PHP-8.3:
  Fix branch target in zend_jit_push_call_frame() (#17949)
2025-02-28 09:22:25 +01:00
Niels Dossche
422e90db3b
Fix branch target in zend_jit_push_call_frame() (#17949)
Introduced by accident in 3b4a58da44.
Will request a cherry-pick.
2025-02-28 09:20:02 +01:00
Tim Düsterhus
da1e254652
Merge branch 'PHP-8.4'
* PHP-8.4:
  Fix `ReflectionFunction::isDeprecated()` for materialized `__call()` (#17914)
2025-02-27 14:48:24 +01:00
Tim Düsterhus
2e999bad34
Fix ReflectionFunction::isDeprecated() for materialized __call() (#17914)
* Fix `ReflectionFunction::isDeprecated()` for materialized `__call()`

Fixes php/php-src#17913

* NEWS
2025-02-27 14:48:08 +01:00
Art Kay
2b2a70d45e
Fix a number of typos in comments / docs
Co-authored-by: Michael Voříšek <mvorisek@mvorisek.cz>

Closes GH-17874
2025-02-26 22:57:31 +01:00
Ilija Tovilo
8f21763616
Merge branch 'PHP-8.4'
* PHP-8.4:
  Fix varying pgsql error message
2025-02-26 21:30:32 +01:00
Ilija Tovilo
8be263d2a1
Fix varying pgsql error message 2025-02-26 21:30:24 +01:00
Ilija Tovilo
949e10e4c1
Merge branch 'PHP-8.4'
* PHP-8.4:
  Fix circumvented added hooks in JIT
2025-02-26 21:26:39 +01:00
Ilija Tovilo
376e90fbf2
Fix circumvented added hooks in JIT
The following code poses a problem in the JIT:

```php
class A {
    public $prop = 1;
}

class B extends A {
    public $prop = 1 {
        get => parent::$prop::get() * 2;
    }
}

function test(A $a) {
    var_dump($a->prop);
}

test(new B);
```

The JIT would assume A::$prop in test() could be accessed directly
through OBJ_PROP_NUM(). However, since child classes can add new hooks
to existing properties, this assumption no longer holds.

To avoid introducing more JIT checks, a hooked property that overrides a
unhooked property now results in a separate zval slot that is used
instead of the parent slot. This causes the JIT to pick the slow path
due to an IS_UNDEF value in the parent slot.

zend_class_entry.properties_info_table poses a problem in that
zend_get_property_info_for_slot() and friends will be called using the
child slot, which does not store its property info, since the parent
slot already does. In this case, zend_get_property_info_for_slot() now
provides a fallback that will iterate all property infos to find the
correct one.

This also uncovered a bug (see Zend/tests/property_hooks/dump.phpt)
where the default value of a parent property would accidentally be
inherited by the child property.

Fixes GH-17376
Closes GH-17870
2025-02-26 21:26:00 +01:00
Ilija Tovilo
15c2477273
Merge branch 'PHP-8.4'
* PHP-8.4:
  Fix accidentally inherited default value in overridden virtual properties
2025-02-26 21:17:49 +01:00
Ilija Tovilo
e0c69dde02
Fix accidentally inherited default value in overridden virtual properties
Discovered when working on GH-17376.
2025-02-26 21:16:58 +01:00
Ilija Tovilo
84d00ec58f
Merge branch 'PHP-8.4'
* PHP-8.4:
  Fix property hook backing value access in multi-level inheritance
2025-02-26 20:49:15 +01:00
Ilija Tovilo
7a55116f12
Fix property hook backing value access in multi-level inheritance
Discovered by Niels when testing GH-17376.
2025-02-26 20:49:07 +01:00
David Carlier
d6cd754121
Merge branch 'PHP-8.4' 2025-02-25 21:56:01 +00:00
David Carlier
c8bead8393
Merge branch 'PHP-8.3' into PHP-8.4 2025-02-25 21:55:46 +00:00
David Carlier
8cbc0c57b7
Fix GH-17921 socket_read/socket_recv overflows on buffer size.
update the existing checks to be more straightforward instead of
counting on undefined behavior.

close GH-17923
2025-02-25 21:54:24 +00:00
Niels Dossche
265ac5b233
Merge branch 'PHP-8.4'
* PHP-8.4:
  NEWS for 8.4.5: combine ext/GD sections [skip ci]
2025-02-25 22:34:35 +01:00
DanielEScherzer
a73fe50864
NEWS for 8.4.5: combine ext/GD sections [skip ci]
Closes GH-17930.
2025-02-25 22:34:25 +01:00
Eric Mann
00a772bf94
PHP-8.3 is now for PHP 8.3.19-dev 2025-02-25 09:20:39 -08:00
Saki Takamachi
13108bb558
Merge branch 'PHP-8.4'
* PHP-8.4:
  PHP-8.4 is now for PHP 8.4.6-dev
2025-02-26 00:04:45 +09:00
Saki Takamachi
1ec469d116
PHP-8.4 is now for PHP 8.4.6-dev 2025-02-26 00:02:20 +09:00
Ilija Tovilo
ded8af57c4
Merge branch 'PHP-8.4'
* PHP-8.4:
  Reflection: indicate final and abstract properties in string output
2025-02-25 12:22:00 +01:00
Daniel Scherzer
81f143e71f
Reflection: indicate final and abstract properties in string output
Add "final" and "abstract" to the result of `_property_string()` when
outputting the string representation of a `ReflectionClass` or
`ReflectionProperty` instance

Closes GH-17827
2025-02-25 12:21:15 +01:00
DanielEScherzer
babf7a32bf
Zend/tests: organize some tests with sub directories (10) (#17920)
Add directories for tests relating to
- halting the compiler
- `declare()` usage
- exception handlers
- `get_class_methods()`
- `get_class_vars()`
- `isset()`
- name collisions

As well as organizing a couple of tests into existing sub directories along the
way

Work towards GH-15631
2025-02-25 09:48:52 +00:00
Tim Düsterhus
9466b3fbda
php_gdb: Add support for ZEND_AST_CALLABLE_CONVERT to ZendAstPrettyPrinter 2025-02-25 09:25:54 +01:00
DanielEScherzer
0b42749621
GDB: apply ast pretty printing to specialized structures (#17884)
The `ZendAstPrettyPrinter` had logic to handle the various structures that are
based on `zend_ast`, like `zend_ast_decl`, but the printer was only installed
when the value was a `zend_ast`, meaning that for the specialized structures
the details wouldn't be shown unless they were cast (in GDB) to `zend_ast`.
Instead, just register the printer for the specialized structures too.
2025-02-25 09:17:14 +01:00
David CARLIER
cc116067b2
Revert "ext/sockets: follow-up on AF_PACKET support." (#17924)
This reverts commit de018aa2c5.
2025-02-25 07:04:40 +00:00
Dmitry Stogov
1a10b990f2
Merge branch 'PHP-8.4'
* PHP-8.4:
  Update IR
2025-02-25 02:23:57 +03:00
Dmitry Stogov
819b1988a0
Update IR
IR commit: ca93e781eaf6b0949690d3df272ecf44528ff4a8
2025-02-25 02:23:05 +03:00
Jakub Zelenka
9ed83e1c74
Merge branch 'PHP-8.4' 2025-02-24 23:23:25 +01:00
Jakub Zelenka
ed00c1d74b
Merge branch 'PHP-8.3' into PHP-8.4 2025-02-24 23:22:47 +01:00