Skip to content

Destructors not invoked after a fatal error #18418

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
danog opened this issue Apr 24, 2025 · 1 comment
Open

Destructors not invoked after a fatal error #18418

danog opened this issue Apr 24, 2025 · 1 comment

Comments

@danog
Copy link
Contributor

danog commented Apr 24, 2025

Description

This behavior is caused by

zend_objects_store_mark_destructed(&EG(objects_store));
and is causing a few issues in our code.

Granted, the application state after a fatal error (mainly execution timeout/memory limit) may not be consistent, however shutdown handlers are executed anyway after a fatal: thus, to match the behavior of shutdown handlers, I'd like to submit a PR to re-enable execution of destructors, opening this issue to gauge the mood.

PHP Version

8.4.6

Operating System

Ubuntu 24.04

@iluuu1994
Copy link
Member

Hi @danog. This is a behavioral change and should not target active branches. We're discussing the implications internally, please give us some time to do so.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants