From 7fd3de0fba8ec1b92cb8c38920f1a179d683ea9b Mon Sep 17 00:00:00 2001 From: Sami Vaarala Date: Sun, 9 Aug 2015 17:39:00 +0300 Subject: [PATCH] Bug testcase for GH-268 --- .../test-bug-empty-finally-segfault-gh268.js | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 tests/ecmascript/test-bug-empty-finally-segfault-gh268.js diff --git a/tests/ecmascript/test-bug-empty-finally-segfault-gh268.js b/tests/ecmascript/test-bug-empty-finally-segfault-gh268.js new file mode 100644 index 00000000..2b7dbe5d --- /dev/null +++ b/tests/ecmascript/test-bug-empty-finally-segfault-gh268.js @@ -0,0 +1,17 @@ +/* + * Try-catch regression in master, GH-268. + */ + +/*=== +still here +===*/ + +/* For the bug to be triggered, the function being compiled must not contain + * any constants and the try-finally must not have a catch clause. + */ +try { + eval('try {} finally {}'); +} catch (e) { + print(e.stack || e); +} +print('still here');