[php-src] PR #18478: Fix use-of-uninitialized-value with exception on deprecated const access
| From: | iluuu1994 | Date: | Thu, 01 May 2025 14:23:34 +0000 |
| Subject: | [php-src] PR #18478: Fix use-of-uninitialized-value with exception on deprecated const access | ||
| Groups: | php.git-pulls | ||
| Request: | Send a blank email to git-pulls+get-31590@lists.php.net to get a copy of this message | ||
Pull Request: https://github.com/php/php-src/pull/18478
Author: iluuu1994
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:
https://github.com/php/php-src/blob/178fc2db82de5e1f6950c061d68770938c0d4a0f/Zend/zend_vm_def.h#L8192
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.