Bug #80083 [NEW]: Optimizer pass 6 removes variables used for data binding
| From: | calvin at cmpct dot info | Date: | Thu, 10 Sep 2020 15:24:44 +0000 |
| Subject: | Bug #80083 [NEW]: Optimizer pass 6 removes variables used for data binding | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-228954@lists.php.net to get a copy of this message | ||
From: calvin at cmpct dot info
Operating system: IBM i 7.2
PHP version: 7.4.10
Package: opcache
Bug Type: Bug
Bug description:Optimizer pass 6 removes variables used for data binding
Description:
------------
I'm not sure if this is an ibm_db2 module bug or an opcache bug, but I
figured I'd report here first.
Script, debug output at different optimization levels, and a diff
between them available in this gist (let me know if anything else is
needed for repro and I can add to it):
https://gist.github.com/NattyNarwhal/09679e177b11de22aeceaaffdc62012b
The summary is when optimizer pass 6 (DFA) runs through the program, it
elides the variables used for a data bound stored procedure call using
the ibm_db2 extension, resulting in failure. Masking the bit for pass 6
out (that is, setting optimization level 0x7FFEBFFF to 0x7FFEBFDF) is
enough to mitigate the failure.
Expected result:
----------------
Résultat : bar (or whatever the stored procedure used sets)
Actual result:
--------------
PHP Warning: db2_execute(): Value Not Bound in
/home/calvin/test/gautier.php on line 31
PHP Warning: db2_execute(): Binding Error 3 in
/home/calvin/test/gautier.php on line 31
Résultat :
--
Edit bug report at https://bugs.php.net/bug.php?id=80083&edit=1
--
Fix committed: https://bugs.php.net/fix.php?id=80083&r=fixed
Fixed in release: https://bugs.php.net/fix.php?id=80083&r=alreadyfixed
Need backtrace: https://bugs.php.net/fix.php?id=80083&r=needtrace
Need Reproduce Script: https://bugs.php.net/fix.php?id=80083&r=needscript
Try newer version: https://bugs.php.net/fix.php?id=80083&r=oldversion
Not developer issue: https://bugs.php.net/fix.php?id=80083&r=support
Expected behavior: https://bugs.php.net/fix.php?id=80083&r=notwrong
Not enough info: https://bugs.php.net/fix.php?id=80083&r=notenoughinfo
Submitted twice: https://bugs.php.net/fix.php?id=80083&r=submittedtwice
register_globals: https://bugs.php.net/fix.php?id=80083&r=globals
PHP version support discontinued: https://bugs.php.net/fix.php?id=80083&r=phptooold
Daylight Savings: https://bugs.php.net/fix.php?id=80083&r=dst
IIS Stability: https://bugs.php.net/fix.php?id=80083&r=isapi
Install GNU Sed: https://bugs.php.net/fix.php?id=80083&r=gnused
Floating point limitations: https://bugs.php.net/fix.php?id=80083&r=float
No Zend Extensions: https://bugs.php.net/fix.php?id=80083&r=nozend
MySQL Configuration Error: https://bugs.php.net/fix.php?id=80083&r=mysqlcfg