Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion src/wasm-interpreter.h
Original file line number Diff line number Diff line change
Expand Up @@ -4770,9 +4770,14 @@ class ModuleRunnerBase : public ExpressionRunner<SubType> {
VISIT_ARGUMENTS(flow, curr->operands, arguments)
VISIT(cont, curr->cont)

auto contValue = cont.getSingleValue();
if (contValue.isNull()) {
trap("null ref");
}

// Create a new continuation, copying the old but with the new type +
// arguments.
auto old = cont.getSingleValue().getContData();
auto old = contValue.getContData();
auto newData = *old;
newData.type = curr->type.getHeapType();
for (auto arg : arguments) {
Expand Down
11 changes: 11 additions & 0 deletions test/lit/exec/cont_bindings.wast
Original file line number Diff line number Diff line change
Expand Up @@ -43,5 +43,16 @@
)
)
)

;; CHECK: [fuzz-exec] calling null-binding
;; CHECK-NEXT: [trap null ref]
(func $null-binding (export "null-binding")
(drop
(cont.bind $C1 $C2
(i32.const 42)
(ref.null $C1)
)
)
)
)

Loading