1--TEST-- 2GH-11028 (Heap Buffer Overflow in zval_undefined_cv with generators) - throw in finally variant 3--FILE-- 4<?php 5function generator() { 6 try { 7 yield null => 0; 8 } finally { 9 throw new Exception("exception"); 10 return []; 11 } 12} 13 14try { 15 var_dump([...generator()]); 16} catch (Throwable $e) { 17 echo $e->getMessage(), "\n"; 18} 19?> 20--EXPECT-- 21exception 22