Add XFAIL test for #70228
authorXinchen Hui <laruence@php.net>
Mon, 10 Aug 2015 14:02:15 +0000 (22:02 +0800)
committerXinchen Hui <laruence@php.net>
Mon, 10 Aug 2015 14:02:15 +0000 (22:02 +0800)
Zend/tests/try/bug70228.phpt [new file with mode: 0644]

diff --git a/Zend/tests/try/bug70228.phpt b/Zend/tests/try/bug70228.phpt
new file mode 100644 (file)
index 0000000..23f5864
--- /dev/null
@@ -0,0 +1,16 @@
+--TEST--
+Bug #70228 (memleak if return in finally block)
+--XFAIL--
+See https://bugs.php.net/bug.php?id=70228
+--FILE--
+<?php
+
+function foo() {
+    try { return str_repeat("a", 2); }
+    finally { return true; }
+}
+
+var_dump(foo());
+?>
+--EXPECT--
+string(3) "bar"