Bug #74444 [NEW]: multiple catch freezes in some cases
| From: | matej21 at matej21 dot cz | Date: | Fri, 14 Apr 2017 18:07:13 +0000 |
| Subject: | Bug #74444 [NEW]: multiple catch freezes in some cases | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-208561@lists.php.net to get a copy of this message | ||
From: matej21 at matej21 dot cz
Operating system:
PHP version: 7.1.4
Package: Scripting Engine problem
Bug Type: Bug
Bug description:multiple catch freezes in some cases
Description:
------------
if there is exact number of opcodes before multi-catch, php freezes.
adding or removing just one opcode fixes the issue.
relevant oplines:
L64 #58 ECHO ""
L67 #59 NEW "RuntimeException" @0
L67 #60 DO_FCALL
L67 #61 THROW @0
L67 #62 JMP J67
L68 #63 CATCH "FooEx" $e 0
L68 #64 JMP J66
L68 #65 CATCH "RuntimeException" $e 1
L69 #66 ECHO 1
L71 #67 RETURN null
Test script:
---------------
<?php
function doSth()
{
echo '';
echo '';
echo '';
echo '';
echo '';
echo '';
echo '';
echo '';
echo '';
echo '';
echo '';
echo '';
echo '';
echo '';
echo '';
echo '';
echo '';
echo '';
echo '';
echo '';
echo '';
echo '';
echo '';
echo '';
echo '';
echo '';
echo '';
echo '';
echo '';
echo '';
echo '';
echo '';
echo '';
echo '';
echo '';
echo '';
echo '';
echo '';
echo '';
echo '';
echo '';
echo '';
echo '';
echo '';
echo '';
echo '';
echo '';
echo '';
echo '';
echo '';
echo '';
echo '';
echo '';
echo '';
echo '';
echo '';
echo '';
echo '';
echo '';
try {
throw new \RuntimeException();
} catch (\FooEx | \RuntimeException $e) {
echo 1;
}
}
doSth();
Expected result:
----------------
1
Actual result:
--------------
php freezes
--
Edit bug report at https://bugs.php.net/bug.php?id=74444&edit=1
--
Try a snapshot (PHP 5.4): https://bugs.php.net/fix.php?id=74444&r=trysnapshot54
Try a snapshot (PHP 5.5): https://bugs.php.net/fix.php?id=74444&r=trysnapshot55
Try a snapshot (trunk): https://bugs.php.net/fix.php?id=74444&r=trysnapshottrunk
Fixed in SVN: https://bugs.php.net/fix.php?id=74444&r=fixed
Fixed in release: https://bugs.php.net/fix.php?id=74444&r=alreadyfixed
Need backtrace: https://bugs.php.net/fix.php?id=74444&r=needtrace
Need Reproduce Script: https://bugs.php.net/fix.php?id=74444&r=needscript
Try newer version: https://bugs.php.net/fix.php?id=74444&r=oldversion
Not developer issue: https://bugs.php.net/fix.php?id=74444&r=support
Expected behavior: https://bugs.php.net/fix.php?id=74444&r=notwrong
Not enough info: https://bugs.php.net/fix.php?id=74444&r=notenoughinfo
Submitted twice: https://bugs.php.net/fix.php?id=74444&r=submittedtwice
register_globals: https://bugs.php.net/fix.php?id=74444&r=globals
PHP 4 support discontinued: https://bugs.php.net/fix.php?id=74444&r=php4
Daylight Savings: https://bugs.php.net/fix.php?id=74444&r=dst
IIS Stability: https://bugs.php.net/fix.php?id=74444&r=isapi
Install GNU Sed: https://bugs.php.net/fix.php?id=74444&r=gnused
Floating point limitations: https://bugs.php.net/fix.php?id=74444&r=float
No Zend Extensions: https://bugs.php.net/fix.php?id=74444&r=nozend
MySQL Configuration Error: https://bugs.php.net/fix.php?id=74444&r=mysqlcfg