[php-src] PR #11598: Fix trailing if element JMP lineno
| From: | iluuu1994 | Date: | Wed, 05 Jul 2023 11:43:28 +0000 |
| Subject: | [php-src] PR #11598: Fix trailing if element JMP lineno | ||
| Groups: | php.git-pulls | ||
| Request: | Send a blank email to git-pulls+get-22897@lists.php.net to get a copy of this message | ||
Pull Request: https://github.com/php/php-src/pull/11598
Author: iluuu1994
Having this lineno on the same last compiled element can lead to an incorrectly covered line number.
if (true) {
if (false) {
echo 'Never executed';
}
} else {
}
The echo will be reported as covered because the JMP from the if (true) branch to the end of the
else branch has the same lineno as the echo.
This is lacking a test because zend_dump.c does not have access to ctx->debug_level and I
don't think it's worth adjusting all the cases.