github.com/wasilibs/wazerox@v0.0.0-20240124024944-4923be63ab5f/internal/integration_test/spectest/v1/testdata/linking.json (about)

     1  {"source_filename": "./linking.wast",
     2   "commands": [
     3    {"type": "module", "line": 3, "name": "$Mf", "filename": "linking.0.wasm"}, 
     4    {"type": "register", "line": 7, "name": "$Mf", "as": "Mf"}, 
     5    {"type": "module", "line": 9, "name": "$Nf", "filename": "linking.1.wasm"}, 
     6    {"type": "assert_return", "line": 17, "action": {"type": "invoke", "module": "$Mf", "field": "call", "args": []}, "expected": [{"type": "i32", "value": "2"}]}, 
     7    {"type": "assert_return", "line": 18, "action": {"type": "invoke", "module": "$Nf", "field": "Mf.call", "args": []}, "expected": [{"type": "i32", "value": "2"}]}, 
     8    {"type": "assert_return", "line": 19, "action": {"type": "invoke", "module": "$Nf", "field": "call", "args": []}, "expected": [{"type": "i32", "value": "3"}]}, 
     9    {"type": "assert_return", "line": 20, "action": {"type": "invoke", "module": "$Nf", "field": "call Mf.call", "args": []}, "expected": [{"type": "i32", "value": "2"}]}, 
    10    {"type": "module", "line": 22, "filename": "linking.2.wasm"}, 
    11    {"type": "register", "line": 26, "as": "reexport_f"}, 
    12    {"type": "assert_unlinkable", "line": 28, "filename": "linking.3.wasm", "text": "incompatible import type", "module_type": "binary"}, 
    13    {"type": "assert_unlinkable", "line": 32, "filename": "linking.4.wasm", "text": "incompatible import type", "module_type": "binary"}, 
    14    {"type": "module", "line": 39, "name": "$Mg", "filename": "linking.5.wasm"}, 
    15    {"type": "register", "line": 48, "name": "$Mg", "as": "Mg"}, 
    16    {"type": "module", "line": 50, "name": "$Ng", "filename": "linking.6.wasm"}, 
    17    {"type": "assert_return", "line": 67, "action": {"type": "get", "module": "$Mg", "field": "glob"}, "expected": [{"type": "i32", "value": "42"}]}, 
    18    {"type": "assert_return", "line": 68, "action": {"type": "get", "module": "$Ng", "field": "Mg.glob"}, "expected": [{"type": "i32", "value": "42"}]}, 
    19    {"type": "assert_return", "line": 69, "action": {"type": "get", "module": "$Ng", "field": "glob"}, "expected": [{"type": "i32", "value": "43"}]}, 
    20    {"type": "assert_return", "line": 70, "action": {"type": "invoke", "module": "$Mg", "field": "get", "args": []}, "expected": [{"type": "i32", "value": "42"}]}, 
    21    {"type": "assert_return", "line": 71, "action": {"type": "invoke", "module": "$Ng", "field": "Mg.get", "args": []}, "expected": [{"type": "i32", "value": "42"}]}, 
    22    {"type": "assert_return", "line": 72, "action": {"type": "invoke", "module": "$Ng", "field": "get", "args": []}, "expected": [{"type": "i32", "value": "43"}]}, 
    23    {"type": "assert_return", "line": 74, "action": {"type": "get", "module": "$Mg", "field": "mut_glob"}, "expected": [{"type": "i32", "value": "142"}]}, 
    24    {"type": "assert_return", "line": 75, "action": {"type": "get", "module": "$Ng", "field": "Mg.mut_glob"}, "expected": [{"type": "i32", "value": "142"}]}, 
    25    {"type": "assert_return", "line": 76, "action": {"type": "invoke", "module": "$Mg", "field": "get_mut", "args": []}, "expected": [{"type": "i32", "value": "142"}]}, 
    26    {"type": "assert_return", "line": 77, "action": {"type": "invoke", "module": "$Ng", "field": "Mg.get_mut", "args": []}, "expected": [{"type": "i32", "value": "142"}]}, 
    27    {"type": "assert_return", "line": 79, "action": {"type": "invoke", "module": "$Mg", "field": "set_mut", "args": [{"type": "i32", "value": "241"}]}, "expected": []}, 
    28    {"type": "assert_return", "line": 80, "action": {"type": "get", "module": "$Mg", "field": "mut_glob"}, "expected": [{"type": "i32", "value": "241"}]}, 
    29    {"type": "assert_return", "line": 81, "action": {"type": "get", "module": "$Ng", "field": "Mg.mut_glob"}, "expected": [{"type": "i32", "value": "241"}]}, 
    30    {"type": "assert_return", "line": 82, "action": {"type": "invoke", "module": "$Mg", "field": "get_mut", "args": []}, "expected": [{"type": "i32", "value": "241"}]}, 
    31    {"type": "assert_return", "line": 83, "action": {"type": "invoke", "module": "$Ng", "field": "Mg.get_mut", "args": []}, "expected": [{"type": "i32", "value": "241"}]}, 
    32    {"type": "assert_unlinkable", "line": 87, "filename": "linking.7.wasm", "text": "incompatible import type", "module_type": "binary"}, 
    33    {"type": "assert_unlinkable", "line": 91, "filename": "linking.8.wasm", "text": "incompatible import type", "module_type": "binary"}, 
    34    {"type": "module", "line": 97, "name": "$Mt", "filename": "linking.9.wasm"}, 
    35    {"type": "register", "line": 110, "name": "$Mt", "as": "Mt"}, 
    36    {"type": "module", "line": 112, "name": "$Nt", "filename": "linking.10.wasm"}, 
    37    {"type": "assert_return", "line": 131, "action": {"type": "invoke", "module": "$Mt", "field": "call", "args": [{"type": "i32", "value": "2"}]}, "expected": [{"type": "i32", "value": "4"}]}, 
    38    {"type": "assert_return", "line": 132, "action": {"type": "invoke", "module": "$Nt", "field": "Mt.call", "args": [{"type": "i32", "value": "2"}]}, "expected": [{"type": "i32", "value": "4"}]}, 
    39    {"type": "assert_return", "line": 133, "action": {"type": "invoke", "module": "$Nt", "field": "call", "args": [{"type": "i32", "value": "2"}]}, "expected": [{"type": "i32", "value": "5"}]}, 
    40    {"type": "assert_return", "line": 134, "action": {"type": "invoke", "module": "$Nt", "field": "call Mt.call", "args": [{"type": "i32", "value": "2"}]}, "expected": [{"type": "i32", "value": "4"}]}, 
    41    {"type": "assert_trap", "line": 136, "action": {"type": "invoke", "module": "$Mt", "field": "call", "args": [{"type": "i32", "value": "1"}]}, "text": "uninitialized", "expected": [{"type": "i32"}]}, 
    42    {"type": "assert_trap", "line": 137, "action": {"type": "invoke", "module": "$Nt", "field": "Mt.call", "args": [{"type": "i32", "value": "1"}]}, "text": "uninitialized", "expected": [{"type": "i32"}]}, 
    43    {"type": "assert_return", "line": 138, "action": {"type": "invoke", "module": "$Nt", "field": "call", "args": [{"type": "i32", "value": "1"}]}, "expected": [{"type": "i32", "value": "5"}]}, 
    44    {"type": "assert_trap", "line": 139, "action": {"type": "invoke", "module": "$Nt", "field": "call Mt.call", "args": [{"type": "i32", "value": "1"}]}, "text": "uninitialized", "expected": [{"type": "i32"}]}, 
    45    {"type": "assert_trap", "line": 141, "action": {"type": "invoke", "module": "$Mt", "field": "call", "args": [{"type": "i32", "value": "0"}]}, "text": "uninitialized", "expected": [{"type": "i32"}]}, 
    46    {"type": "assert_trap", "line": 142, "action": {"type": "invoke", "module": "$Nt", "field": "Mt.call", "args": [{"type": "i32", "value": "0"}]}, "text": "uninitialized", "expected": [{"type": "i32"}]}, 
    47    {"type": "assert_return", "line": 143, "action": {"type": "invoke", "module": "$Nt", "field": "call", "args": [{"type": "i32", "value": "0"}]}, "expected": [{"type": "i32", "value": "5"}]}, 
    48    {"type": "assert_trap", "line": 144, "action": {"type": "invoke", "module": "$Nt", "field": "call Mt.call", "args": [{"type": "i32", "value": "0"}]}, "text": "uninitialized", "expected": [{"type": "i32"}]}, 
    49    {"type": "assert_trap", "line": 146, "action": {"type": "invoke", "module": "$Mt", "field": "call", "args": [{"type": "i32", "value": "20"}]}, "text": "undefined", "expected": [{"type": "i32"}]}, 
    50    {"type": "assert_trap", "line": 147, "action": {"type": "invoke", "module": "$Nt", "field": "Mt.call", "args": [{"type": "i32", "value": "20"}]}, "text": "undefined", "expected": [{"type": "i32"}]}, 
    51    {"type": "assert_trap", "line": 148, "action": {"type": "invoke", "module": "$Nt", "field": "call", "args": [{"type": "i32", "value": "7"}]}, "text": "undefined", "expected": [{"type": "i32"}]}, 
    52    {"type": "assert_trap", "line": 149, "action": {"type": "invoke", "module": "$Nt", "field": "call Mt.call", "args": [{"type": "i32", "value": "20"}]}, "text": "undefined", "expected": [{"type": "i32"}]}, 
    53    {"type": "assert_return", "line": 151, "action": {"type": "invoke", "module": "$Nt", "field": "call", "args": [{"type": "i32", "value": "3"}]}, "expected": [{"type": "i32", "value": "4294967292"}]}, 
    54    {"type": "assert_trap", "line": 152, "action": {"type": "invoke", "module": "$Nt", "field": "call", "args": [{"type": "i32", "value": "4"}]}, "text": "indirect call", "expected": [{"type": "i32"}]}, 
    55    {"type": "module", "line": 154, "name": "$Ot", "filename": "linking.11.wasm"}, 
    56    {"type": "assert_return", "line": 167, "action": {"type": "invoke", "module": "$Mt", "field": "call", "args": [{"type": "i32", "value": "3"}]}, "expected": [{"type": "i32", "value": "4"}]}, 
    57    {"type": "assert_return", "line": 168, "action": {"type": "invoke", "module": "$Nt", "field": "Mt.call", "args": [{"type": "i32", "value": "3"}]}, "expected": [{"type": "i32", "value": "4"}]}, 
    58    {"type": "assert_return", "line": 169, "action": {"type": "invoke", "module": "$Nt", "field": "call Mt.call", "args": [{"type": "i32", "value": "3"}]}, "expected": [{"type": "i32", "value": "4"}]}, 
    59    {"type": "assert_return", "line": 170, "action": {"type": "invoke", "module": "$Ot", "field": "call", "args": [{"type": "i32", "value": "3"}]}, "expected": [{"type": "i32", "value": "4"}]}, 
    60    {"type": "assert_return", "line": 172, "action": {"type": "invoke", "module": "$Mt", "field": "call", "args": [{"type": "i32", "value": "2"}]}, "expected": [{"type": "i32", "value": "4294967292"}]}, 
    61    {"type": "assert_return", "line": 173, "action": {"type": "invoke", "module": "$Nt", "field": "Mt.call", "args": [{"type": "i32", "value": "2"}]}, "expected": [{"type": "i32", "value": "4294967292"}]}, 
    62    {"type": "assert_return", "line": 174, "action": {"type": "invoke", "module": "$Nt", "field": "call", "args": [{"type": "i32", "value": "2"}]}, "expected": [{"type": "i32", "value": "5"}]}, 
    63    {"type": "assert_return", "line": 175, "action": {"type": "invoke", "module": "$Nt", "field": "call Mt.call", "args": [{"type": "i32", "value": "2"}]}, "expected": [{"type": "i32", "value": "4294967292"}]}, 
    64    {"type": "assert_return", "line": 176, "action": {"type": "invoke", "module": "$Ot", "field": "call", "args": [{"type": "i32", "value": "2"}]}, "expected": [{"type": "i32", "value": "4294967292"}]}, 
    65    {"type": "assert_return", "line": 178, "action": {"type": "invoke", "module": "$Mt", "field": "call", "args": [{"type": "i32", "value": "1"}]}, "expected": [{"type": "i32", "value": "6"}]}, 
    66    {"type": "assert_return", "line": 179, "action": {"type": "invoke", "module": "$Nt", "field": "Mt.call", "args": [{"type": "i32", "value": "1"}]}, "expected": [{"type": "i32", "value": "6"}]}, 
    67    {"type": "assert_return", "line": 180, "action": {"type": "invoke", "module": "$Nt", "field": "call", "args": [{"type": "i32", "value": "1"}]}, "expected": [{"type": "i32", "value": "5"}]}, 
    68    {"type": "assert_return", "line": 181, "action": {"type": "invoke", "module": "$Nt", "field": "call Mt.call", "args": [{"type": "i32", "value": "1"}]}, "expected": [{"type": "i32", "value": "6"}]}, 
    69    {"type": "assert_return", "line": 182, "action": {"type": "invoke", "module": "$Ot", "field": "call", "args": [{"type": "i32", "value": "1"}]}, "expected": [{"type": "i32", "value": "6"}]}, 
    70    {"type": "assert_trap", "line": 184, "action": {"type": "invoke", "module": "$Mt", "field": "call", "args": [{"type": "i32", "value": "0"}]}, "text": "uninitialized", "expected": [{"type": "i32"}]}, 
    71    {"type": "assert_trap", "line": 185, "action": {"type": "invoke", "module": "$Nt", "field": "Mt.call", "args": [{"type": "i32", "value": "0"}]}, "text": "uninitialized", "expected": [{"type": "i32"}]}, 
    72    {"type": "assert_return", "line": 186, "action": {"type": "invoke", "module": "$Nt", "field": "call", "args": [{"type": "i32", "value": "0"}]}, "expected": [{"type": "i32", "value": "5"}]}, 
    73    {"type": "assert_trap", "line": 187, "action": {"type": "invoke", "module": "$Nt", "field": "call Mt.call", "args": [{"type": "i32", "value": "0"}]}, "text": "uninitialized", "expected": [{"type": "i32"}]}, 
    74    {"type": "assert_trap", "line": 188, "action": {"type": "invoke", "module": "$Ot", "field": "call", "args": [{"type": "i32", "value": "0"}]}, "text": "uninitialized", "expected": [{"type": "i32"}]}, 
    75    {"type": "assert_trap", "line": 190, "action": {"type": "invoke", "module": "$Ot", "field": "call", "args": [{"type": "i32", "value": "20"}]}, "text": "undefined", "expected": [{"type": "i32"}]}, 
    76    {"type": "module", "line": 192, "filename": "linking.12.wasm"}, 
    77    {"type": "module", "line": 198, "name": "$G1", "filename": "linking.13.wasm"}, 
    78    {"type": "register", "line": 199, "name": "$G1", "as": "G1"}, 
    79    {"type": "module", "line": 200, "name": "$G2", "filename": "linking.14.wasm"}, 
    80    {"type": "assert_return", "line": 204, "action": {"type": "get", "module": "$G2", "field": "g"}, "expected": [{"type": "i32", "value": "5"}]}, 
    81    {"type": "assert_unlinkable", "line": 207, "filename": "linking.15.wasm", "text": "elements segment does not fit", "module_type": "binary"}, 
    82    {"type": "assert_unlinkable", "line": 216, "filename": "linking.16.wasm", "text": "unknown import", "module_type": "binary"}, 
    83    {"type": "assert_trap", "line": 225, "action": {"type": "invoke", "module": "$Mt", "field": "call", "args": [{"type": "i32", "value": "7"}]}, "text": "uninitialized", "expected": [{"type": "i32"}]}, 
    84    {"type": "assert_unlinkable", "line": 228, "filename": "linking.17.wasm", "text": "elements segment does not fit", "module_type": "binary"}, 
    85    {"type": "assert_trap", "line": 236, "action": {"type": "invoke", "module": "$Mt", "field": "call", "args": [{"type": "i32", "value": "7"}]}, "text": "uninitialized", "expected": [{"type": "i32"}]}, 
    86    {"type": "assert_unlinkable", "line": 239, "filename": "linking.18.wasm", "text": "data segment does not fit", "module_type": "binary"}, 
    87    {"type": "assert_trap", "line": 248, "action": {"type": "invoke", "module": "$Mt", "field": "call", "args": [{"type": "i32", "value": "7"}]}, "text": "uninitialized", "expected": [{"type": "i32"}]}, 
    88    {"type": "module", "line": 253, "name": "$Mm", "filename": "linking.19.wasm"}, 
    89    {"type": "register", "line": 261, "name": "$Mm", "as": "Mm"}, 
    90    {"type": "module", "line": 263, "name": "$Nm", "filename": "linking.20.wasm"}, 
    91    {"type": "assert_return", "line": 275, "action": {"type": "invoke", "module": "$Mm", "field": "load", "args": [{"type": "i32", "value": "12"}]}, "expected": [{"type": "i32", "value": "2"}]}, 
    92    {"type": "assert_return", "line": 276, "action": {"type": "invoke", "module": "$Nm", "field": "Mm.load", "args": [{"type": "i32", "value": "12"}]}, "expected": [{"type": "i32", "value": "2"}]}, 
    93    {"type": "assert_return", "line": 277, "action": {"type": "invoke", "module": "$Nm", "field": "load", "args": [{"type": "i32", "value": "12"}]}, "expected": [{"type": "i32", "value": "242"}]}, 
    94    {"type": "module", "line": 279, "name": "$Om", "filename": "linking.21.wasm"}, 
    95    {"type": "assert_return", "line": 288, "action": {"type": "invoke", "module": "$Mm", "field": "load", "args": [{"type": "i32", "value": "12"}]}, "expected": [{"type": "i32", "value": "167"}]}, 
    96    {"type": "assert_return", "line": 289, "action": {"type": "invoke", "module": "$Nm", "field": "Mm.load", "args": [{"type": "i32", "value": "12"}]}, "expected": [{"type": "i32", "value": "167"}]}, 
    97    {"type": "assert_return", "line": 290, "action": {"type": "invoke", "module": "$Nm", "field": "load", "args": [{"type": "i32", "value": "12"}]}, "expected": [{"type": "i32", "value": "242"}]}, 
    98    {"type": "assert_return", "line": 291, "action": {"type": "invoke", "module": "$Om", "field": "load", "args": [{"type": "i32", "value": "12"}]}, "expected": [{"type": "i32", "value": "167"}]}, 
    99    {"type": "module", "line": 293, "filename": "linking.22.wasm"}, 
   100    {"type": "assert_unlinkable", "line": 299, "filename": "linking.23.wasm", "text": "data segment does not fit", "module_type": "binary"}, 
   101    {"type": "module", "line": 306, "name": "$Pm", "filename": "linking.24.wasm"}, 
   102    {"type": "assert_return", "line": 314, "action": {"type": "invoke", "module": "$Pm", "field": "grow", "args": [{"type": "i32", "value": "0"}]}, "expected": [{"type": "i32", "value": "1"}]}, 
   103    {"type": "assert_return", "line": 315, "action": {"type": "invoke", "module": "$Pm", "field": "grow", "args": [{"type": "i32", "value": "2"}]}, "expected": [{"type": "i32", "value": "1"}]}, 
   104    {"type": "assert_return", "line": 316, "action": {"type": "invoke", "module": "$Pm", "field": "grow", "args": [{"type": "i32", "value": "0"}]}, "expected": [{"type": "i32", "value": "3"}]}, 
   105    {"type": "assert_return", "line": 317, "action": {"type": "invoke", "module": "$Pm", "field": "grow", "args": [{"type": "i32", "value": "1"}]}, "expected": [{"type": "i32", "value": "3"}]}, 
   106    {"type": "assert_return", "line": 318, "action": {"type": "invoke", "module": "$Pm", "field": "grow", "args": [{"type": "i32", "value": "1"}]}, "expected": [{"type": "i32", "value": "4"}]}, 
   107    {"type": "assert_return", "line": 319, "action": {"type": "invoke", "module": "$Pm", "field": "grow", "args": [{"type": "i32", "value": "0"}]}, "expected": [{"type": "i32", "value": "5"}]}, 
   108    {"type": "assert_return", "line": 320, "action": {"type": "invoke", "module": "$Pm", "field": "grow", "args": [{"type": "i32", "value": "1"}]}, "expected": [{"type": "i32", "value": "4294967295"}]}, 
   109    {"type": "assert_return", "line": 321, "action": {"type": "invoke", "module": "$Pm", "field": "grow", "args": [{"type": "i32", "value": "0"}]}, "expected": [{"type": "i32", "value": "5"}]}, 
   110    {"type": "assert_unlinkable", "line": 324, "filename": "linking.25.wasm", "text": "unknown import", "module_type": "binary"}, 
   111    {"type": "assert_return", "line": 332, "action": {"type": "invoke", "module": "$Mm", "field": "load", "args": [{"type": "i32", "value": "0"}]}, "expected": [{"type": "i32", "value": "0"}]}, 
   112    {"type": "assert_unlinkable", "line": 335, "filename": "linking.26.wasm", "text": "data segment does not fit", "module_type": "binary"}, 
   113    {"type": "assert_return", "line": 342, "action": {"type": "invoke", "module": "$Mm", "field": "load", "args": [{"type": "i32", "value": "0"}]}, "expected": [{"type": "i32", "value": "0"}]}, 
   114    {"type": "assert_unlinkable", "line": 345, "filename": "linking.27.wasm", "text": "elements segment does not fit", "module_type": "binary"}, 
   115    {"type": "assert_return", "line": 354, "action": {"type": "invoke", "module": "$Mm", "field": "load", "args": [{"type": "i32", "value": "0"}]}, "expected": [{"type": "i32", "value": "0"}]}, 
   116    {"type": "module", "line": 357, "name": "$Ms", "filename": "linking.28.wasm"}, 
   117    {"type": "register", "line": 368, "name": "$Ms", "as": "Ms"}, 
   118    {"type": "assert_uninstantiable", "line": 371, "filename": "linking.29.wasm", "text": "unreachable", "module_type": "binary"}, 
   119    {"type": "assert_return", "line": 387, "action": {"type": "invoke", "module": "$Ms", "field": "get memory[0]", "args": []}, "expected": [{"type": "i32", "value": "104"}]}, 
   120    {"type": "assert_return", "line": 388, "action": {"type": "invoke", "module": "$Ms", "field": "get table[0]", "args": []}, "expected": [{"type": "i32", "value": "57005"}]}]}