Skip to content

Release captured PHP error before executor shutdown - #1511

Closed
vova-tarasov wants to merge 1 commit into
elastic:mainfrom
vova-tarasov:fix/release-php-error-before-executor-shutdown
Closed

vova-tarasov wants to merge 1 commit into
elastic:mainfrom
vova-tarasov:fix/release-php-error-before-executor-shutdown

Conversation

@vova-tarasov

Copy link
Copy Markdown

PHP 8.2.35 / 8.3.36 (the php2shell security release) set EG(objects_store).object_buckets to NULL in shutdown_executor() on fast shutdown, so releasing lastErrorData in post-deactivate now segfaults whenever the captured backtrace holds an object argument: function f($o) { @trigger_error("x", E_USER_DEPRECATED); } f(new stdClass); exits with 139 on agent 1.13.0 through 1.17.0, in CLI and php-fpm. This releases it at the end of RSHUTDOWN while the executor is still alive, keeping the post-deactivate reset as a fallback; error events are still reported.

@cla-checker-service

cla-checker-service Bot commented Oct 22, 2026 •

Copy link
Copy Markdown

💚 CLA has been signed

@github-actions

Copy link
Copy Markdown

🤖 GitHub comments

Just comment with:

  • run docs-build : Re-trigger the docs validation. (use unformatted text in the comment!)

@vova-tarasov
vova-tarasov force-pushed the fix/release-php-error-before-executor-shutdown branch from 8325d8a to bb054c0 Compare October 22, 2026 10:13
@vova-tarasov

Copy link
Copy Markdown
Author

Superseded by #1512.

@vova-tarasov
vova-tarasov deleted the fix/release-php-error-before-executor-shutdown branch October 22, 2026 10:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant