From e13bf0fb72fca160f457570b930c4ba3c35ead3a Mon Sep 17 00:00:00 2001 From: Alon Zakai Date: Tue, 19 Nov 2024 15:26:09 -0800 Subject: Improve fuzzing of both closed and open world styles of modules (#7090) Before, we would simply not export a function that had an e.g. anyref param. As a result, the modules were effectively "closed", which was good for testing full closed-world mode, but not for testing degrees of open world. To improve that, this PR allows the fuzzer to export such functions, and an "enclose world" pass is added that "closes" the wasm (makes it more compatible with closed-world) that is run 50% of the time, giving us coverage of both styles. --- test/lit/help/wasm-opt.test | 3 +++ 1 file changed, 3 insertions(+) (limited to 'test/lit/help/wasm-opt.test') diff --git a/test/lit/help/wasm-opt.test b/test/lit/help/wasm-opt.test index 62a30a770..5c978ee81 100644 --- a/test/lit/help/wasm-opt.test +++ b/test/lit/help/wasm-opt.test @@ -152,6 +152,9 @@ ;; CHECK-NEXT: --emit-target-features emit the target features section ;; CHECK-NEXT: in the output ;; CHECK-NEXT: +;; CHECK-NEXT: --enclose-world modify the wasm (destructively) +;; CHECK-NEXT: for closed-world +;; CHECK-NEXT: ;; CHECK-NEXT: --extract-function leaves just one function (useful ;; CHECK-NEXT: for debugging) ;; CHECK-NEXT: -- cgit v1.2.3