|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
[2020-09-03 08:13 UTC] sjon@php.net
Description: ------------ I'm seeing an assertion that doesn't really seem to be related to my code. I don't mind debugging this but the exception seems (..) somewhat self-explanatory. this in beta3 Test script: --------------- Zend/zend_opcode.c:773: keeps_op1_alive: Assertion `opline->opcode != 188 && opline->opcode != 78 && opline->opcode != 126 && opline->opcode != 155 && opline->opcode != 124 && opline->opcode != 182 && opline->opcode != 55' failed. PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Fri Oct 24 12:00:01 2025 UTC |
repro: class a { protected function x(): bool { try { $credentials = something(); } catch (Exception $e) { switch (get_class($e)) { case Ex1::class: case Ex2::class: throw new Exception(''); default: throw $e; } } return true; } }Slightly tweaked test case: <?php function test($foo) { switch ($foo . 'Bar') { case 'A': throw new Exception('A'); default: throw new Exception('Default'); } } try { test('Foo'); } catch (Exception $e) { echo $e->getMessage(), "\n"; } Asserts on master and 7.4. I had hoped it would show a leak on 7.3, but everything is alright there. The problem is that the FREE for the SWITCH_STRING is optimized away, which shouldn't happen, as it is a loop free.