File tree Expand file tree Collapse file tree 1 file changed +17
-0
lines changed
test/core/shared-everything-threads/shared-everything-threads Expand file tree Collapse file tree 1 file changed +17
-0
lines changed Original file line number Diff line number Diff line change 39
39
(module quote " (table shared i64 (ref null (shared func)) (elem (ref.null (shared func))))" )
40
40
" expected a u64" )
41
41
42
+ ;; A shared table must be initialized from shared objects.
43
+ (module
44
+ (type $f (shared (func )))
45
+ (global $g (shared (ref null $f )) (ref.null $f ))
46
+ (table $t shared 1 (ref null $f ))
47
+ (elem (ref null $f ) (global.get $g ))
48
+ )
49
+ (assert_invalid
50
+ (module
51
+ (type $f (shared (func )))
52
+ (global $g (ref null $f ) (ref.null $f ))
53
+ (table $t shared 1 (ref null $f ))
54
+ ;; When we initialize a shared element, everything must be shared, including
55
+ ;; the used global.
56
+ (elem (ref null $f ) (global.get $g )))
57
+ " invalid type" )
58
+
42
59
;; Check `table.atomic.*` instructions.
43
60
(module (;eq;)
44
61
(table $a (import " spectest" " table_eq" ) shared 1 (ref null (shared eq)))
You can’t perform that action at this time.
0 commit comments