Skip to content

Release captured PHP error before executor shutdown - #1512

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

vova-tarasov wants to merge 1 commit into
elastic:mainfrom
vova-tarasov: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.

@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!)

@intuibase

Copy link
Copy Markdown
Contributor

Hi @vova-tarasov
Did you tried this fix #1510 ?

@vova-tarasov

Copy link
Copy Markdown
Author

closing this PR in favor of #1510

@intuibase

Copy link
Copy Markdown
Contributor

Thank you for your contribution @vova-tarasov

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.

2 participants