fix corner case in collapse_vars (#5482)

fixes #5481
This commit is contained in:
Alex Lam S.L
2022-06-01 19:42:39 +01:00
committed by GitHub
parent 3c9e1693d5
commit ad3a331ca3
3 changed files with 38 additions and 1 deletions

View File

@@ -2398,7 +2398,7 @@ function patch_try_catch(orig, toplevel) {
"throw " + match[1] + ";",
].join("\n");
}
var new_code = code.slice(0, index) + insert + code.slice(index) + tail_throw;
var new_code = code.slice(0, index) + insert + code.slice(index) + tail_throw + "var UFUZZ_ERROR;";
var result = run_code(new_code, toplevel);
if (!sandbox.is_error(result)) {
if (!stack.filled && match[1]) stack.push({