Bug #74234 [Asn->Csd]: Op Code is generated on wrong line
| From: | git@php.net | Date: | Thu, 02 Jun 2022 14:57:17 +0000 |
| Subject: | Bug #74234 [Asn->Csd]: Op Code is generated on wrong line | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-241651@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=74234&edit=1
ID: 74234
Updated by: git@php.net
Reported by: scott at exussum dot co dot uk
Summary: Op Code is generated on wrong line
-Status: Assigned
+Status: Closed
Type: Bug
Package: *General Issues
Operating System: Linux (ubuntu 16.10)
PHP Version: 7.1.2
Assigned To: nikic
Block user comment: N
Private report: N
New Comment:
Automatic comment on behalf of derickr
Revision: https://github.com/php/doc-en/commit/c7ee9cd4d1bb4538e283502b5f958b3042a61a63
Log: Fixed bug #74234: DateTimeZone supported timezone names
Previous Comments:
------------------------------------------------------------------------
[2017-03-17 17:44:07] nikic@php.net
Storing the end lineno will increase the size of most AST nodes by 64 bytes. Would have to measure
how much impact that has on total memory usage.
------------------------------------------------------------------------
[2017-03-14 04:42:24] laruence@php.net
I don't see how to get the last line no of a block in current AST..
@nikic, what do you think?
------------------------------------------------------------------------
[2017-03-10 17:42:10] scott at exussum dot co dot uk
Description:
------------
The op code for the jmp seems to be generated against the wrong line for the continue. (See script
below)
6 9 > EXT_STMT
10 > JMPZ <false>, ->13
7 11 > EXT_STMT
12 > JMP ->8
13 > > JMP ->8
14 > FE_FREE $3
Pasted from Derick
HP unfortunately doesn't reset the line numbers for some of the generated code:
6 9 > EXT_STMT
10 > JMPZ <false>, ->13
7 11 > EXT_STMT
12 > JMP ->8
13 > > JMP ->8
14 > FE_FREE $3
The JMP in line 12 (and line 13) is generated for line 7, and not 8. This is something that needs to
be fixed in PHP itself
See https://bugs.xdebug.org/view.php?id=1405#c4232
for more info
Test script:
---------------
foreach([1,2] as $value) {
if (false) {
continue;
}
}
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=74234&edit=1