diff --git a/test/ufuzz/index.js b/test/ufuzz/index.js index 006b4ca759..0600b41339 100644 --- a/test/ufuzz/index.js +++ b/test/ufuzz/index.js @@ -1225,7 +1225,7 @@ function patch_try_catch(orig, toplevel) { var new_code = code.slice(0, index) + insert + code.slice(index); var result = sandbox.run_code(new_code, toplevel); if (typeof result != "object" || typeof result.name != "string" || typeof result.message != "string") { - if (match[1]) stack.push({ + if (!stack.filled && match[1]) stack.push({ code: code, index: index, offset: offset, @@ -1241,6 +1241,7 @@ function patch_try_catch(orig, toplevel) { return orig.slice(0, index) + 'throw new Error("skipping infinite recursion");' + orig.slice(index); } } + stack.filled = true; } }