File tree Expand file tree Collapse file tree 2 files changed +13
-1
lines changed Expand file tree Collapse file tree 2 files changed +13
-1
lines changed Original file line number Diff line number Diff line change @@ -4927,7 +4927,11 @@ class ModuleRunnerBase : public ExpressionRunner<SubType> {
4927
4927
}
4928
4928
4929
4929
// Get and execute the continuation.
4930
- auto contData = flow.getSingleValue ().getContData ();
4930
+ auto cont = flow.getSingleValue ();
4931
+ if (cont.isNull ()) {
4932
+ trap (" null ref" );
4933
+ }
4934
+ auto contData = cont.getContData ();
4931
4935
auto func = contData->func ;
4932
4936
4933
4937
// If we are resuming a nested suspend then we should just rewind the call
Original file line number Diff line number Diff line change 116
116
(func (export " non-linear-4" )
117
117
(call $nl4 (cont.new $k1 (ref.func $r1 )))
118
118
)
119
+
120
+ (func (export " null" )
121
+ (resume $k1
122
+ (ref.null $k1 )
123
+ )
124
+ )
119
125
)
120
126
121
127
(assert_suspension (invoke " unhandled-1" ) " unhandled" )
132
138
(assert_trap (invoke " non-linear-3" ) " continuation already consumed" )
133
139
(assert_trap (invoke " non-linear-4" ) " continuation already consumed" )
134
140
141
+ (assert_trap (invoke " null" ) " null continuation reference" )
142
+
135
143
(assert_invalid
136
144
(module
137
145
(type $ft (func ))
You can’t perform that action at this time.
0 commit comments