diff options
-rw-r--r-- | src/tools/execution-results.h | 1 | ||||
-rw-r--r-- | test/lit/exec/non-nullable.wast | 14 |
2 files changed, 15 insertions, 0 deletions
diff --git a/src/tools/execution-results.h b/src/tools/execution-results.h index 94447ab4d..78972cfc9 100644 --- a/src/tools/execution-results.h +++ b/src/tools/execution-results.h @@ -250,6 +250,7 @@ struct ExecutionResults { if (!param.isDefaultable()) { std::cout << "[trap fuzzer can only send defaultable parameters to " "exports]\n"; + return Trap{}; } arguments.push_back(Literal::makeZero(param)); } diff --git a/test/lit/exec/non-nullable.wast b/test/lit/exec/non-nullable.wast new file mode 100644 index 000000000..d443947c6 --- /dev/null +++ b/test/lit/exec/non-nullable.wast @@ -0,0 +1,14 @@ +;; NOTE: Assertions have been generated by update_lit_checks.py --output=fuzz-exec and should not be edited. + +;; RUN: wasm-opt %s -all --fuzz-exec -q -o /dev/null 2>&1 | filecheck %s + +(module + ;; CHECK: [fuzz-exec] calling get-ref + ;; CHECK-NEXT: [trap fuzzer can only send defaultable parameters to exports] + (func "get-ref" (param $0 (ref any)) + (nop) + ) +) +;; CHECK: [fuzz-exec] calling get-ref +;; CHECK-NEXT: [trap fuzzer can only send defaultable parameters to exports] +;; CHECK-NEXT: [fuzz-exec] comparing get-ref |