File tree Expand file tree Collapse file tree 3 files changed +42
-0
lines changed
Expand file tree Collapse file tree 3 files changed +42
-0
lines changed Original file line number Diff line number Diff line change 115115 'cont.wast' ,
116116 'cont_simple.wast' ,
117117 'gufa-cont.wast' ,
118+ 'cont_many_unhandled.wast' ,
118119 # TODO: fix split_wast() on tricky escaping situations like a string ending
119120 # in \\" (the " is not escaped - there is an escaped \ before it)
120121 'string-lifting-section.wast' ,
Original file line number Diff line number Diff line change @@ -476,6 +476,7 @@ struct ExecutionResults {
476476 auto flow = instance.callFunction (func->name , arguments);
477477 if (flow.suspendTag ) { // TODO: support stack switching here
478478 std::cout << " [exception thrown: unhandled suspend]" << std::endl;
479+ instance.clearContinuationStore ();
479480 return Exception{};
480481 }
481482 return flow.values ;
Original file line number Diff line number Diff line change 1+ ;; NOTE: Assertions have been generated by update_lit_checks.py --output=fuzz-exec and should not be edited.
2+
3+ ;; RUN: foreach %s %t wasm-opt -all --fuzz-exec-before -q -o /dev/null 2>&1 | filecheck %s
4+
5+ ;; Three exports, one which throws from a resume, and two that do unhandled
6+ ;; suspends. This is a regression test for a bug where the global state of
7+ ;; continuations got into a confused state at the last export, and asserted.
8+
9+ (module
10+ (type $none (func ))
11+ (type $cont (cont $none ))
12+
13+ (tag $tag (type $none ))
14+
15+ (func $empty
16+ )
17+
18+ ;; CHECK: [fuzz-exec] calling a
19+ ;; CHECK-NEXT: [exception thrown: tag ()]
20+ (func $a (export " a" )
21+ (resume_throw $cont $tag
22+ (cont.new $cont
23+ (ref.func $empty )
24+ )
25+ )
26+ )
27+
28+ ;; CHECK: [fuzz-exec] calling b
29+ ;; CHECK-NEXT: [exception thrown: unhandled suspend]
30+ (func $b (export " b" )
31+ (suspend $tag )
32+ )
33+
34+ ;; CHECK: [fuzz-exec] calling c
35+ ;; CHECK-NEXT: [exception thrown: unhandled suspend]
36+ (func $c (export " c" )
37+ (suspend $tag )
38+ )
39+ )
40+
You can’t perform that action at this time.
0 commit comments