Skip to content
forked from php/php-src

Conversation

@chopins
Copy link
Owner

@chopins chopins commented Apr 7, 2025

No description provided.

DanielEScherzer and others added 30 commits March 16, 2025 21:04
Reduce the number of global functions by moving it to instance method
`FuncInfo::findEquivalent()`.
This fixes a ZEND_RC_MOD_CHECK() assertion failure when building with
"-DZEND_RC_DEBUG=1 --enable-debug --enable-zts". php_dl() is called after
startup, and manipulates the refcount of persistent strings, which is not
allowed at this point of the lifecycle.

The dl() function disables the ZEND_RC_MOD_CHECK() assertion before calling
php_dl(). This change applies the same workaround in FPM.

Closes GH-18075
* PHP-8.3:
  Disable ZEND_RC_MOD_CHECK() while loading shared extension in FPM
* PHP-8.4:
  Disable ZEND_RC_MOD_CHECK() while loading shared extension in FPM
* PHP-8.4:
  Fix GH-18090: DOM: Svg attributes and tag names are being lowercased
This avoids repeated lookups in the function table for the same
function name.
Although this optimization is observable, i.e. defining a function via
an include in between 2 JMP_FRAMELESS for the same function, this cannot
be relied on already as far as I know if the optimizer runs.
in_array() calls are compiled to frameless calls. Adjust the
optimization appropriately. Luckily, frameless opcodes simplify the
optimization quite a bit.

Fixes GH-18050
Closes GH-18066
* PHP-8.4:
  Fix IN_ARRAY optimization
Follow-up for GH-17847 but now for attributes.

Closes GH-18100.
* PHP-8.3:
  Fix xinclude destruction of live attributes
* PHP-8.4:
  Fix xinclude destruction of live attributes
…e request. (#18025)

it is an internal table and oid is a real Oid (uint32_t) value.
IR commit: 3d0124a06ee4321e1305f893b74840033d939e88
* PHP-8.4:
  Update IR
Since 0537968, the properties are no longer initialized.
So we call object_properties_init to handle that correctly.
Lower branches have a memory leak, but that requires a separate fix.
Fixed in dstogov/ir#110 and merged via b932c26.

Closes GH-18113.
* PHP-8.4:
  Add test for GH-18113
Preloading shutdown calls request shutdown which will deactivate the
virtual cwd state. However, further startup code still assumes the state
that was set by virtual_cwd_startup(). So we need to reactivate it
manually.

Creating a test was a bit difficult because the INI setting I wanted to
test this with is overridden by the test runner apparently.
To reproduce the issue, create an empty file test.php and execute this
in a ZTS build:
`php -d opcache.preload=./ext/opcache/tests/preload_class_alias_2.inc -d "error_log=" -d "allow_url_include=1" test.php`

Closes GH-18117.
* PHP-8.3:
  Fix GH-18112: NULL access with preloading and INI option
Girgias and others added 29 commits April 3, 2025 22:47
Removing missleading comment
It either returns true or throws an Error
It was only used once, and removing it reduces the size of a userland FTP object by 4096 bytes
Future uses of this internal API are planned, and we can easily avoid an
allocation by factoring out the common code.
Fix some types at the same time
and a handful more error code paths.

close GH-18250
@chopins chopins merged commit 45e2f63 into chopins:master Apr 7, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.