From 5e43ec94829f22fd922d13d8a2ef4a56d833202e Mon Sep 17 00:00:00 2001 From: Pig Fang Date: Sat, 13 Dec 2025 17:21:47 +0800 Subject: [PATCH 1/2] [test] Add test for `catch_all` before `catch` --- test/core/exceptions/try_table.wast | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/test/core/exceptions/try_table.wast b/test/core/exceptions/try_table.wast index 5072a87184..b8387a14f9 100644 --- a/test/core/exceptions/try_table.wast +++ b/test/core/exceptions/try_table.wast @@ -265,6 +265,18 @@ ) (return (i32.const 3)) ) + + (func (export "catch-all-before-catch") (result i32) + (block + (block + (try_table (catch_all 0) (catch $e 1) + (throw $e) + ) + ) + (return (i32.const 2)) + ) + (return (i32.const 3)) + ) ) (assert_return (invoke "simple-throw-catch" (i32.const 0)) (i32.const 23)) @@ -325,6 +337,7 @@ (assert_return (invoke "try-with-param")) (assert_return (invoke "duplicated-catches") (i32.const 2)) +(assert_return (invoke "catch-all-before-catch") (i32.const 2)) (module (func $imported-throw (import "test" "throw")) From 028aac6dc7bbbc508556115c3bb45309ae686c85 Mon Sep 17 00:00:00 2001 From: Pig Fang Date: Sat, 13 Dec 2025 18:27:01 +0800 Subject: [PATCH 2/2] [test] Fix tag identifier typo --- test/core/exceptions/try_table.wast | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/core/exceptions/try_table.wast b/test/core/exceptions/try_table.wast index b8387a14f9..cb1ab311db 100644 --- a/test/core/exceptions/try_table.wast +++ b/test/core/exceptions/try_table.wast @@ -269,8 +269,8 @@ (func (export "catch-all-before-catch") (result i32) (block (block - (try_table (catch_all 0) (catch $e 1) - (throw $e) + (try_table (catch_all 0) (catch $e0 1) + (throw $e0) ) ) (return (i32.const 2))