Bug #78132 [NEW]: PHP 7.4 and later don't associate right line number with BIND_STATIC
From: derick@php.net
Operating system: *
PHP version: master-Git-2019-06-08 (Git)
Package: Scripting Engine problem
Bug Type: Bug
Bug description:PHP 7.4 and later don't associate right line number with BIND_STATIC
Description:
------------
With PHP 7.3, the BIND_STATIC lines are recorded on the right location,
with PHP 7.4 they are no longer. This is with OPcache turned off:
$ php -dopcache.enable_cli=0 -dvld.active=1 /tmp/bind-bug.php
Test script:
---------------
<?php
$someObject->reduce(function () use (
$outerItem,
$anotherOuterItem
) {
return false;
});
Expected result:
----------------
With PHP 7.3:
filename: /tmp/bind-bug.php
function name: {closure}
number of ops: 7
compiled vars: !0 = $outerItem, !1 = $anotherOuterItem
line #* E I O op fetch ext
return operands
-------------------------------------------------------------------------------------
2 0 E > EXT_NOP
3 1 BIND_STATIC
!0, 'outerItem'
4 2 BIND_STATIC
!1, 'anotherOuterItem'
6 3 EXT_STMT
4 > RETURN
<false>
7 5* EXT_STMT
6* > RETURN
null
Actual result:
--------------
With PHP 7.4:
filename: /tmp/bind-bug.php
function name: {closure}
number of ops: 7
compiled vars: !0 = $outerItem, !1 = $anotherOuterItem
line #* E I O op fetch ext
return operands
-------------------------------------------------------------------------------------
2 0 E > EXT_NOP
1 BIND_STATIC
!0
2 BIND_STATIC
!1
6 3 EXT_STMT
4 > RETURN
<false>
7 5* EXT_STMT
6* > RETURN
null
--
Edit bug report at https://bugs.php.net/bug.php?id=78132&edit=1
--
Try a snapshot (PHP 5.4): https://bugs.php.net/fix.php?id=78132&r=trysnapshot54
Try a snapshot (PHP 5.5): https://bugs.php.net/fix.php?id=78132&r=trysnapshot55
Try a snapshot (trunk): https://bugs.php.net/fix.php?id=78132&r=trysnapshottrunk
Fixed in SVN: https://bugs.php.net/fix.php?id=78132&r=fixed
Fixed in release: https://bugs.php.net/fix.php?id=78132&r=alreadyfixed
Need backtrace: https://bugs.php.net/fix.php?id=78132&r=needtrace
Need Reproduce Script: https://bugs.php.net/fix.php?id=78132&r=needscript
Try newer version: https://bugs.php.net/fix.php?id=78132&r=oldversion
Not developer issue: https://bugs.php.net/fix.php?id=78132&r=support
Expected behavior: https://bugs.php.net/fix.php?id=78132&r=notwrong
Not enough info: https://bugs.php.net/fix.php?id=78132&r=notenoughinfo
Submitted twice: https://bugs.php.net/fix.php?id=78132&r=submittedtwice
register_globals: https://bugs.php.net/fix.php?id=78132&r=globals
PHP 4 support discontinued: https://bugs.php.net/fix.php?id=78132&r=php4
Daylight Savings: https://bugs.php.net/fix.php?id=78132&r=dst
IIS Stability: https://bugs.php.net/fix.php?id=78132&r=isapi
Install GNU Sed: https://bugs.php.net/fix.php?id=78132&r=gnused
Floating point limitations: https://bugs.php.net/fix.php?id=78132&r=float
No Zend Extensions: https://bugs.php.net/fix.php?id=78132&r=nozend
MySQL Configuration Error: https://bugs.php.net/fix.php?id=78132&r=mysqlcfg
Thread (2 messages)
- derick@php.net