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> {
49274927 }
49284928
49294929 // 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 ();
49314935 auto func = contData->func ;
49324936
49334937 // If we are resuming a nested suspend then we should just rewind the call
Original file line number Diff line number Diff line change 116116 (func (export " non-linear-4" )
117117 (call $nl4 (cont.new $k1 (ref.func $r1 )))
118118 )
119+
120+ (func (export " null" )
121+ (resume $k1
122+ (ref.null $k1 )
123+ )
124+ )
119125)
120126
121127(assert_suspension (invoke " unhandled-1" ) " unhandled" )
132138(assert_trap (invoke " non-linear-3" ) " continuation already consumed" )
133139(assert_trap (invoke " non-linear-4" ) " continuation already consumed" )
134140
141+ (assert_trap (invoke " null" ) " null continuation reference" )
142+
135143(assert_invalid
136144 (module
137145 (type $ft (func ))
You can’t perform that action at this time.
0 commit comments