Skip to content

Fix use-of-uninitialized-value with exception on deprecated const access #18478

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

Closed

Conversation

iluuu1994
Copy link
Member

Caught by various tests in nightly. https://github.com/php/php-src/actions/runs/14767850964/job/41462688558

The use-of-uninitialized-value happens on this line:

zval_ptr_dtor_nogc(EX_VAR(throw_op->result.var));

It happens because because the ZEND_HANDLE_EXCEPTION handler assumes the result has already been initialized and potentially needs to be freed. To fix this, simply initialize the result to NULL, like we already do a few lines above.

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