diff options
Diffstat (limited to 'test/ctor-eval/overlapping-segments.wast')
-rw-r--r-- | test/ctor-eval/overlapping-segments.wast | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/test/ctor-eval/overlapping-segments.wast b/test/ctor-eval/overlapping-segments.wast new file mode 100644 index 000000000..bdd6ef905 --- /dev/null +++ b/test/ctor-eval/overlapping-segments.wast @@ -0,0 +1,27 @@ +(module + (type $none_=>_i32 (func (result i32))) + + (table $0 46 funcref) + (elem $0 (i32.const 9) $1) + (elem $1 (i32.const 9) $0) + + (export "test1" (func $2)) + + (func $0 (result i32) + (unreachable) + ) + (func $1 (result i32) + (i32.const 65) + ) + (func $2 + (drop + (call_indirect (type $none_=>_i32) + ;; Calling the item at index $9 should call $0, which appears in the + ;; last of the overlapping segments. That function traps, which stops + ;; us from evalling anything here. + (i32.const 9) + ) + ) + ) +) + |