File tree 1 file changed +17
-0
lines changed
test/legacy/exceptions/core
1 file changed +17
-0
lines changed Original file line number Diff line number Diff line change 175
175
(func (export " break-try-catch_all" )
176
176
(try (do (br 0 )) (catch_all ))
177
177
)
178
+
179
+ (func $longjmp-bait (throw $e0 ))
180
+ (func (export " setjmp-bait" ) (param $return-early i32 ) (result i32 )
181
+ (local $value i32 )
182
+ (try $try
183
+ (do
184
+ (br_if $try (local.get $return-early ))
185
+ (local.set $value (i32.const 1 ))
186
+ (call $longjmp-bait )
187
+ )
188
+ (catch $e0 )
189
+ )
190
+ (local.get $value )
191
+ )
178
192
)
179
193
180
194
(assert_return (invoke " empty-catch" ))
222
236
(assert_return (invoke " break-try-catch" ))
223
237
(assert_return (invoke " break-try-catch_all" ))
224
238
239
+ (assert_return (invoke " setjmp-bait" (i32.const 1 )) (i32.const 0 ))
240
+ (assert_return (invoke " setjmp-bait" (i32.const 0 )) (i32.const 1 ))
241
+
225
242
(module
226
243
(func $imported-throw (import " test" " throw" ))
227
244
(tag $e0 )
You can’t perform that action at this time.
0 commit comments