issue_owner_repo
listlengths 2
2
| issue_body
stringlengths 0
261k
⌀ | issue_title
stringlengths 1
925
| issue_comments_url
stringlengths 56
81
| issue_comments_count
int64 0
2.5k
| issue_created_at
stringlengths 20
20
| issue_updated_at
stringlengths 20
20
| issue_html_url
stringlengths 37
62
| issue_github_id
int64 387k
2.46B
| issue_number
int64 1
127k
|
---|---|---|---|---|---|---|---|---|---|
[
"WebAssembly",
"wabt"
] |
The Readme in this repo suggests me to build the source code locally, but I prefer to use the system package manager to manage the tools, so that I can always upgrade to the latest version without checking the GitHub releases frequently.
I found wabt package in Ubuntu's apt and macOS's homebrew repository. After installing them, I use
```
wasm2wat --version
```
to check the version. The one downloaded from apt in Ubuntu shows `1.0.13`, and the one downloaded from homebrew in macOS shows `1.0.13 (1.0.17)`.
I wonder if the wabt I found in those system package managers is officially supported, and how is the newest version different from the GitHub newest release's version.
|
Is the wabt in system package managers officially supported?
|
https://api.github.com/repos/WebAssembly/wabt/issues/1490/comments
| 3 |
2020-07-17T03:00:43Z
|
2020-07-18T06:35:10Z
|
https://github.com/WebAssembly/wabt/issues/1490
| 658,788,360 | 1,490 |
[
"WebAssembly",
"wabt"
] |
I'm getting a compilation error:
```
[ 80%] Building CXX object CMakeFiles/wasm.dir/src/interp/interp-wasm-c-api.cc.o
/usr/bin/c++ -DWASM_API_EXTERN="__attribute__((visibility(\"default\")))" -D__STDC_FORMAT_MACROS=1 -D__STDC_LIMIT_MACROS=1 -Dwasm_EXPORTS -I/builddir/build/BUILD/wabt-1.0.17 -I/builddir/build/BUILD/wabt-1.0.17/build -I/builddir/build/BUILD/wabt-1.0.17/third_party/wasm-c-api/include -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -std=c++11 -Wold-style-cast -fno-exceptions -fPIC -fvisibility=hidden -Wall -Wextra -Wno-unused-parameter -Wpointer-arith -g -Wuninitialized -Wno-clobbered -Wno-old-style-cast -o CMakeFiles/wasm.dir/src/interp/interp-wasm-c-api.cc.o -c /builddir/build/BUILD/wabt-1.0.17/src/interp/interp-wasm-c-api.cc
/builddir/build/BUILD/wabt-1.0.17/src/interp/interp-wasm-c-api.cc: In constructor 'wasm_globaltype_t::wasm_globaltype_t(wasm_valtype_t*, wasm_mutability_t)':
/builddir/build/BUILD/wabt-1.0.17/src/interp/interp-wasm-c-api.cc:129:22: error: could not convert '* type' from 'wasm_valtype_t' to 'wabt::interp::ValueType {aka wabt::Type}'
valtype{*type} {
^
/builddir/build/BUILD/wabt-1.0.17/src/interp/interp-wasm-c-api.cc: In constructor 'wasm_tabletype_t::wasm_tabletype_t(wabt::interp::TableType)':
/builddir/build/BUILD/wabt-1.0.17/src/interp/interp-wasm-c-api.cc:152:41: error: cannot convert 'wasm_limits_t' to 'uint32_t {aka unsigned int}' in initialization
limits{FromWabtLimits(tt.limits)} {}
^
/builddir/build/BUILD/wabt-1.0.17/src/interp/interp-wasm-c-api.cc:152:41: warning: missing initializer for member 'wasm_limits_t::max' [-Wmissing-field-initializers]
/builddir/build/BUILD/wabt-1.0.17/src/interp/interp-wasm-c-api.cc: In constructor 'wasm_memorytype_t::wasm_memorytype_t(const wasm_limits_t*)':
/builddir/build/BUILD/wabt-1.0.17/src/interp/interp-wasm-c-api.cc:162:23: error: cannot convert 'const wasm_limits_t' to 'uint32_t {aka unsigned int}' in initialization
limits{*limits} {}
^
/builddir/build/BUILD/wabt-1.0.17/src/interp/interp-wasm-c-api.cc:162:23: warning: missing initializer for member 'wasm_limits_t::max' [-Wmissing-field-initializers]
/builddir/build/BUILD/wabt-1.0.17/src/interp/interp-wasm-c-api.cc: In constructor 'wasm_memorytype_t::wasm_memorytype_t(wabt::interp::MemoryType)':
/builddir/build/BUILD/wabt-1.0.17/src/interp/interp-wasm-c-api.cc:166:41: error: cannot convert 'wasm_limits_t' to 'uint32_t {aka unsigned int}' in initialization
limits{FromWabtLimits(mt.limits)} {}
^
/builddir/build/BUILD/wabt-1.0.17/src/interp/interp-wasm-c-api.cc:166:41: warning: missing initializer for member 'wasm_limits_t::max' [-Wmissing-field-initializers]
/builddir/build/BUILD/wabt-1.0.17/src/interp/interp-wasm-c-api.cc: In function 'wasm_frame_t* wasm_frame_copy(const wasm_frame_t*)':
/builddir/build/BUILD/wabt-1.0.17/src/interp/interp-wasm-c-api.cc:981:33: error: could not convert '* frame' from 'const wasm_frame_t' to 'wabt::interp::Frame'
return new wasm_frame_t{*frame};
^
make[2]: *** [CMakeFiles/wasm.dir/src/interp/interp-wasm-c-api.cc.o] Error 1
```
Is `gcc-4.8.5` a supported compiler version?
|
wabt 1.0.17 fails to compile on RHEL7 with gcc 4.8.5
|
https://api.github.com/repos/WebAssembly/wabt/issues/1482/comments
| 7 |
2020-07-15T13:41:35Z
|
2022-09-18T05:35:47Z
|
https://github.com/WebAssembly/wabt/issues/1482
| 657,359,989 | 1,482 |
[
"WebAssembly",
"wabt"
] |
When running 1.0.17 testsuite on ARMv7 32bit (Fedora 31), these tests fail:
```
- test/wasm2c/address-overflow.txt
- test/wasm2c/spec/address.txt
- test/wasm2c/spec/align.txt
- test/wasm2c/spec/binary-leb128.txt
- test/wasm2c/spec/binary.txt
- test/wasm2c/spec/br_if.txt
- test/wasm2c/spec/br_table.txt
- test/wasm2c/spec/comments.txt
- test/wasm2c/spec/const.txt
- test/wasm2c/spec/custom.txt
- test/wasm2c/spec/data.txt
- test/wasm2c/spec/elem.txt
- test/wasm2c/spec/endianness.txt
- test/wasm2c/spec/exports.txt
- test/wasm2c/spec/f32_bitwise.txt
- test/wasm2c/spec/f32_cmp.txt
- test/wasm2c/spec/f32.txt
- test/wasm2c/spec/f64_bitwise.txt
- test/wasm2c/spec/f64_cmp.txt
- test/wasm2c/spec/f64.txt
- test/wasm2c/spec/float_exprs.txt
- test/wasm2c/spec/float_literals.txt
- test/wasm2c/spec/float_memory.txt
- test/wasm2c/spec/float_misc.txt
- test/wasm2c/spec/forward.txt
- test/wasm2c/spec/func_ptrs.txt
- test/wasm2c/spec/global.txt
- test/wasm2c/spec/imports.txt
- test/wasm2c/spec/inline-module.txt
- test/wasm2c/spec/int_exprs.txt
- test/wasm2c/spec/int_literals.txt
- test/wasm2c/spec/labels.txt
- test/wasm2c/spec/left-to-right.txt
- test/wasm2c/spec/linking.txt
- test/wasm2c/spec/load.txt
- test/wasm2c/spec/local_get.txt
- test/wasm2c/spec/local_set.txt
- test/wasm2c/spec/local_tee.txt
- test/wasm2c/spec/memory_grow.txt
- test/wasm2c/spec/memory_redundancy.txt
- test/wasm2c/spec/memory_size.txt
- test/wasm2c/spec/memory_trap.txt
- test/wasm2c/spec/memory.txt
- test/wasm2c/spec/names.txt
- test/wasm2c/spec/nop.txt
- test/wasm2c/spec/return.txt
- test/wasm2c/spec/select.txt
- test/wasm2c/spec/stack.txt
- test/wasm2c/spec/start.txt
- test/wasm2c/spec/store.txt
- test/wasm2c/spec/switch.txt
- test/wasm2c/spec/table.txt
- test/wasm2c/spec/token.txt
- test/wasm2c/spec/traps.txt
- test/wasm2c/spec/type.txt
- test/wasm2c/spec/unreachable.txt
- test/wasm2c/spec/unreached-invalid.txt
- test/wasm2c/spec/unwind.txt
- test/wasm2c/spec/utf8-custom-section-id.txt
- test/wasm2c/spec/utf8-import-field.txt
- test/wasm2c/spec/utf8-import-module.txt
- test/wasm2c/spec/utf8-invalid-encoding.txt
```
Full failure log below:
```
- test/wasm2c/address-overflow.txt
expected error code 0, got 1.
STDERR MISMATCH:
--- expected
+++ actual
@@ -0,0 +1,9 @@
+Traceback (most recent call last):
+ File "/builddir/build/BUILD/wabt-1.0.17/test/run-spec-wasm2c.py", line 415, in <module>
+ sys.exit(main(sys.argv[1:]))
+ File "/builddir/build/BUILD/wabt-1.0.17/test/run-spec-wasm2c.py", line 409, in main
+ forward_stdout=True).RunWithArgs()
+ File "/builddir/build/BUILD/wabt-1.0.17/test/utils.py", line 103, in RunWithArgs
+ raise error
+utils.Error: Signal raised running "out/test/wasm2c/address-overflow/address-overflow": SIGABRT
+mmap failed: Invalid argument
STDOUT MISMATCH:
--- expected
+++ actual
@@ -1 +0,0 @@
-1/1 tests passed.
- test/wasm2c/spec/address.txt
expected error code 0, got 1.
STDERR MISMATCH:
--- expected
+++ actual
@@ -0,0 +1,9 @@
+Traceback (most recent call last):
+ File "/builddir/build/BUILD/wabt-1.0.17/test/run-spec-wasm2c.py", line 415, in <module>
+ sys.exit(main(sys.argv[1:]))
+ File "/builddir/build/BUILD/wabt-1.0.17/test/run-spec-wasm2c.py", line 409, in main
+ forward_stdout=True).RunWithArgs()
+ File "/builddir/build/BUILD/wabt-1.0.17/test/utils.py", line 103, in RunWithArgs
+ raise error
+utils.Error: Signal raised running "out/test/wasm2c/spec/address/address": SIGABRT
+mmap failed: Invalid argument
STDOUT MISMATCH:
--- expected
+++ actual
@@ -1 +0,0 @@
-255/255 tests passed.
- test/wasm2c/spec/br_if.txt
expected error code 0, got 1.
STDERR MISMATCH:
--- expected
+++ actual
@@ -0,0 +1,9 @@
+Traceback (most recent call last):
+ File "/builddir/build/BUILD/wabt-1.0.17/test/run-spec-wasm2c.py", line 415, in <module>
+ sys.exit(main(sys.argv[1:]))
+ File "/builddir/build/BUILD/wabt-1.0.17/test/run-spec-wasm2c.py", line 409, in main
+ forward_stdout=True).RunWithArgs()
+ File "/builddir/build/BUILD/wabt-1.0.17/test/utils.py", line 103, in RunWithArgs
+ raise error
+utils.Error: Signal raised running "out/test/wasm2c/spec/br_if/br_if": SIGABRT
+mmap failed: Invalid argument
STDOUT MISMATCH:
--- expected
+++ actual
@@ -1 +0,0 @@
-88/88 tests passed.
- test/wasm2c/spec/binary.txt
expected error code 0, got 1.
STDERR MISMATCH:
--- expected
+++ actual
@@ -0,0 +1,9 @@
+Traceback (most recent call last):
+ File "/builddir/build/BUILD/wabt-1.0.17/test/run-spec-wasm2c.py", line 415, in <module>
+ sys.exit(main(sys.argv[1:]))
+ File "/builddir/build/BUILD/wabt-1.0.17/test/run-spec-wasm2c.py", line 409, in main
+ forward_stdout=True).RunWithArgs()
+ File "/builddir/build/BUILD/wabt-1.0.17/test/utils.py", line 103, in RunWithArgs
+ raise error
+utils.Error: Signal raised running "out/test/wasm2c/spec/binary/binary": SIGABRT
+mmap failed: Invalid argument
STDOUT MISMATCH:
--- expected
+++ actual
@@ -1 +0,0 @@
-0/0 tests passed.
- test/wasm2c/spec/binary-leb128.txt
expected error code 0, got 1.
STDERR MISMATCH:
--- expected
+++ actual
@@ -0,0 +1,9 @@
+Traceback (most recent call last):
+ File "/builddir/build/BUILD/wabt-1.0.17/test/run-spec-wasm2c.py", line 415, in <module>
+ sys.exit(main(sys.argv[1:]))
+ File "/builddir/build/BUILD/wabt-1.0.17/test/run-spec-wasm2c.py", line 409, in main
+ forward_stdout=True).RunWithArgs()
+ File "/builddir/build/BUILD/wabt-1.0.17/test/utils.py", line 103, in RunWithArgs
+ raise error
+utils.Error: Signal raised running "out/test/wasm2c/spec/binary-leb128/binary-leb128": SIGABRT
+mmap failed: Invalid argument
STDOUT MISMATCH:
--- expected
+++ actual
@@ -1 +0,0 @@
-0/0 tests passed.
- test/wasm2c/spec/comments.txt
expected error code 0, got 1.
STDERR MISMATCH:
--- expected
+++ actual
@@ -0,0 +1,9 @@
+Traceback (most recent call last):
+ File "/builddir/build/BUILD/wabt-1.0.17/test/run-spec-wasm2c.py", line 415, in <module>
+ sys.exit(main(sys.argv[1:]))
+ File "/builddir/build/BUILD/wabt-1.0.17/test/run-spec-wasm2c.py", line 409, in main
+ forward_stdout=True).RunWithArgs()
+ File "/builddir/build/BUILD/wabt-1.0.17/test/utils.py", line 103, in RunWithArgs
+ raise error
+utils.Error: Signal raised running "out/test/wasm2c/spec/comments/comments": SIGABRT
+mmap failed: Invalid argument
STDOUT MISMATCH:
--- expected
+++ actual
@@ -1 +0,0 @@
-0/0 tests passed.
- test/wasm2c/spec/align.txt
expected error code 0, got 1.
STDERR MISMATCH:
--- expected
+++ actual
@@ -0,0 +1,9 @@
+Traceback (most recent call last):
+ File "/builddir/build/BUILD/wabt-1.0.17/test/run-spec-wasm2c.py", line 415, in <module>
+ sys.exit(main(sys.argv[1:]))
+ File "/builddir/build/BUILD/wabt-1.0.17/test/run-spec-wasm2c.py", line 409, in main
+ forward_stdout=True).RunWithArgs()
+ File "/builddir/build/BUILD/wabt-1.0.17/test/utils.py", line 103, in RunWithArgs
+ raise error
+utils.Error: Signal raised running "out/test/wasm2c/spec/align/align": SIGABRT
+mmap failed: Invalid argument
STDOUT MISMATCH:
--- expected
+++ actual
@@ -1 +0,0 @@
-48/48 tests passed.
- test/wasm2c/spec/custom.txt
expected error code 0, got 1.
STDERR MISMATCH:
--- expected
+++ actual
@@ -0,0 +1,9 @@
+Traceback (most recent call last):
+ File "/builddir/build/BUILD/wabt-1.0.17/test/run-spec-wasm2c.py", line 415, in <module>
+ sys.exit(main(sys.argv[1:]))
+ File "/builddir/build/BUILD/wabt-1.0.17/test/run-spec-wasm2c.py", line 409, in main
+ forward_stdout=True).RunWithArgs()
+ File "/builddir/build/BUILD/wabt-1.0.17/test/utils.py", line 103, in RunWithArgs
+ raise error
+utils.Error: Signal raised running "out/test/wasm2c/spec/custom/custom": SIGABRT
+mmap failed: Invalid argument
STDOUT MISMATCH:
--- expected
+++ actual
@@ -1 +0,0 @@
-0/0 tests passed.
- test/wasm2c/spec/endianness.txt
expected error code 0, got 1.
STDERR MISMATCH:
--- expected
+++ actual
@@ -0,0 +1,9 @@
+Traceback (most recent call last):
+ File "/builddir/build/BUILD/wabt-1.0.17/test/run-spec-wasm2c.py", line 415, in <module>
+ sys.exit(main(sys.argv[1:]))
+ File "/builddir/build/BUILD/wabt-1.0.17/test/run-spec-wasm2c.py", line 409, in main
+ forward_stdout=True).RunWithArgs()
+ File "/builddir/build/BUILD/wabt-1.0.17/test/utils.py", line 103, in RunWithArgs
+ raise error
+utils.Error: Signal raised running "out/test/wasm2c/spec/endianness/endianness": SIGABRT
+mmap failed: Invalid argument
STDOUT MISMATCH:
--- expected
+++ actual
@@ -1 +0,0 @@
-68/68 tests passed.
- test/wasm2c/spec/data.txt
expected error code 0, got 1.
STDERR MISMATCH:
--- expected
+++ actual
@@ -0,0 +1,9 @@
+Traceback (most recent call last):
+ File "/builddir/build/BUILD/wabt-1.0.17/test/run-spec-wasm2c.py", line 415, in <module>
+ sys.exit(main(sys.argv[1:]))
+ File "/builddir/build/BUILD/wabt-1.0.17/test/run-spec-wasm2c.py", line 409, in main
+ forward_stdout=True).RunWithArgs()
+ File "/builddir/build/BUILD/wabt-1.0.17/test/utils.py", line 103, in RunWithArgs
+ raise error
+utils.Error: Signal raised running "out/test/wasm2c/spec/data/data": SIGABRT
+mmap failed: Invalid argument
STDOUT MISMATCH:
--- expected
+++ actual
@@ -1 +0,0 @@
-0/0 tests passed.
- test/wasm2c/spec/elem.txt
expected error code 0, got 1.
STDERR MISMATCH:
--- expected
+++ actual
@@ -0,0 +1,9 @@
+Traceback (most recent call last):
+ File "/builddir/build/BUILD/wabt-1.0.17/test/run-spec-wasm2c.py", line 415, in <module>
+ sys.exit(main(sys.argv[1:]))
+ File "/builddir/build/BUILD/wabt-1.0.17/test/run-spec-wasm2c.py", line 409, in main
+ forward_stdout=True).RunWithArgs()
+ File "/builddir/build/BUILD/wabt-1.0.17/test/utils.py", line 103, in RunWithArgs
+ raise error
+utils.Error: Signal raised running "out/test/wasm2c/spec/elem/elem": SIGABRT
+mmap failed: Invalid argument
STDOUT MISMATCH:
--- expected
+++ actual
@@ -1 +0,0 @@
-13/13 tests passed.
- test/wasm2c/spec/f32_bitwise.txt
expected error code 0, got 1.
STDERR MISMATCH:
--- expected
+++ actual
@@ -0,0 +1,9 @@
+Traceback (most recent call last):
+ File "/builddir/build/BUILD/wabt-1.0.17/test/run-spec-wasm2c.py", line 415, in <module>
+ sys.exit(main(sys.argv[1:]))
+ File "/builddir/build/BUILD/wabt-1.0.17/test/run-spec-wasm2c.py", line 409, in main
+ forward_stdout=True).RunWithArgs()
+ File "/builddir/build/BUILD/wabt-1.0.17/test/utils.py", line 103, in RunWithArgs
+ raise error
+utils.Error: Signal raised running "out/test/wasm2c/spec/f32_bitwise/f32_bitwise": SIGABRT
+mmap failed: Invalid argument
STDOUT MISMATCH:
--- expected
+++ actual
@@ -1 +0,0 @@
-360/360 tests passed.
- test/wasm2c/spec/exports.txt
expected error code 0, got 1.
STDERR MISMATCH:
--- expected
+++ actual
@@ -0,0 +1,9 @@
+Traceback (most recent call last):
+ File "/builddir/build/BUILD/wabt-1.0.17/test/run-spec-wasm2c.py", line 415, in <module>
+ sys.exit(main(sys.argv[1:]))
+ File "/builddir/build/BUILD/wabt-1.0.17/test/run-spec-wasm2c.py", line 409, in main
+ forward_stdout=True).RunWithArgs()
+ File "/builddir/build/BUILD/wabt-1.0.17/test/utils.py", line 103, in RunWithArgs
+ raise error
+utils.Error: Signal raised running "out/test/wasm2c/spec/exports/exports": SIGABRT
+mmap failed: Invalid argument
STDOUT MISMATCH:
--- expected
+++ actual
@@ -1 +0,0 @@
-6/6 tests passed.
- test/wasm2c/spec/br_table.txt
expected error code 0, got 1.
STDERR MISMATCH:
--- expected
+++ actual
@@ -0,0 +1,9 @@
+Traceback (most recent call last):
+ File "/builddir/build/BUILD/wabt-1.0.17/test/run-spec-wasm2c.py", line 415, in <module>
+ sys.exit(main(sys.argv[1:]))
+ File "/builddir/build/BUILD/wabt-1.0.17/test/run-spec-wasm2c.py", line 409, in main
+ forward_stdout=True).RunWithArgs()
+ File "/builddir/build/BUILD/wabt-1.0.17/test/utils.py", line 103, in RunWithArgs
+ raise error
+utils.Error: Signal raised running "out/test/wasm2c/spec/br_table/br_table": SIGABRT
+mmap failed: Invalid argument
STDOUT MISMATCH:
--- expected
+++ actual
@@ -1 +0,0 @@
-146/146 tests passed.
- test/wasm2c/spec/f64_bitwise.txt
expected error code 0, got 1.
STDERR MISMATCH:
--- expected
+++ actual
@@ -0,0 +1,9 @@
+Traceback (most recent call last):
+ File "/builddir/build/BUILD/wabt-1.0.17/test/run-spec-wasm2c.py", line 415, in <module>
+ sys.exit(main(sys.argv[1:]))
+ File "/builddir/build/BUILD/wabt-1.0.17/test/run-spec-wasm2c.py", line 409, in main
+ forward_stdout=True).RunWithArgs()
+ File "/builddir/build/BUILD/wabt-1.0.17/test/utils.py", line 103, in RunWithArgs
+ raise error
+utils.Error: Signal raised running "out/test/wasm2c/spec/f64_bitwise/f64_bitwise": SIGABRT
+mmap failed: Invalid argument
STDOUT MISMATCH:
--- expected
+++ actual
@@ -1 +0,0 @@
-360/360 tests passed.
- test/wasm2c/spec/f32.txt
expected error code 0, got 1.
STDERR MISMATCH:
--- expected
+++ actual
@@ -0,0 +1,9 @@
+Traceback (most recent call last):
+ File "/builddir/build/BUILD/wabt-1.0.17/test/run-spec-wasm2c.py", line 415, in <module>
+ sys.exit(main(sys.argv[1:]))
+ File "/builddir/build/BUILD/wabt-1.0.17/test/run-spec-wasm2c.py", line 409, in main
+ forward_stdout=True).RunWithArgs()
+ File "/builddir/build/BUILD/wabt-1.0.17/test/utils.py", line 103, in RunWithArgs
+ raise error
+utils.Error: Signal raised running "out/test/wasm2c/spec/f32/f32": SIGABRT
+mmap failed: Invalid argument
STDOUT MISMATCH:
--- expected
+++ actual
@@ -1 +0,0 @@
-2500/2500 tests passed.
- test/wasm2c/spec/f32_cmp.txt
expected error code 0, got 1.
STDERR MISMATCH:
--- expected
+++ actual
@@ -0,0 +1,9 @@
+Traceback (most recent call last):
+ File "/builddir/build/BUILD/wabt-1.0.17/test/run-spec-wasm2c.py", line 415, in <module>
+ sys.exit(main(sys.argv[1:]))
+ File "/builddir/build/BUILD/wabt-1.0.17/test/run-spec-wasm2c.py", line 409, in main
+ forward_stdout=True).RunWithArgs()
+ File "/builddir/build/BUILD/wabt-1.0.17/test/utils.py", line 103, in RunWithArgs
+ raise error
+utils.Error: Signal raised running "out/test/wasm2c/spec/f32_cmp/f32_cmp": SIGABRT
+mmap failed: Invalid argument
STDOUT MISMATCH:
--- expected
+++ actual
@@ -1 +0,0 @@
-2400/2400 tests passed.
- test/wasm2c/spec/float_literals.txt
expected error code 0, got 1.
STDERR MISMATCH:
--- expected
+++ actual
@@ -0,0 +1,9 @@
+Traceback (most recent call last):
+ File "/builddir/build/BUILD/wabt-1.0.17/test/run-spec-wasm2c.py", line 415, in <module>
+ sys.exit(main(sys.argv[1:]))
+ File "/builddir/build/BUILD/wabt-1.0.17/test/run-spec-wasm2c.py", line 409, in main
+ forward_stdout=True).RunWithArgs()
+ File "/builddir/build/BUILD/wabt-1.0.17/test/utils.py", line 103, in RunWithArgs
+ raise error
+utils.Error: Signal raised running "out/test/wasm2c/spec/float_literals/float_literals": SIGABRT
+mmap failed: Invalid argument
STDOUT MISMATCH:
--- expected
+++ actual
@@ -1 +0,0 @@
-83/83 tests passed.
- test/wasm2c/spec/float_memory.txt
expected error code 0, got 1.
STDERR MISMATCH:
--- expected
+++ actual
@@ -0,0 +1,9 @@
+Traceback (most recent call last):
+ File "/builddir/build/BUILD/wabt-1.0.17/test/run-spec-wasm2c.py", line 415, in <module>
+ sys.exit(main(sys.argv[1:]))
+ File "/builddir/build/BUILD/wabt-1.0.17/test/run-spec-wasm2c.py", line 409, in main
+ forward_stdout=True).RunWithArgs()
+ File "/builddir/build/BUILD/wabt-1.0.17/test/utils.py", line 103, in RunWithArgs
+ raise error
+utils.Error: Signal raised running "out/test/wasm2c/spec/float_memory/float_memory": SIGABRT
+mmap failed: Invalid argument
STDOUT MISMATCH:
--- expected
+++ actual
@@ -1 +0,0 @@
-60/60 tests passed.
- test/wasm2c/spec/f64.txt
expected error code 0, got 1.
STDERR MISMATCH:
--- expected
+++ actual
@@ -0,0 +1,9 @@
+Traceback (most recent call last):
+ File "/builddir/build/BUILD/wabt-1.0.17/test/run-spec-wasm2c.py", line 415, in <module>
+ sys.exit(main(sys.argv[1:]))
+ File "/builddir/build/BUILD/wabt-1.0.17/test/run-spec-wasm2c.py", line 409, in main
+ forward_stdout=True).RunWithArgs()
+ File "/builddir/build/BUILD/wabt-1.0.17/test/utils.py", line 103, in RunWithArgs
+ raise error
+utils.Error: Signal raised running "out/test/wasm2c/spec/f64/f64": SIGABRT
+mmap failed: Invalid argument
STDOUT MISMATCH:
--- expected
+++ actual
@@ -1 +0,0 @@
-2500/2500 tests passed.
- test/wasm2c/spec/f64_cmp.txt
expected error code 0, got 1.
STDERR MISMATCH:
--- expected
+++ actual
@@ -0,0 +1,9 @@
+Traceback (most recent call last):
+ File "/builddir/build/BUILD/wabt-1.0.17/test/run-spec-wasm2c.py", line 415, in <module>
+ sys.exit(main(sys.argv[1:]))
+ File "/builddir/build/BUILD/wabt-1.0.17/test/run-spec-wasm2c.py", line 409, in main
+ forward_stdout=True).RunWithArgs()
+ File "/builddir/build/BUILD/wabt-1.0.17/test/utils.py", line 103, in RunWithArgs
+ raise error
+utils.Error: Signal raised running "out/test/wasm2c/spec/f64_cmp/f64_cmp": SIGABRT
+mmap failed: Invalid argument
STDOUT MISMATCH:
--- expected
+++ actual
@@ -1 +0,0 @@
-2400/2400 tests passed.
- test/wasm2c/spec/float_misc.txt
expected error code 0, got 1.
STDERR MISMATCH:
--- expected
+++ actual
@@ -0,0 +1,9 @@
+Traceback (most recent call last):
+ File "/builddir/build/BUILD/wabt-1.0.17/test/run-spec-wasm2c.py", line 415, in <module>
+ sys.exit(main(sys.argv[1:]))
+ File "/builddir/build/BUILD/wabt-1.0.17/test/run-spec-wasm2c.py", line 409, in main
+ forward_stdout=True).RunWithArgs()
+ File "/builddir/build/BUILD/wabt-1.0.17/test/utils.py", line 103, in RunWithArgs
+ raise error
+utils.Error: Signal raised running "out/test/wasm2c/spec/float_misc/float_misc": SIGABRT
+mmap failed: Invalid argument
STDOUT MISMATCH:
--- expected
+++ actual
@@ -1 +0,0 @@
-440/440 tests passed.
- test/wasm2c/spec/forward.txt
expected error code 0, got 1.
STDERR MISMATCH:
--- expected
+++ actual
@@ -0,0 +1,9 @@
+Traceback (most recent call last):
+ File "/builddir/build/BUILD/wabt-1.0.17/test/run-spec-wasm2c.py", line 415, in <module>
+ sys.exit(main(sys.argv[1:]))
+ File "/builddir/build/BUILD/wabt-1.0.17/test/run-spec-wasm2c.py", line 409, in main
+ forward_stdout=True).RunWithArgs()
+ File "/builddir/build/BUILD/wabt-1.0.17/test/utils.py", line 103, in RunWithArgs
+ raise error
+utils.Error: Signal raised running "out/test/wasm2c/spec/forward/forward": SIGABRT
+mmap failed: Invalid argument
STDOUT MISMATCH:
--- expected
+++ actual
@@ -1 +0,0 @@
-4/4 tests passed.
- test/wasm2c/spec/func_ptrs.txt
expected error code 0, got 1.
STDERR MISMATCH:
--- expected
+++ actual
@@ -0,0 +1,9 @@
+Traceback (most recent call last):
+ File "/builddir/build/BUILD/wabt-1.0.17/test/run-spec-wasm2c.py", line 415, in <module>
+ sys.exit(main(sys.argv[1:]))
+ File "/builddir/build/BUILD/wabt-1.0.17/test/run-spec-wasm2c.py", line 409, in main
+ forward_stdout=True).RunWithArgs()
+ File "/builddir/build/BUILD/wabt-1.0.17/test/utils.py", line 103, in RunWithArgs
+ raise error
+utils.Error: Signal raised running "out/test/wasm2c/spec/func_ptrs/func_ptrs": SIGABRT
+mmap failed: Invalid argument
STDOUT MISMATCH:
--- expected
+++ actual
@@ -1,2 +0,0 @@
-spectest.print_i32(83)
-25/25 tests passed.
- test/wasm2c/spec/global.txt
expected error code 0, got 1.
STDERR MISMATCH:
--- expected
+++ actual
@@ -0,0 +1,9 @@
+Traceback (most recent call last):
+ File "/builddir/build/BUILD/wabt-1.0.17/test/run-spec-wasm2c.py", line 415, in <module>
+ sys.exit(main(sys.argv[1:]))
+ File "/builddir/build/BUILD/wabt-1.0.17/test/run-spec-wasm2c.py", line 409, in main
+ forward_stdout=True).RunWithArgs()
+ File "/builddir/build/BUILD/wabt-1.0.17/test/utils.py", line 103, in RunWithArgs
+ raise error
+utils.Error: Signal raised running "out/test/wasm2c/spec/global/global": SIGABRT
+mmap failed: Invalid argument
STDOUT MISMATCH:
--- expected
+++ actual
@@ -1 +0,0 @@
-46/46 tests passed.
- test/wasm2c/spec/inline-module.txt
expected error code 0, got 1.
STDERR MISMATCH:
--- expected
+++ actual
@@ -0,0 +1,9 @@
+Traceback (most recent call last):
+ File "/builddir/build/BUILD/wabt-1.0.17/test/run-spec-wasm2c.py", line 415, in <module>
+ sys.exit(main(sys.argv[1:]))
+ File "/builddir/build/BUILD/wabt-1.0.17/test/run-spec-wasm2c.py", line 409, in main
+ forward_stdout=True).RunWithArgs()
+ File "/builddir/build/BUILD/wabt-1.0.17/test/utils.py", line 103, in RunWithArgs
+ raise error
+utils.Error: Signal raised running "out/test/wasm2c/spec/inline-module/inline-module": SIGABRT
+mmap failed: Invalid argument
STDOUT MISMATCH:
--- expected
+++ actual
@@ -1 +0,0 @@
-0/0 tests passed.
- test/wasm2c/spec/int_literals.txt
expected error code 0, got 1.
STDERR MISMATCH:
--- expected
+++ actual
@@ -0,0 +1,9 @@
+Traceback (most recent call last):
+ File "/builddir/build/BUILD/wabt-1.0.17/test/run-spec-wasm2c.py", line 415, in <module>
+ sys.exit(main(sys.argv[1:]))
+ File "/builddir/build/BUILD/wabt-1.0.17/test/run-spec-wasm2c.py", line 409, in main
+ forward_stdout=True).RunWithArgs()
+ File "/builddir/build/BUILD/wabt-1.0.17/test/utils.py", line 103, in RunWithArgs
+ raise error
+utils.Error: Signal raised running "out/test/wasm2c/spec/int_literals/int_literals": SIGABRT
+mmap failed: Invalid argument
STDOUT MISMATCH:
--- expected
+++ actual
@@ -1 +0,0 @@
-30/30 tests passed.
- test/wasm2c/spec/labels.txt
expected error code 0, got 1.
STDERR MISMATCH:
--- expected
+++ actual
@@ -0,0 +1,9 @@
+Traceback (most recent call last):
+ File "/builddir/build/BUILD/wabt-1.0.17/test/run-spec-wasm2c.py", line 415, in <module>
+ sys.exit(main(sys.argv[1:]))
+ File "/builddir/build/BUILD/wabt-1.0.17/test/run-spec-wasm2c.py", line 409, in main
+ forward_stdout=True).RunWithArgs()
+ File "/builddir/build/BUILD/wabt-1.0.17/test/utils.py", line 103, in RunWithArgs
+ raise error
+utils.Error: Signal raised running "out/test/wasm2c/spec/labels/labels": SIGABRT
+mmap failed: Invalid argument
STDOUT MISMATCH:
--- expected
+++ actual
@@ -1 +0,0 @@
-25/25 tests passed.
- test/wasm2c/spec/int_exprs.txt
expected error code 0, got 1.
STDERR MISMATCH:
--- expected
+++ actual
@@ -0,0 +1,9 @@
+Traceback (most recent call last):
+ File "/builddir/build/BUILD/wabt-1.0.17/test/run-spec-wasm2c.py", line 415, in <module>
+ sys.exit(main(sys.argv[1:]))
+ File "/builddir/build/BUILD/wabt-1.0.17/test/run-spec-wasm2c.py", line 409, in main
+ forward_stdout=True).RunWithArgs()
+ File "/builddir/build/BUILD/wabt-1.0.17/test/utils.py", line 103, in RunWithArgs
+ raise error
+utils.Error: Signal raised running "out/test/wasm2c/spec/int_exprs/int_exprs": SIGABRT
+mmap failed: Invalid argument
STDOUT MISMATCH:
--- expected
+++ actual
@@ -1 +0,0 @@
-89/89 tests passed.
- test/wasm2c/spec/imports.txt
expected error code 0, got 1.
STDERR MISMATCH:
--- expected
+++ actual
@@ -0,0 +1,9 @@
+Traceback (most recent call last):
+ File "/builddir/build/BUILD/wabt-1.0.17/test/run-spec-wasm2c.py", line 415, in <module>
+ sys.exit(main(sys.argv[1:]))
+ File "/builddir/build/BUILD/wabt-1.0.17/test/run-spec-wasm2c.py", line 409, in main
+ forward_stdout=True).RunWithArgs()
+ File "/builddir/build/BUILD/wabt-1.0.17/test/utils.py", line 103, in RunWithArgs
+ raise error
+utils.Error: Signal raised running "out/test/wasm2c/spec/imports/imports": SIGABRT
+mmap failed: Invalid argument
STDOUT MISMATCH:
--- expected
+++ actual
@@ -1,11 +0,0 @@
-spectest.print_i32(13)
-spectest.print_i32_f32(14 42)
-spectest.print_i32(13)
-spectest.print_i32(13)
-spectest.print_f32(13)
-spectest.print_i32(13)
-spectest.print_f64_f64(25 53)
-spectest.print_f64(24)
-spectest.print_f64(24)
-spectest.print_f64(24)
-29/29 tests passed.
- test/wasm2c/spec/left-to-right.txt
expected error code 0, got 1.
STDERR MISMATCH:
--- expected
+++ actual
@@ -0,0 +1,9 @@
+Traceback (most recent call last):
+ File "/builddir/build/BUILD/wabt-1.0.17/test/run-spec-wasm2c.py", line 415, in <module>
+ sys.exit(main(sys.argv[1:]))
+ File "/builddir/build/BUILD/wabt-1.0.17/test/run-spec-wasm2c.py", line 409, in main
+ forward_stdout=True).RunWithArgs()
+ File "/builddir/build/BUILD/wabt-1.0.17/test/utils.py", line 103, in RunWithArgs
+ raise error
+utils.Error: Signal raised running "out/test/wasm2c/spec/left-to-right/left-to-right": SIGABRT
+mmap failed: Invalid argument
STDOUT MISMATCH:
--- expected
+++ actual
@@ -1 +0,0 @@
-95/95 tests passed.
- test/wasm2c/spec/load.txt
expected error code 0, got 1.
STDERR MISMATCH:
--- expected
+++ actual
@@ -0,0 +1,9 @@
+Traceback (most recent call last):
+ File "/builddir/build/BUILD/wabt-1.0.17/test/run-spec-wasm2c.py", line 415, in <module>
+ sys.exit(main(sys.argv[1:]))
+ File "/builddir/build/BUILD/wabt-1.0.17/test/run-spec-wasm2c.py", line 409, in main
+ forward_stdout=True).RunWithArgs()
+ File "/builddir/build/BUILD/wabt-1.0.17/test/utils.py", line 103, in RunWithArgs
+ raise error
+utils.Error: Signal raised running "out/test/wasm2c/spec/load/load": SIGABRT
+mmap failed: Invalid argument
STDOUT MISMATCH:
--- expected
+++ actual
@@ -1 +0,0 @@
-37/37 tests passed.
- test/wasm2c/spec/local_get.txt
expected error code 0, got 1.
STDERR MISMATCH:
--- expected
+++ actual
@@ -0,0 +1,9 @@
+Traceback (most recent call last):
+ File "/builddir/build/BUILD/wabt-1.0.17/test/run-spec-wasm2c.py", line 415, in <module>
+ sys.exit(main(sys.argv[1:]))
+ File "/builddir/build/BUILD/wabt-1.0.17/test/run-spec-wasm2c.py", line 409, in main
+ forward_stdout=True).RunWithArgs()
+ File "/builddir/build/BUILD/wabt-1.0.17/test/utils.py", line 103, in RunWithArgs
+ raise error
+utils.Error: Signal raised running "out/test/wasm2c/spec/local_get/local_get": SIGABRT
+mmap failed: Invalid argument
STDOUT MISMATCH:
--- expected
+++ actual
@@ -1 +0,0 @@
-19/19 tests passed.
- test/wasm2c/spec/local_set.txt
expected error code 0, got 1.
STDERR MISMATCH:
--- expected
+++ actual
@@ -0,0 +1,9 @@
+Traceback (most recent call last):
+ File "/builddir/build/BUILD/wabt-1.0.17/test/run-spec-wasm2c.py", line 415, in <module>
+ sys.exit(main(sys.argv[1:]))
+ File "/builddir/build/BUILD/wabt-1.0.17/test/run-spec-wasm2c.py", line 409, in main
+ forward_stdout=True).RunWithArgs()
+ File "/builddir/build/BUILD/wabt-1.0.17/test/utils.py", line 103, in RunWithArgs
+ raise error
+utils.Error: Signal raised running "out/test/wasm2c/spec/local_set/local_set": SIGABRT
+mmap failed: Invalid argument
STDOUT MISMATCH:
--- expected
+++ actual
@@ -1 +0,0 @@
-19/19 tests passed.
- test/wasm2c/spec/linking.txt
expected error code 0, got 1.
STDERR MISMATCH:
--- expected
+++ actual
@@ -0,0 +1,9 @@
+Traceback (most recent call last):
+ File "/builddir/build/BUILD/wabt-1.0.17/test/run-spec-wasm2c.py", line 415, in <module>
+ sys.exit(main(sys.argv[1:]))
+ File "/builddir/build/BUILD/wabt-1.0.17/test/run-spec-wasm2c.py", line 409, in main
+ forward_stdout=True).RunWithArgs()
+ File "/builddir/build/BUILD/wabt-1.0.17/test/utils.py", line 103, in RunWithArgs
+ raise error
+utils.Error: Signal raised running "out/test/wasm2c/spec/linking/linking": SIGABRT
+mmap failed: Invalid argument
STDOUT MISMATCH:
--- expected
+++ actual
@@ -1 +0,0 @@
-82/82 tests passed.
- test/wasm2c/spec/local_tee.txt
expected error code 0, got 1.
STDERR MISMATCH:
--- expected
+++ actual
@@ -0,0 +1,9 @@
+Traceback (most recent call last):
+ File "/builddir/build/BUILD/wabt-1.0.17/test/run-spec-wasm2c.py", line 415, in <module>
+ sys.exit(main(sys.argv[1:]))
+ File "/builddir/build/BUILD/wabt-1.0.17/test/run-spec-wasm2c.py", line 409, in main
+ forward_stdout=True).RunWithArgs()
+ File "/builddir/build/BUILD/wabt-1.0.17/test/utils.py", line 103, in RunWithArgs
+ raise error
+utils.Error: Signal raised running "out/test/wasm2c/spec/local_tee/local_tee": SIGABRT
+mmap failed: Invalid argument
STDOUT MISMATCH:
--- expected
+++ actual
@@ -1 +0,0 @@
-55/55 tests passed.
- test/wasm2c/spec/float_exprs.txt
expected error code 0, got 1.
STDERR MISMATCH:
--- expected
+++ actual
@@ -0,0 +1,9 @@
+Traceback (most recent call last):
+ File "/builddir/build/BUILD/wabt-1.0.17/test/run-spec-wasm2c.py", line 415, in <module>
+ sys.exit(main(sys.argv[1:]))
+ File "/builddir/build/BUILD/wabt-1.0.17/test/run-spec-wasm2c.py", line 409, in main
+ forward_stdout=True).RunWithArgs()
+ File "/builddir/build/BUILD/wabt-1.0.17/test/utils.py", line 103, in RunWithArgs
+ raise error
+utils.Error: Signal raised running "out/test/wasm2c/spec/float_exprs/float_exprs": SIGABRT
+mmap failed: Invalid argument
STDOUT MISMATCH:
--- expected
+++ actual
@@ -1 +0,0 @@
-794/794 tests passed.
- test/wasm2c/spec/memory_redundancy.txt
expected error code 0, got 1.
STDERR MISMATCH:
--- expected
+++ actual
@@ -0,0 +1,9 @@
+Traceback (most recent call last):
+ File "/builddir/build/BUILD/wabt-1.0.17/test/run-spec-wasm2c.py", line 415, in <module>
+ sys.exit(main(sys.argv[1:]))
+ File "/builddir/build/BUILD/wabt-1.0.17/test/run-spec-wasm2c.py", line 409, in main
+ forward_stdout=True).RunWithArgs()
+ File "/builddir/build/BUILD/wabt-1.0.17/test/utils.py", line 103, in RunWithArgs
+ raise error
+utils.Error: Signal raised running "out/test/wasm2c/spec/memory_redundancy/memory_redundancy": SIGABRT
+mmap failed: Invalid argument
STDOUT MISMATCH:
--- expected
+++ actual
@@ -1 +0,0 @@
-4/4 tests passed.
- test/wasm2c/spec/memory_grow.txt
expected error code 0, got 1.
STDERR MISMATCH:
--- expected
+++ actual
@@ -0,0 +1,9 @@
+Traceback (most recent call last):
+ File "/builddir/build/BUILD/wabt-1.0.17/test/run-spec-wasm2c.py", line 415, in <module>
+ sys.exit(main(sys.argv[1:]))
+ File "/builddir/build/BUILD/wabt-1.0.17/test/run-spec-wasm2c.py", line 409, in main
+ forward_stdout=True).RunWithArgs()
+ File "/builddir/build/BUILD/wabt-1.0.17/test/utils.py", line 103, in RunWithArgs
+ raise error
+utils.Error: Signal raised running "out/test/wasm2c/spec/memory_grow/memory_grow": SIGABRT
+mmap failed: Invalid argument
STDOUT MISMATCH:
--- expected
+++ actual
@@ -1 +0,0 @@
-84/84 tests passed.
- test/wasm2c/spec/memory.txt
expected error code 0, got 1.
STDERR MISMATCH:
--- expected
+++ actual
@@ -0,0 +1,9 @@
+Traceback (most recent call last):
+ File "/builddir/build/BUILD/wabt-1.0.17/test/run-spec-wasm2c.py", line 415, in <module>
+ sys.exit(main(sys.argv[1:]))
+ File "/builddir/build/BUILD/wabt-1.0.17/test/run-spec-wasm2c.py", line 409, in main
+ forward_stdout=True).RunWithArgs()
+ File "/builddir/build/BUILD/wabt-1.0.17/test/utils.py", line 103, in RunWithArgs
+ raise error
+utils.Error: Signal raised running "out/test/wasm2c/spec/memory/memory": SIGABRT
+mmap failed: Invalid argument
STDOUT MISMATCH:
--- expected
+++ actual
@@ -1 +0,0 @@
-45/45 tests passed.
- test/wasm2c/spec/memory_size.txt
expected error code 0, got 1.
STDERR MISMATCH:
--- expected
+++ actual
@@ -0,0 +1,9 @@
+Traceback (most recent call last):
+ File "/builddir/build/BUILD/wabt-1.0.17/test/run-spec-wasm2c.py", line 415, in <module>
+ sys.exit(main(sys.argv[1:]))
+ File "/builddir/build/BUILD/wabt-1.0.17/test/run-spec-wasm2c.py", line 409, in main
+ forward_stdout=True).RunWithArgs()
+ File "/builddir/build/BUILD/wabt-1.0.17/test/utils.py", line 103, in RunWithArgs
+ raise error
+utils.Error: Signal raised running "out/test/wasm2c/spec/memory_size/memory_size": SIGABRT
+mmap failed: Invalid argument
STDOUT MISMATCH:
--- expected
+++ actual
@@ -1 +0,0 @@
-36/36 tests passed.
- test/wasm2c/spec/memory_trap.txt
expected error code 0, got 1.
STDERR MISMATCH:
--- expected
+++ actual
@@ -0,0 +1,9 @@
+Traceback (most recent call last):
+ File "/builddir/build/BUILD/wabt-1.0.17/test/run-spec-wasm2c.py", line 415, in <module>
+ sys.exit(main(sys.argv[1:]))
+ File "/builddir/build/BUILD/wabt-1.0.17/test/run-spec-wasm2c.py", line 409, in main
+ forward_stdout=True).RunWithArgs()
+ File "/builddir/build/BUILD/wabt-1.0.17/test/utils.py", line 103, in RunWithArgs
+ raise error
+utils.Error: Signal raised running "out/test/wasm2c/spec/memory_trap/memory_trap": SIGABRT
+mmap failed: Invalid argument
STDOUT MISMATCH:
--- expected
+++ actual
@@ -1 +0,0 @@
-171/171 tests passed.
- test/wasm2c/spec/nop.txt
expected error code 0, got 1.
STDERR MISMATCH:
--- expected
+++ actual
@@ -0,0 +1,9 @@
+Traceback (most recent call last):
+ File "/builddir/build/BUILD/wabt-1.0.17/test/run-spec-wasm2c.py", line 415, in <module>
+ sys.exit(main(sys.argv[1:]))
+ File "/builddir/build/BUILD/wabt-1.0.17/test/run-spec-wasm2c.py", line 409, in main
+ forward_stdout=True).RunWithArgs()
+ File "/builddir/build/BUILD/wabt-1.0.17/test/utils.py", line 103, in RunWithArgs
+ raise error
+utils.Error: Signal raised running "out/test/wasm2c/spec/nop/nop": SIGABRT
+mmap failed: Invalid argument
STDOUT MISMATCH:
--- expected
+++ actual
@@ -1 +0,0 @@
-83/83 tests passed.
- test/wasm2c/spec/return.txt
expected error code 0, got 1.
STDERR MISMATCH:
--- expected
+++ actual
@@ -0,0 +1,9 @@
+Traceback (most recent call last):
+ File "/builddir/build/BUILD/wabt-1.0.17/test/run-spec-wasm2c.py", line 415, in <module>
+ sys.exit(main(sys.argv[1:]))
+ File "/builddir/build/BUILD/wabt-1.0.17/test/run-spec-wasm2c.py", line 409, in main
+ forward_stdout=True).RunWithArgs()
+ File "/builddir/build/BUILD/wabt-1.0.17/test/utils.py", line 103, in RunWithArgs
+ raise error
+utils.Error: Signal raised running "out/test/wasm2c/spec/return/return": SIGABRT
+mmap failed: Invalid argument
STDOUT MISMATCH:
--- expected
+++ actual
@@ -1 +0,0 @@
-63/63 tests passed.
- test/wasm2c/spec/select.txt
expected error code 0, got 1.
STDERR MISMATCH:
--- expected
+++ actual
@@ -0,0 +1,9 @@
+Traceback (most recent call last):
+ File "/builddir/build/BUILD/wabt-1.0.17/test/run-spec-wasm2c.py", line 415, in <module>
+ sys.exit(main(sys.argv[1:]))
+ File "/builddir/build/BUILD/wabt-1.0.17/test/run-spec-wasm2c.py", line 409, in main
+ forward_stdout=True).RunWithArgs()
+ File "/builddir/build/BUILD/wabt-1.0.17/test/utils.py", line 103, in RunWithArgs
+ raise error
+utils.Error: Signal raised running "out/test/wasm2c/spec/select/select": SIGABRT
+mmap failed: Invalid argument
STDOUT MISMATCH:
--- expected
+++ actual
@@ -1 +0,0 @@
-94/94 tests passed.
- test/wasm2c/spec/stack.txt
expected error code 0, got 1.
STDERR MISMATCH:
--- expected
+++ actual
@@ -0,0 +1,9 @@
+Traceback (most recent call last):
+ File "/builddir/build/BUILD/wabt-1.0.17/test/run-spec-wasm2c.py", line 415, in <module>
+ sys.exit(main(sys.argv[1:]))
+ File "/builddir/build/BUILD/wabt-1.0.17/test/run-spec-wasm2c.py", line 409, in main
+ forward_stdout=True).RunWithArgs()
+ File "/builddir/build/BUILD/wabt-1.0.17/test/utils.py", line 103, in RunWithArgs
+ raise error
+utils.Error: Signal raised running "out/test/wasm2c/spec/stack/stack": SIGABRT
+mmap failed: Invalid argument
STDOUT MISMATCH:
--- expected
+++ actual
@@ -1 +0,0 @@
-5/5 tests passed.
- test/wasm2c/spec/start.txt
expected error code 0, got 1.
STDERR MISMATCH:
--- expected
+++ actual
@@ -0,0 +1,9 @@
+Traceback (most recent call last):
+ File "/builddir/build/BUILD/wabt-1.0.17/test/run-spec-wasm2c.py", line 415, in <module>
+ sys.exit(main(sys.argv[1:]))
+ File "/builddir/build/BUILD/wabt-1.0.17/test/run-spec-wasm2c.py", line 409, in main
+ forward_stdout=True).RunWithArgs()
+ File "/builddir/build/BUILD/wabt-1.0.17/test/utils.py", line 103, in RunWithArgs
+ raise error
+utils.Error: Signal raised running "out/test/wasm2c/spec/start/start": SIGABRT
+mmap failed: Invalid argument
STDOUT MISMATCH:
--- expected
+++ actual
@@ -1,4 +0,0 @@
-spectest.print_i32(1)
-spectest.print_i32(2)
-spectest.print()
-7/7 tests passed.
- test/wasm2c/spec/store.txt
expected error code 0, got 1.
STDERR MISMATCH:
--- expected
+++ actual
@@ -0,0 +1,9 @@
+Traceback (most recent call last):
+ File "/builddir/build/BUILD/wabt-1.0.17/test/run-spec-wasm2c.py", line 415, in <module>
+ sys.exit(main(sys.argv[1:]))
+ File "/builddir/build/BUILD/wabt-1.0.17/test/run-spec-wasm2c.py", line 409, in main
+ forward_stdout=True).RunWithArgs()
+ File "/builddir/build/BUILD/wabt-1.0.17/test/utils.py", line 103, in RunWithArgs
+ raise error
+utils.Error: Signal raised running "out/test/wasm2c/spec/store/store": SIGABRT
+mmap failed: Invalid argument
STDOUT MISMATCH:
--- expected
+++ actual
@@ -1 +0,0 @@
-9/9 tests passed.
- test/wasm2c/spec/switch.txt
expected error code 0, got 1.
STDERR MISMATCH:
--- expected
+++ actual
@@ -0,0 +1,9 @@
+Traceback (most recent call last):
+ File "/builddir/build/BUILD/wabt-1.0.17/test/run-spec-wasm2c.py", line 415, in <module>
+ sys.exit(main(sys.argv[1:]))
+ File "/builddir/build/BUILD/wabt-1.0.17/test/run-spec-wasm2c.py", line 409, in main
+ forward_stdout=True).RunWithArgs()
+ File "/builddir/build/BUILD/wabt-1.0.17/test/utils.py", line 103, in RunWithArgs
+ raise error
+utils.Error: Signal raised running "out/test/wasm2c/spec/switch/switch": SIGABRT
+mmap failed: Invalid argument
STDOUT MISMATCH:
--- expected
+++ actual
@@ -1 +0,0 @@
-26/26 tests passed.
- test/wasm2c/spec/names.txt
expected error code 0, got 1.
STDERR MISMATCH:
--- expected
+++ actual
@@ -0,0 +1,9 @@
+Traceback (most recent call last):
+ File "/builddir/build/BUILD/wabt-1.0.17/test/run-spec-wasm2c.py", line 415, in <module>
+ sys.exit(main(sys.argv[1:]))
+ File "/builddir/build/BUILD/wabt-1.0.17/test/run-spec-wasm2c.py", line 409, in main
+ forward_stdout=True).RunWithArgs()
+ File "/builddir/build/BUILD/wabt-1.0.17/test/utils.py", line 103, in RunWithArgs
+ raise error
+utils.Error: Signal raised running "out/test/wasm2c/spec/names/names": SIGABRT
+mmap failed: Invalid argument
STDOUT MISMATCH:
--- expected
+++ actual
@@ -1,3 +0,0 @@
-spectest.print_i32(42)
-spectest.print_i32(123)
-482/482 tests passed.
- test/wasm2c/spec/token.txt
expected error code 0, got 1.
STDERR MISMATCH:
--- expected
+++ actual
@@ -0,0 +1,9 @@
+Traceback (most recent call last):
+ File "/builddir/build/BUILD/wabt-1.0.17/test/run-spec-wasm2c.py", line 415, in <module>
+ sys.exit(main(sys.argv[1:]))
+ File "/builddir/build/BUILD/wabt-1.0.17/test/run-spec-wasm2c.py", line 409, in main
+ forward_stdout=True).RunWithArgs()
+ File "/builddir/build/BUILD/wabt-1.0.17/test/utils.py", line 103, in RunWithArgs
+ raise error
+utils.Error: Signal raised running "out/test/wasm2c/spec/token/token": SIGABRT
+mmap failed: Invalid argument
STDOUT MISMATCH:
--- expected
+++ actual
@@ -1 +0,0 @@
-0/0 tests passed.
- test/wasm2c/spec/table.txt
expected error code 0, got 1.
STDERR MISMATCH:
--- expected
+++ actual
@@ -0,0 +1,9 @@
+Traceback (most recent call last):
+ File "/builddir/build/BUILD/wabt-1.0.17/test/run-spec-wasm2c.py", line 415, in <module>
+ sys.exit(main(sys.argv[1:]))
+ File "/builddir/build/BUILD/wabt-1.0.17/test/run-spec-wasm2c.py", line 409, in main
+ forward_stdout=True).RunWithArgs()
+ File "/builddir/build/BUILD/wabt-1.0.17/test/utils.py", line 103, in RunWithArgs
+ raise error
+utils.Error: Signal raised running "out/test/wasm2c/spec/table/table": SIGABRT
+mmap failed: Invalid argument
STDOUT MISMATCH:
--- expected
+++ actual
@@ -1 +0,0 @@
-0/0 tests passed.
- test/wasm2c/spec/type.txt
expected error code 0, got 1.
STDERR MISMATCH:
--- expected
+++ actual
@@ -0,0 +1,9 @@
+Traceback (most recent call last):
+ File "/builddir/build/BUILD/wabt-1.0.17/test/run-spec-wasm2c.py", line 415, in <module>
+ sys.exit(main(sys.argv[1:]))
+ File "/builddir/build/BUILD/wabt-1.0.17/test/run-spec-wasm2c.py", line 409, in main
+ forward_stdout=True).RunWithArgs()
+ File "/builddir/build/BUILD/wabt-1.0.17/test/utils.py", line 103, in RunWithArgs
+ raise error
+utils.Error: Signal raised running "out/test/wasm2c/spec/type/type": SIGABRT
+mmap failed: Invalid argument
STDOUT MISMATCH:
--- expected
+++ actual
@@ -1 +0,0 @@
-0/0 tests passed.
- test/wasm2c/spec/traps.txt
expected error code 0, got 1.
STDERR MISMATCH:
--- expected
+++ actual
@@ -0,0 +1,9 @@
+Traceback (most recent call last):
+ File "/builddir/build/BUILD/wabt-1.0.17/test/run-spec-wasm2c.py", line 415, in <module>
+ sys.exit(main(sys.argv[1:]))
+ File "/builddir/build/BUILD/wabt-1.0.17/test/run-spec-wasm2c.py", line 409, in main
+ forward_stdout=True).RunWithArgs()
+ File "/builddir/build/BUILD/wabt-1.0.17/test/utils.py", line 103, in RunWithArgs
+ raise error
+utils.Error: Signal raised running "out/test/wasm2c/spec/traps/traps": SIGABRT
+mmap failed: Invalid argument
STDOUT MISMATCH:
--- expected
+++ actual
@@ -1 +0,0 @@
-32/32 tests passed.
- test/wasm2c/spec/unreachable.txt
expected error code 0, got 1.
STDERR MISMATCH:
--- expected
+++ actual
@@ -0,0 +1,9 @@
+Traceback (most recent call last):
+ File "/builddir/build/BUILD/wabt-1.0.17/test/run-spec-wasm2c.py", line 415, in <module>
+ sys.exit(main(sys.argv[1:]))
+ File "/builddir/build/BUILD/wabt-1.0.17/test/run-spec-wasm2c.py", line 409, in main
+ forward_stdout=True).RunWithArgs()
+ File "/builddir/build/BUILD/wabt-1.0.17/test/utils.py", line 103, in RunWithArgs
+ raise error
+utils.Error: Signal raised running "out/test/wasm2c/spec/unreachable/unreachable": SIGABRT
+mmap failed: Invalid argument
STDOUT MISMATCH:
--- expected
+++ actual
@@ -1 +0,0 @@
-63/63 tests passed.
- test/wasm2c/spec/unreached-invalid.txt
expected error code 0, got 1.
STDERR MISMATCH:
--- expected
+++ actual
@@ -0,0 +1,9 @@
+Traceback (most recent call last):
+ File "/builddir/build/BUILD/wabt-1.0.17/test/run-spec-wasm2c.py", line 415, in <module>
+ sys.exit(main(sys.argv[1:]))
+ File "/builddir/build/BUILD/wabt-1.0.17/test/run-spec-wasm2c.py", line 409, in main
+ forward_stdout=True).RunWithArgs()
+ File "/builddir/build/BUILD/wabt-1.0.17/test/utils.py", line 103, in RunWithArgs
+ raise error
+utils.Error: Signal raised running "out/test/wasm2c/spec/unreached-invalid/unreached-invalid": SIGABRT
+mmap failed: Invalid argument
STDOUT MISMATCH:
--- expected
+++ actual
@@ -1 +0,0 @@
-0/0 tests passed.
- test/wasm2c/spec/unwind.txt
expected error code 0, got 1.
STDERR MISMATCH:
--- expected
+++ actual
@@ -0,0 +1,9 @@
+Traceback (most recent call last):
+ File "/builddir/build/BUILD/wabt-1.0.17/test/run-spec-wasm2c.py", line 415, in <module>
+ sys.exit(main(sys.argv[1:]))
+ File "/builddir/build/BUILD/wabt-1.0.17/test/run-spec-wasm2c.py", line 409, in main
+ forward_stdout=True).RunWithArgs()
+ File "/builddir/build/BUILD/wabt-1.0.17/test/utils.py", line 103, in RunWithArgs
+ raise error
+utils.Error: Signal raised running "out/test/wasm2c/spec/unwind/unwind": SIGABRT
+mmap failed: Invalid argument
STDOUT MISMATCH:
--- expected
+++ actual
@@ -1 +0,0 @@
-49/49 tests passed.
- test/wasm2c/spec/utf8-custom-section-id.txt
expected error code 0, got 1.
STDERR MISMATCH:
--- expected
+++ actual
@@ -0,0 +1,9 @@
+Traceback (most recent call last):
+ File "/builddir/build/BUILD/wabt-1.0.17/test/run-spec-wasm2c.py", line 415, in <module>
+ sys.exit(main(sys.argv[1:]))
+ File "/builddir/build/BUILD/wabt-1.0.17/test/run-spec-wasm2c.py", line 409, in main
+ forward_stdout=True).RunWithArgs()
+ File "/builddir/build/BUILD/wabt-1.0.17/test/utils.py", line 103, in RunWithArgs
+ raise error
+utils.Error: Signal raised running "out/test/wasm2c/spec/utf8-custom-section-id/utf8-custom-section-id": SIGABRT
+mmap failed: Invalid argument
STDOUT MISMATCH:
--- expected
+++ actual
@@ -1 +0,0 @@
-0/0 tests passed.
- test/wasm2c/spec/utf8-import-field.txt
expected error code 0, got 1.
STDERR MISMATCH:
--- expected
+++ actual
@@ -0,0 +1,9 @@
+Traceback (most recent call last):
+ File "/builddir/build/BUILD/wabt-1.0.17/test/run-spec-wasm2c.py", line 415, in <module>
+ sys.exit(main(sys.argv[1:]))
+ File "/builddir/build/BUILD/wabt-1.0.17/test/run-spec-wasm2c.py", line 409, in main
+ forward_stdout=True).RunWithArgs()
+ File "/builddir/build/BUILD/wabt-1.0.17/test/utils.py", line 103, in RunWithArgs
+ raise error
+utils.Error: Signal raised running "out/test/wasm2c/spec/utf8-import-field/utf8-import-field": SIGABRT
+mmap failed: Invalid argument
STDOUT MISMATCH:
--- expected
+++ actual
@@ -1 +0,0 @@
-0/0 tests passed.
- test/wasm2c/spec/utf8-import-module.txt
expected error code 0, got 1.
STDERR MISMATCH:
--- expected
+++ actual
@@ -0,0 +1,9 @@
+Traceback (most recent call last):
+ File "/builddir/build/BUILD/wabt-1.0.17/test/run-spec-wasm2c.py", line 415, in <module>
+ sys.exit(main(sys.argv[1:]))
+ File "/builddir/build/BUILD/wabt-1.0.17/test/run-spec-wasm2c.py", line 409, in main
+ forward_stdout=True).RunWithArgs()
+ File "/builddir/build/BUILD/wabt-1.0.17/test/utils.py", line 103, in RunWithArgs
+ raise error
+utils.Error: Signal raised running "out/test/wasm2c/spec/utf8-import-module/utf8-import-module": SIGABRT
+mmap failed: Invalid argument
STDOUT MISMATCH:
--- expected
+++ actual
@@ -1 +0,0 @@
-0/0 tests passed.
- test/wasm2c/spec/utf8-invalid-encoding.txt
expected error code 0, got 1.
STDERR MISMATCH:
--- expected
+++ actual
@@ -0,0 +1,9 @@
+Traceback (most recent call last):
+ File "/builddir/build/BUILD/wabt-1.0.17/test/run-spec-wasm2c.py", line 415, in <module>
+ sys.exit(main(sys.argv[1:]))
+ File "/builddir/build/BUILD/wabt-1.0.17/test/run-spec-wasm2c.py", line 409, in main
+ forward_stdout=True).RunWithArgs()
+ File "/builddir/build/BUILD/wabt-1.0.17/test/utils.py", line 103, in RunWithArgs
+ raise error
+utils.Error: Signal raised running "out/test/wasm2c/spec/utf8-invalid-encoding/utf8-invalid-encoding": SIGABRT
+mmap failed: Invalid argument
STDOUT MISMATCH:
--- expected
+++ actual
@@ -1 +0,0 @@
-0/0 tests passed.
- test/wasm2c/spec/const.txt
expected error code 0, got 1.
STDERR MISMATCH:
--- expected
+++ actual
@@ -0,0 +1,9 @@
+Traceback (most recent call last):
+ File "/builddir/build/BUILD/wabt-1.0.17/test/run-spec-wasm2c.py", line 415, in <module>
+ sys.exit(main(sys.argv[1:]))
+ File "/builddir/build/BUILD/wabt-1.0.17/test/run-spec-wasm2c.py", line 409, in main
+ forward_stdout=True).RunWithArgs()
+ File "/builddir/build/BUILD/wabt-1.0.17/test/utils.py", line 103, in RunWithArgs
+ raise error
+utils.Error: Signal raised running "out/test/wasm2c/spec/const/const": SIGABRT
+mmap failed: Invalid argument
STDOUT MISMATCH:
--- expected
+++ actual
@@ -1 +0,0 @@
-300/300 tests passed.
```
This is in addition to the previously reported failure in [test/wasm2c/spec/skip-stack-guard-page.txt](https://github.com/WebAssembly/wabt/issues/1365).
|
multiple new test failures on ARMv7 32bit and x86 32bit
|
https://api.github.com/repos/WebAssembly/wabt/issues/1481/comments
| 6 |
2020-07-15T10:04:51Z
|
2022-02-08T09:17:00Z
|
https://github.com/WebAssembly/wabt/issues/1481
| 657,228,015 | 1,481 |
[
"WebAssembly",
"wabt"
] |
I'm not sure why it sometimes does and sometimes doesn't... the flakiness is preventing me from reducing the testcase.
STR:
```
clang main.c wasm.c $WABT/wasm2c/wasm-rt-impl.c -I$WABT/wasm2c -lm -g -DWASM_RT_MEMCHECK_SIGNAL_HANDLER=1
```
Running that, it segfaults as it tries to load from an invalid address,
```
do a load of one byte from 0xfffffe16 in a mem of size 0x10000
Segmentation fault
```
(the printf is on line 2051 of `wasm.c`).
With `-DWASM_RT_MEMCHECK_SIGNAL_HANDLER=0` it works as expected.
(binaryen fuzzer seed: `17121235161227891584`)
[wasm.c.gz](https://github.com/WebAssembly/wabt/files/4905047/wasm.c.gz)
[wasm.h.gz](https://github.com/WebAssembly/wabt/files/4905048/wasm.h.gz)
[main.c.gz](https://github.com/WebAssembly/wabt/files/4905049/main.c.gz)
|
wasm2c: signal handler doesn't always work (linux)
|
https://api.github.com/repos/WebAssembly/wabt/issues/1478/comments
| 3 |
2020-07-10T19:36:34Z
|
2020-07-14T00:16:34Z
|
https://github.com/WebAssembly/wabt/issues/1478
| 654,995,004 | 1,478 |
[
"WebAssembly",
"wabt"
] |
Using `wat2wasm --enable-gc` on the current WASM GC branch (https://github.com/WebAssembly/wabt/tree/19e51dbb3ccd2e1586f7aeb49f2f0f0c78169423), I get these errors:
```
problem.wat:11:4: error: type mismatch in local.set, expected [ref 1] but got [ref 0]
(local.set $new_obj)
^^^^^^^^^
problem.wat:13:4: error: type mismatch in implicit return, expected [ref 0] but got [ref 1]
(local.get $new_obj)
^^^^^^^^^
```
A fairly short example that exhibits the problem is this:
```
(module
(type $value (struct (field i32)))
(type $block_contents (array (mut anyref)))
(func $I_fail (param $obj (ref $value)) (result (ref $value))
(local $x (ref $block_contents))
(local $new_obj (ref $value))
(local.get $obj)
(local.set $new_obj)
(local.get $new_obj)
)
(func $I_am_ok (param $obj (ref $value)) (result (ref $value))
(local $new_obj (ref $value))
(local $x (ref $block_contents))
(local.get $obj)
(local.set $new_obj)
(local.get $new_obj)
)
)
```
Function `$I_fail` has the errors while `$I_am_ok` does not give errors. The only difference is the order of local variables. When I replace the type of local variable `$x` to be `i32` or `anyref` in function `$I_fail`, there are no errors.
|
GC branch: wat2wasm errors with order of local variables of struct or array reference type
|
https://api.github.com/repos/WebAssembly/wabt/issues/1477/comments
| 0 |
2020-06-29T07:42:35Z
|
2020-06-30T17:58:07Z
|
https://github.com/WebAssembly/wabt/issues/1477
| 647,191,611 | 1,477 |
[
"WebAssembly",
"wabt"
] |
I have this function `(import "socket" "core.create_socket" (func $std/socket/core.create_socket (result i32)))` in my wat file but it get converted to `extern u32 (*Z_socketZ_coreZ2Ecreate_socketZ_iv)(void);` or I would expect `extern s32 (*Z_socketZ_coreZ2Ecreate_socketZ_iv)(void);`.
Shouldn't wasm `i32` become `s32` (int32_t) ?
|
Why i32 got convert to u32?
|
https://api.github.com/repos/WebAssembly/wabt/issues/1476/comments
| 3 |
2020-06-26T16:46:25Z
|
2020-06-29T19:24:43Z
|
https://github.com/WebAssembly/wabt/issues/1476
| 646,385,203 | 1,476 |
[
"WebAssembly",
"wabt"
] |


what happened ?
is bug?
|
mac build is errr
|
https://api.github.com/repos/WebAssembly/wabt/issues/1475/comments
| 1 |
2020-06-24T02:09:43Z
|
2022-05-19T01:11:42Z
|
https://github.com/WebAssembly/wabt/issues/1475
| 644,263,232 | 1,475 |
[
"WebAssembly",
"wabt"
] |
When I am running the [example](https://github.com/WebAssembly/wabt/tree/master/wasm2c/examples/fac) in wasm2c, I am getting a warning:
```sh
wasm-rt-impl.c: In function ‘wasm_rt_allocate_memory’:
wasm-rt-impl.c:134:12: warning: comparison between pointer and integer
if (addr == -1) {
^~
```
```sh
$ cc --version
cc (Ubuntu 7.5.0-3ubuntu1~18.04) 7.5.0
Copyright (C) 2017 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
```
Is this warning normal?
|
warning: comparison between pointer and integer
|
https://api.github.com/repos/WebAssembly/wabt/issues/1472/comments
| 1 |
2020-06-21T08:09:03Z
|
2020-06-22T17:23:33Z
|
https://github.com/WebAssembly/wabt/issues/1472
| 642,517,832 | 1,472 |
[
"WebAssembly",
"wabt"
] |
With the version 1.0.17 I receive the follow errors on the travis build system. Any ideas what are the cause? The version 1.0.15 has work without problems. Are there changed system requirements? For a full log see at: https://api.travis-ci.org/v3/job/699849563/log.txt
```
/tmp/wabt/wabt-1.0.17/share/man/man1/wat2wasm.1: 1: /tmp/wabt/wabt-1.0.17/share/man/man1/wat2wasm.1: .Dd: not found
/tmp/wabt/wabt-1.0.17/share/man/man1/wat2wasm.1: 2: /tmp/wabt/wabt-1.0.17/share/man/man1/wat2wasm.1: .Dt: not found
/tmp/wabt/wabt-1.0.17/share/man/man1/wat2wasm.1: 3: /tmp/wabt/wabt-1.0.17/share/man/man1/wat2wasm.1: .Os: not found
/tmp/wabt/wabt-1.0.17/share/man/man1/wat2wasm.1: 4: /tmp/wabt/wabt-1.0.17/share/man/man1/wat2wasm.1: .Sh: not found
/tmp/wabt/wabt-1.0.17/share/man/man1/wat2wasm.1: 5: /tmp/wabt/wabt-1.0.17/share/man/man1/wat2wasm.1: .Nm: not found
/tmp/wabt/wabt-1.0.17/share/man/man1/wat2wasm.1: 6: /tmp/wabt/wabt-1.0.17/share/man/man1/wat2wasm.1: .Nd: not found
/tmp/wabt/wabt-1.0.17/share/man/man1/wat2wasm.1: 7: /tmp/wabt/wabt-1.0.17/share/man/man1/wat2wasm.1: .Sh: not found
/tmp/wabt/wabt-1.0.17/share/man/man1/wat2wasm.1: 8: /tmp/wabt/wabt-1.0.17/share/man/man1/wat2wasm.1: .Nm: not found
/tmp/wabt/wabt-1.0.17/share/man/man1/wat2wasm.1: 9: /tmp/wabt/wabt-1.0.17/share/man/man1/wat2wasm.1: .Op: not found
/tmp/wabt/wabt-1.0.17/share/man/man1/wat2wasm.1: 10: /tmp/wabt/wabt-1.0.17/share/man/man1/wat2wasm.1: .Ar: not found
/tmp/wabt/wabt-1.0.17/share/man/man1/wat2wasm.1: 11: /tmp/wabt/wabt-1.0.17/share/man/man1/wat2wasm.1: .Sh: not found
/tmp/wabt/wabt-1.0.17/share/man/man1/wat2wasm.1: 12: /tmp/wabt/wabt-1.0.17/share/man/man1/wat2wasm.1: .Nm: not found
/tmp/wabt/wabt-1.0.17/share/man/man1/wat2wasm.1: 13: /tmp/wabt/wabt-1.0.17/share/man/man1/wat2wasm.1: translates: not found
/tmp/wabt/wabt-1.0.17/share/man/man1/wat2wasm.1: 14: /tmp/wabt/wabt-1.0.17/share/man/man1/wat2wasm.1: .Pp: not found
/tmp/wabt/wabt-1.0.17/share/man/man1/wat2wasm.1: 15: /tmp/wabt/wabt-1.0.17/share/man/man1/wat2wasm.1: The: not found
/tmp/wabt/wabt-1.0.17/share/man/man1/wat2wasm.1: 16: /tmp/wabt/wabt-1.0.17/share/man/man1/wat2wasm.1: .Bl: not found
/tmp/wabt/wabt-1.0.17/share/man/man1/wat2wasm.1: 17: /tmp/wabt/wabt-1.0.17/share/man/man1/wat2wasm.1: .It: not found
/tmp/wabt/wabt-1.0.17/share/man/man1/wat2wasm.1: 18: /tmp/wabt/wabt-1.0.17/share/man/man1/wat2wasm.1: Use: not found
/tmp/wabt/wabt-1.0.17/share/man/man1/wat2wasm.1: 19: /tmp/wabt/wabt-1.0.17/share/man/man1/wat2wasm.1: .It: not found
/tmp/wabt/wabt-1.0.17/share/man/man1/wat2wasm.1: 20: /tmp/wabt/wabt-1.0.17/share/man/man1/wat2wasm.1: Print: not found
/tmp/wabt/wabt-1.0.17/share/man/man1/wat2wasm.1: 21: /tmp/wabt/wabt-1.0.17/share/man/man1/wat2wasm.1: .It: not found
/tmp/wabt/wabt-1.0.17/share/man/man1/wat2wasm.1: 22: /tmp/wabt/wabt-1.0.17/share/man/man1/wat2wasm.1: Turn: not found
/tmp/wabt/wabt-1.0.17/share/man/man1/wat2wasm.1: 23: /tmp/wabt/wabt-1.0.17/share/man/man1/wat2wasm.1: .It: not found
/tmp/wabt/wabt-1.0.17/share/man/man1/wat2wasm.1: 24: /tmp/wabt/wabt-1.0.17/share/man/man1/wat2wasm.1: Print: not found
/tmp/wabt/wabt-1.0.17/share/man/man1/wat2wasm.1: 25: /tmp/wabt/wabt-1.0.17/share/man/man1/wat2wasm.1: .It: not found
/tmp/wabt/wabt-1.0.17/share/man/man1/wat2wasm.1: 26: /tmp/wabt/wabt-1.0.17/share/man/man1/wat2wasm.1: Experimental: not found
/tmp/wabt/wabt-1.0.17/share/man/man1/wat2wasm.1: 27: /tmp/wabt/wabt-1.0.17/share/man/man1/wat2wasm.1: .It: not found
/tmp/wabt/wabt-1.0.17/share/man/man1/wat2wasm.1: 28: /tmp/wabt/wabt-1.0.17/share/man/man1/wat2wasm.1: Import/export: not found
/tmp/wabt/wabt-1.0.17/share/man/man1/wat2wasm.1: 29: /tmp/wabt/wabt-1.0.17/share/man/man1/wat2wasm.1: .It: not found
/tmp/wabt/wabt-1.0.17/share/man/man1/wat2wasm.1: 30: /tmp/wabt/wabt-1.0.17/share/man/man1/wat2wasm.1: Saturating: not found
/tmp/wabt/wabt-1.0.17/share/man/man1/wat2wasm.1: 31: /tmp/wabt/wabt-1.0.17/share/man/man1/wat2wasm.1: .It: not found
/tmp/wabt/wabt-1.0.17/share/man/man1/wat2wasm.1: 32: /tmp/wabt/wabt-1.0.17/share/man/man1/wat2wasm.1: Sign-extension: not found
/tmp/wabt/wabt-1.0.17/share/man/man1/wat2wasm.1: 33: /tmp/wabt/wabt-1.0.17/share/man/man1/wat2wasm.1: .It: not found
/tmp/wabt/wabt-1.0.17/share/man/man1/wat2wasm.1: 34: /tmp/wabt/wabt-1.0.17/share/man/man1/wat2wasm.1: SIMD: not found
/tmp/wabt/wabt-1.0.17/share/man/man1/wat2wasm.1: 35: /tmp/wabt/wabt-1.0.17/share/man/man1/wat2wasm.1: .It: not found
/tmp/wabt/wabt-1.0.17/share/man/man1/wat2wasm.1: 36: /tmp/wabt/wabt-1.0.17/share/man/man1/wat2wasm.1: Threading: not found
/tmp/wabt/wabt-1.0.17/share/man/man1/wat2wasm.1: 37: /tmp/wabt/wabt-1.0.17/share/man/man1/wat2wasm.1: .It: not found
/tmp/wabt/wabt-1.0.17/share/man/man1/wat2wasm.1: 38: /tmp/wabt/wabt-1.0.17/share/man/man1/wat2wasm.1: output: not found
/tmp/wabt/wabt-1.0.17/share/man/man1/wat2wasm.1: 39: /tmp/wabt/wabt-1.0.17/share/man/man1/wat2wasm.1: .It: not found
/tmp/wabt/wabt-1.0.17/share/man/man1/wat2wasm.1: 40: /tmp/wabt/wabt-1.0.17/share/man/man1/wat2wasm.1: Syntax error: "(" unexpected
```
|
wat2wasm not working under Linux
|
https://api.github.com/repos/WebAssembly/wabt/issues/1470/comments
| 1 |
2020-06-18T20:28:49Z
|
2020-06-18T20:33:33Z
|
https://github.com/WebAssembly/wabt/issues/1470
| 641,529,143 | 1,470 |
[
"WebAssembly",
"wabt"
] |
What is the status of the GC features? With version 1.0.17 I try:
```
(module
(func $test(local $val eqref)
)
)
```
I receive `error: unexpected token "eqref", expected i32, i64, f32, f64, v128 or externref.`
|
Support for eqref an other features of the GC MVP
|
https://api.github.com/repos/WebAssembly/wabt/issues/1469/comments
| 2 |
2020-06-18T19:51:14Z
|
2022-03-13T22:54:33Z
|
https://github.com/WebAssembly/wabt/issues/1469
| 641,509,325 | 1,469 |
[
"WebAssembly",
"wabt"
] |
I was wondering how important is performance to the WABT project, in particular the performance of the interpreter? Is it something that the project should actively try to improve upon?
While working on [wasmjit-omr](https://github.com/wasmjit-omr/wasmjit-omr) [1], we found that we could improve overall performance by modifying a few key parts of the VM (mostly involving linear memory and function dispatch). I am curious whether people here would be interested in having these changes upstreamed. I would be happy to spend the time working on it if people in the community feel that there are benefits to the WABT project.
I haven't been able to work on wasmjit-omr in a long while, but I'm hoping I will have more time available soonish. I will have to revisit a lot of the perf oriented work anyways to bring the project in sync with the new interpreter.
[1] [wasmjit-omr](https://github.com/wasmjit-omr/wasmjit-omr) was a university project a few classmates and I did about two years ago where we used [Eclipse OMR](https://github.com/eclipse/omr) to write a JIT compiler to go with the WABT interpreter. As part of that, we spent significant time analyzing its performance characteristics and optimizing it. Eventually, our JIT gained us ~145x performance improvement on a simple Mandelbrot benchmark over the interpreter by itself. Overall, our performance roughly matched (and even surpassed in some cases) that of a native executable generated by clang.
|
Performance of WABT Interpreter
|
https://api.github.com/repos/WebAssembly/wabt/issues/1465/comments
| 2 |
2020-06-15T19:28:07Z
|
2022-09-18T06:44:42Z
|
https://github.com/WebAssembly/wabt/issues/1465
| 639,086,764 | 1,465 |
[
"WebAssembly",
"wabt"
] |
Consider this example:
```
$ cat module0.wat
(module
(type (func (param i32) (result i32)))
(func (type 0) (local $var i32)
(local.get 0)
(local.tee $var)))
$ wat-desugar module0.wat
(module
(type (;0;) (func (param i32) (result i32)))
(func (;0;) (type 0) (param $var i32) (result i32)
(local i32)
local.get $var
local.tee $var))
$ wat-desugar --version
1.0.15
```
I expect `$var` to be 1, but it is desugared to 0.
The following snippet does what I expect.
```
$ cat module1.wat
(module
(type (func (param i32) (result i32)))
(func (param i32) (result i32) (local $var i32)
(local.get 0)
(local.tee $var)))
$ wat-desugar module1.wat
(module
(type (;0;) (func (param i32) (result i32)))
(func (;0;) (param i32) (result i32)
(local $var i32)
local.get 0
local.tee $var))
$ wat-desugar --version
1.0.15
```
|
Desugar confuses named variables
|
https://api.github.com/repos/WebAssembly/wabt/issues/1464/comments
| 1 |
2020-06-13T18:17:42Z
|
2020-06-17T12:59:51Z
|
https://github.com/WebAssembly/wabt/issues/1464
| 638,207,396 | 1,464 |
[
"WebAssembly",
"wabt"
] |
The printed version is wrong. If I call `wat2wasm.exe --version` then download release 1.0.15 print
`1.0.13 (1.0.14)`
If I build the trunk version then it print
`1.0.13 (gh-actions-test2)`
Sounds like the version was never incremented.
|
Version is wrong
|
https://api.github.com/repos/WebAssembly/wabt/issues/1463/comments
| 4 |
2020-06-13T15:00:03Z
|
2021-08-29T10:21:07Z
|
https://github.com/WebAssembly/wabt/issues/1463
| 638,176,534 | 1,463 |
[
"WebAssembly",
"wabt"
] |
```wasm
(module )
(input "a.wasm")
```
Calling `wast2json` on the above `wast` test produces this message:
```
a.wast:2:1: error: unexpected token (, expected EOF.
(input "a.wasm")
^
```
The same test is valid according to the spec interpreter.
Finding out what's going on took me quite some time. Your [documentation states](../blob/master/docs/wast2json.md) that the meta instructions are not supported. I think either the statement should be more visible or the error message should be improved.
|
Confusing error for input instruction
|
https://api.github.com/repos/WebAssembly/wabt/issues/1459/comments
| 0 |
2020-06-10T11:20:41Z
|
2020-06-10T17:46:11Z
|
https://github.com/WebAssembly/wabt/issues/1459
| 636,164,550 | 1,459 |
[
"WebAssembly",
"wabt"
] |
AFAICT there are no tests for libwasm -- it's hard to expect external projects to rely on using it without any. Are there plans to add any? (Alternately, plans to have wasm-interp use it instead of the existing api?)
|
libwasm needs tests
|
https://api.github.com/repos/WebAssembly/wabt/issues/1458/comments
| 1 |
2020-06-10T02:02:43Z
|
2020-06-10T17:44:56Z
|
https://github.com/WebAssembly/wabt/issues/1458
| 635,870,172 | 1,458 |
[
"WebAssembly",
"wabt"
] |
At least some of the public API defined by https://github.com/WebAssembly/wasm-c-api appears to be unimplemented. I found wasm_importtype_name() and wasm_module_imports() to be missing, but I didn't check for others.
|
interp-wasm-c-api is incomplete
|
https://api.github.com/repos/WebAssembly/wabt/issues/1457/comments
| 1 |
2020-06-10T01:48:51Z
|
2020-06-17T23:22:36Z
|
https://github.com/WebAssembly/wabt/issues/1457
| 635,865,990 | 1,457 |
[
"WebAssembly",
"wabt"
] |
Hi,
During fuzzing I found that the following module was consider invalid by wabt due to a `leb128` parsing error. Binaryen choose to "reject" this module but precise that it is a valid module. Other tools like [wasmer](https://github.com/wasmerio/wasmer), [wasmtime](https://github.com/bytecodealliance/wasmtime) and [wasm-tools](https://github.com/bytecodealliance/wasm-tools) valid this module.
### Reproducing
Download:
[reject_leb128_wabt.zip](https://github.com/WebAssembly/wabt/files/4750738/reject_leb128_wabt.zip)
WABT:
``` sh
$ ./wasm-validate reject_leb128_wabt.wasm
0000016: error: unable to read u32 leb128: table_size
```
Other tools:
``` sh
# binaryen
$ wasm-opt reject_leb128_wabt.wasm
wasm-opt reject_leb128_wabt2.wasm
[parse exception: inline string contains NULL (0). that is technically valid in wasm, but you shouldn't do it, and it's not supported in binaryen (at 0:34)]
Fatal: error parsing wasm
# wasmer
$ wasmer validate reject_leb128_wabt2.wasm
# wasm-tools
$ ./wasm-tools/target/debug/wasm-validate-rs reject_leb128_wabt.wasm
$ ./wasm-tools/target/debug/wasm2wat-rs reject_leb128_wabt.wasm
(module
(type (;0;) (func (param i32 i32 f64)))
(type (;1;) (func (param i32 i32) (result f64)))
(type (;2;) (func (param i32 i32)))
(type (;3;) (func (result f64)))
(type (;4;) (func (param i32) (result f64)))
(type (;5;) (func))
(import "env" "memoryBase" (global (;0;) i32))
(import "env" "memory" (memory (;0;) 0 2))
(import "e`v" "table" (table (;0;) 0 funcref))
(import "^^v" "tableBase" (global (;1;) i32))
)
```
Branch: master
commit: 15264cd20be3510058e56d1de5db1f32ae5364eb
|
[wasm2wat] Incorrect rejection of valid module
|
https://api.github.com/repos/WebAssembly/wabt/issues/1455/comments
| 2 |
2020-06-09T08:25:06Z
|
2020-06-17T01:12:05Z
|
https://github.com/WebAssembly/wabt/issues/1455
| 635,217,841 | 1,455 |
[
"WebAssembly",
"wabt"
] |
Hi,
During fuzzing I found that the following module was consider valid by `wabt` but rejected by some other tools like `binaryen` and `wasmtime`.
### Reproducing
Download: [not_valid_wabt.zip](https://github.com/WebAssembly/wabt/files/4746708/not_valid_wabt.zip)
``` sh
$ ./wasm-validate not_valid_wabt.wasm
$ echo $?
0
```
Other tools:
``` sh
# binaryen
$ wasm-opt not_valid_wabt.wasm
[parse exception: Alignment must be of a reasonable size (at 0:97)]
Fatal: error parsing wasm
# wasmtime
$ wasmtime run not_valid_wabt.wasm
Error: failed to run main module `not_valid_wabt.wasm`
Caused by:
alignment must not be larger than natural (at offset 95)
```
Branch: master
commit: 15264cd20be3510058e56d1de5db1f32ae5364eb
|
[bug] Incorrect validation of module with malformed alignment by wabt
|
https://api.github.com/repos/WebAssembly/wabt/issues/1453/comments
| 0 |
2020-06-08T15:06:24Z
|
2020-06-09T15:51:06Z
|
https://github.com/WebAssembly/wabt/issues/1453
| 634,703,018 | 1,453 |
[
"WebAssembly",
"wabt"
] |
As title.
Windows zip archive only contains .exe files.
There's no library for us to link third party wasm-c-api apps against.
|
wabt (as of 1.0.15) doesn't ship libraries in precompiled distributions
|
https://api.github.com/repos/WebAssembly/wabt/issues/1452/comments
| 2 |
2020-06-07T12:45:42Z
|
2020-06-10T23:58:18Z
|
https://github.com/WebAssembly/wabt/issues/1452
| 633,383,453 | 1,452 |
[
"WebAssembly",
"wabt"
] |
Given this input:
```
(module
(table $t 10 funcref)
(elem declare funcref (ref.func $f) (ref.func $f) (ref.null func) (ref.func $g))
(func $f)
(func $g)
)
```
this round trips as:
```
$ wat2wasm foo.wat -o foo.wasm --enable-all
$ wasm2wat foo.wasm --enable-all
(module
(type (;0;) (func))
(func (;0;) (type 0))
(func (;1;) (type 0))
(table (;0;) 10 funcref)
(elem (;0;) funcref (ref.func 0) (ref.func 0) (ref.null func) (ref.func 1)))
```
The `elem` segment here, however, I think is missing the `declare`. I believe that the binary itself has the right encoding, it's just the printing which loses it.
Also FWIW I feel like I'm opening a lot of minor and nitpickity issues. If this is too much please let me know and I can set aside these issues until I get a chance to submit fixes myself!
|
wasm2wat: Missing `declare` on elem segments with expressions
|
https://api.github.com/repos/WebAssembly/wabt/issues/1449/comments
| 1 |
2020-05-29T15:37:08Z
|
2020-05-29T20:34:59Z
|
https://github.com/WebAssembly/wabt/issues/1449
| 627,356,861 | 1,449 |
[
"WebAssembly",
"wabt"
] |
Given this input:
```wasm
(module
(table (import "Mtable_ex" "t-func") 1 funcref)
(table (import "Mtable_ex" "t-extern") 1 externref)
)
```
it round trips as:
```
$ wat2wasm foo.wat -o foo.wasm --enable-all
$ wasm2wat foo.wasm
(module
(import "Mtable_ex" "t-func" (table (;0;) 1 funcref))
(import "Mtable_ex" "t-extern" (table (;1;) 1 funcref)))
```
The second table is imported with the `funcref` type but it had the `externref` type originally. I believe the binary encoding indeed shows it has `externref` as a type, however.
|
wasm2wat: Incorrect table type printed for imported externref tables
|
https://api.github.com/repos/WebAssembly/wabt/issues/1448/comments
| 0 |
2020-05-29T15:32:35Z
|
2020-05-29T20:34:47Z
|
https://github.com/WebAssembly/wabt/issues/1448
| 627,354,143 | 1,448 |
[
"WebAssembly",
"wabt"
] |
This is unfortunately a bit of a difficult issue to reproduce, but the gist of the issue is that `wasm2wat` will normalize an elem segment when printing, so the text format isn't necessarily faithful to how the binary format was written down.
The general idea is with an element segment that looks like `(elem (;0;) funcref (ref.func 0))`. This is normalized to `(elem (;0;) func 0)` when printing. An easy test case for this isn't available because `wat2wasm` will also do this normalization on encoding.
This issue cropped up with one of the upstream spec tests, looking like this:
```
(module binary
"\00asm" "\01\00\00\00"
"\01\04\01\60\00\00" ;; Type section
"\03\02\01\00" ;; Function section
"\04\04\01" ;; Table section with 1 entry
"\70\00\00" ;; no max, minimum 0, funcref
"\05\03\01\00\00" ;; Memory section
"\09\07\01" ;; Element section with one segment
"\05\70" ;; Passive, funcref
"\01" ;; 1 element
"\d2\00\0b" ;; ref.func, index 0, end
"\0a\04\01" ;; Code section
;; function 0
"\02\00"
"\0b") ;; end
```
The text parser that I'm working with doesn't attempt to interpret the bytes and serializes them out, but `wat2wasm` in wabt will parse these bytes and, even with this module, encode a binary module that uses the `(elem (;0;) func 0)` encoding. A binary version of this module that reproduces the issue is here:
[foo.wasm.gz](https://github.com/WebAssembly/wabt/files/4702706/foo.wasm.gz)
I'm not really sure whether this is an issue per-se. It's a harmless difference but it does seem a bit odd that when printing the segments are normalized. I think it makes sense when encoding to be MVP-friendly where possible, though! If y'all think this isn't a major issue feel free to close!
|
wasm2wat normalizes element segments when printing
|
https://api.github.com/repos/WebAssembly/wabt/issues/1447/comments
| 1 |
2020-05-29T15:27:56Z
|
2020-05-29T17:59:18Z
|
https://github.com/WebAssembly/wabt/issues/1447
| 627,351,258 | 1,447 |
[
"WebAssembly",
"wabt"
] |
Given this input wat:
```wasm
(module $n
(table $t 0 funcref)
(table $u 0 funcref)
(elem $e 0)
(func
i32.const 0
i32.const 0
i32.const 0
table.copy $t $u)
(func
i32.const 0
i32.const 0
i32.const 0
table.init $u $e)
)
```
this prints out as:
```
$ wat2wasm foo.wat -o foo.wasm --enable-all
$ wasm2wat foo.wasm --enable-all
(module
(type (;0;) (func))
(func (;0;) (type 0)
i32.const 0
i32.const 0
i32.const 0
table.copy)
(func (;1;) (type 0)
i32.const 0
i32.const 0
i32.const 0
table.init 0)
(table (;0;) 0 funcref)
(table (;1;) 0 funcref)
(elem (;0;) func))
```
but the `table.copy` instruction is missing indices entirely and I believe the nonzero table index is missing from `table.init`
|
wasm2wat: table.init and table.copy don't print table indices
|
https://api.github.com/repos/WebAssembly/wabt/issues/1445/comments
| 0 |
2020-05-28T19:58:32Z
|
2020-05-29T00:03:37Z
|
https://github.com/WebAssembly/wabt/issues/1445
| 626,775,588 | 1,445 |
[
"WebAssembly",
"wabt"
] |
This input wat file:
```wasm
(module
(func
ref.null func
ref.null func
i32.const 0
select (result funcref)
drop
)
)
```
will succesfully get encoded in wasm, but when it comes back out it's printed with the wrong `select` instruction:
```
$ wat2wasm foo.wat -o foo.wasm --enable-all
$ wasm2wat foo.wasm --enable-all
(module
(type (;0;) (func))
(func (;0;) (type 0)
ref.null func
ref.null func
i32.const 0
select
drop))
```
which fails the round-trip:
```
$ wasm2wat foo.wasm -o foo2.wat --enable-all
$ wat2wasm foo2.wat -o foo2.wasm --enable-all
foo2.wat:7:5: error: type mismatch in select, expected [any, any, i32] but got [funcref, funcref, i32]
select
^^^^^^
foo2.wat:7:5: error: type mismatch in function, expected [] but got [any]
select
^^^^^^
```
|
wasm2wat loses type information on `select` instruction (reference types)
|
https://api.github.com/repos/WebAssembly/wabt/issues/1444/comments
| 0 |
2020-05-28T19:55:02Z
|
2020-05-29T19:46:55Z
|
https://github.com/WebAssembly/wabt/issues/1444
| 626,773,581 | 1,444 |
[
"WebAssembly",
"wabt"
] |
Currently it looks like `wasm2wat` doesn't print the table index for element segments if they're active on a nonzero table. For example with this input:
```wat
(module
(table 1 funcref)
(table 1 funcref)
(elem (table 1) (i32.const 0) 0)
(func)
)
```
will print:
```
$ wat2wasm foo.wat --enable-all -o foo.wasm
$ wasm2wat foo.wasm --enable-all
(module
(type (;0;) (func))
(func (;0;) (type 0))
(table (;0;) 1 funcref)
(table (;1;) 1 funcref)
(elem (;0;) (i32.const 0) func 0))
```
|
`wasm2wat` doesn't print nonzero table indices
|
https://api.github.com/repos/WebAssembly/wabt/issues/1443/comments
| 0 |
2020-05-28T19:40:17Z
|
2020-05-29T00:03:37Z
|
https://github.com/WebAssembly/wabt/issues/1443
| 626,765,432 | 1,443 |
[
"WebAssembly",
"wabt"
] |
Link to wasm-decompile on main page 404s
|
https://api.github.com/repos/WebAssembly/wabt/issues/1441/comments
| 1 |
2020-05-27T22:41:12Z
|
2020-05-27T22:41:41Z
|
https://github.com/WebAssembly/wabt/issues/1441
| 626,083,174 | 1,441 |
|
[
"WebAssembly",
"wabt"
] |
Most Wasm engines use the CPU's hardware memory protection to handle wasm sandboxing; since wasm32 pointers are 32-bit, we can reserve 8GiB (33-bits, 32-bit index plus 32-bit offset) of address space for each memory object. All addresses outside the valid range will trap in the OS, which then can be handled and converted into a wasm trap.
We should add support for this to wasm2c output too.
|
[wasm2c] Add support for trap-handling memory sandboxing
|
https://api.github.com/repos/WebAssembly/wabt/issues/1440/comments
| 1 |
2020-05-26T20:22:09Z
|
2022-05-19T01:15:21Z
|
https://github.com/WebAssembly/wabt/issues/1440
| 625,173,930 | 1,440 |
[
"WebAssembly",
"wabt"
] |
relates to https://github.com/Homebrew/homebrew-core/pull/55046
Just want to point out that the prerelease tag failed the homebrew audit check, let me know if that is intentional. Thanks!
|
prelease blocking the homebrew formula upgrade
|
https://api.github.com/repos/WebAssembly/wabt/issues/1439/comments
| 13 |
2020-05-26T17:11:18Z
|
2020-08-10T13:39:31Z
|
https://github.com/WebAssembly/wabt/issues/1439
| 625,045,188 | 1,439 |
[
"WebAssembly",
"wabt"
] |
As mentioned in #1436 I need an npm package for wasm2c (basically I want to use it from emscripten, and an emscripten build is the easiest and best way to get one!)
I created a quick one now: https://www.npmjs.com/package/wasm2c it basically has my build and the wasm2c runtime sources.
cc @dcodeIO @binji - thoughts? This could also be part of the main wabt package on npm I guess. I don't feel strongly either way, but it was super-easy to do it this way, and the more I think about it, it seems nice to have a package for wasm2c specifically.
|
npm packaging of wasm2c
|
https://api.github.com/repos/WebAssembly/wabt/issues/1438/comments
| 6 |
2020-05-21T22:42:32Z
|
2022-05-19T01:17:56Z
|
https://github.com/WebAssembly/wabt/issues/1438
| 622,834,129 | 1,438 |
[
"WebAssembly",
"wabt"
] |
While working on an issue in Wasmer, we realized that wabt was unable to parse/validate a valid Wasm file, failing with a `needed_dynlibs` error (my local wabt was installed via homebrew).
```bash
$ wasm2wat lib/c-api/tests/assets/hello_wasm.wasm
0000018: error: unable to read u32 leb128: needed_dynlibs
```
```bash
$ wasm-validate lib/c-api/tests/assets/hello_wasm.wasm
0000018: error: unable to read u32 leb128: needed_dynlibs
```
The [`hello_wasm.wasm` file](https://github.com/wasmerio/wasmer/blob/master/lib/runtime-c-api/tests/assets/hello_wasm.wasm) seem to be valid according to other validators, so we have no insight of what might be causing the parsing/validating error.
For debugging: the wasm file was generated using rustc with `wasm32-unknown-unknown` target for this source:
https://github.com/wasmerio/wasmer/blob/master/lib/runtime-c-api/tests/assets/return_hello.rs
|
wasm2wat needed_dynlibs error
|
https://api.github.com/repos/WebAssembly/wabt/issues/1429/comments
| 6 |
2020-05-16T07:49:47Z
|
2020-05-19T05:08:09Z
|
https://github.com/WebAssembly/wabt/issues/1429
| 619,407,101 | 1,429 |
[
"WebAssembly",
"wabt"
] |
On main page: https://github.com/WebAssembly/wabt the link to wasm-decompile doc is broken https://webassembly.github.io/wabt/doc/wasm-decompile.1.html
I think it is missing from https://github.com/WebAssembly/wabt/tree/master/docs/doc
|
wasm-decompile link in README is broken
|
https://api.github.com/repos/WebAssembly/wabt/issues/1428/comments
| 5 |
2020-05-15T23:26:21Z
|
2022-09-18T06:03:09Z
|
https://github.com/WebAssembly/wabt/issues/1428
| 619,323,348 | 1,428 |
[
"WebAssembly",
"wabt"
] |
Right now compiling a wasm with a function called `main` leads to clang complaining about
```cpp
static u32 main(u32, u32);
static u32 main(u32, u32) {
.. impl ..
}
```
```cpp
a.c:179:1: warning: 'main' should not be declared static [-Wmain]
static u32 main(u32, u32);
^~~~~~~
a.c:179:8: warning: return type of 'main' is not 'int' [-Wmain-return-type]
static u32 main(u32, u32);
^
a.c:179:8: note: change return type to 'int'
static u32 main(u32, u32);
^~~
int
a.c:179:12: error: first parameter of 'main' (argument count) must be of type 'int'
static u32 main(u32, u32);
^
a.c:179:12: error: second parameter of 'main' (argument array) must be of type 'char **'
```
Despite `main` being declared static, and in its own file where there isn't an actual `main`, it thinks it's a bad declaration of `main`. Similar things can probably happen with other libc things that clang warns about redeclarations of.
Perhaps all function names should be mangled, say by adding a `_` prefix to them? As this is just for the `static` impls, and not seen by the outside, this doesn't seem too bad maybe, but it would make it a little less readable.
|
wasm2c: function name mangling?
|
https://api.github.com/repos/WebAssembly/wabt/issues/1426/comments
| 2 |
2020-05-15T14:08:17Z
|
2020-05-15T20:50:37Z
|
https://github.com/WebAssembly/wabt/issues/1426
| 618,993,807 | 1,426 |
[
"WebAssembly",
"wabt"
] |
Noticed this [here](https://github.com/AssemblyScript/wabt.js/pull/15) while attempting to update the wabt.js buildbot to GitHub Actions and decided to test with all of fastcomp, upstream and tot because why not.
Tracked this down so far to `Module._malloc` for example trying to call into `Module['asm']['ya']`, which does not exist.
|
libwabt.js builds are broken with Emscripten upstream/tot
|
https://api.github.com/repos/WebAssembly/wabt/issues/1421/comments
| 3 |
2020-05-12T19:53:56Z
|
2020-05-13T15:17:56Z
|
https://github.com/WebAssembly/wabt/issues/1421
| 616,918,122 | 1,421 |
[
"WebAssembly",
"wabt"
] |
On one hand there is the Readme.md providing information for cloning and building the suite manually.
On the other hand there are binaries packed in archives for different platforms provided on the 'releases' tab, which is very helpful for beginners.
What I am missing though, are instructions for what to do after unpacking the binary archives.
E.g. the wabt-1.0.15-linux.tar.gz : Extracting it gives a bunch of bin files ... is there a special target folder to copy them into?
What about the .asm files are they meant to be copied somewhere too?
(Note: There is for example the 'Programming WebAssembly with Rust' book which starts with wabt as WebAssembly introduction, but more or less "assumes" the binaries to be in /usr/local/bin).
|
Missing instructions for the provided binary archives
|
https://api.github.com/repos/WebAssembly/wabt/issues/1420/comments
| 3 |
2020-05-12T18:30:48Z
|
2020-05-13T19:42:05Z
|
https://github.com/WebAssembly/wabt/issues/1420
| 616,868,815 | 1,420 |
[
"WebAssembly",
"wabt"
] |
Given an input such as:
```wasm
(module (func (param i32) (param $b i32)))
```
This round-trip through tooling fails to succeed:
```
$ wat2wasm --debug-names foo.wat -o foo.wasm
$ wasm2wat foo.wasm > bar.wat
$ wat2wasm bar.wat -o bar.wasm
bar.wat:3:35: error: unexpected token $b, expected ).
(func (;0;) (type 0) (param i32 $b i32)))
```
I think that parameter printing needs to terminate the previous `(param ...)` group whenever it prints a parameter with a name?
|
`wasm2wat` may produce un-parseable WAT syntax with parameter names
|
https://api.github.com/repos/WebAssembly/wabt/issues/1417/comments
| 2 |
2020-05-11T20:01:17Z
|
2020-05-14T18:39:07Z
|
https://github.com/WebAssembly/wabt/issues/1417
| 616,145,794 | 1,417 |
[
"WebAssembly",
"wabt"
] |
Hey,
Similar assertion failure than #1413 but in another expression.
```
Assertion `sig_index < module_->types.size()' failed.
```
Related code (line `737`):
https://github.com/WebAssembly/wabt/blob/e88bc660cf89ca84dccda358cfbadc8a7c2bc935/src/binary-reader-ir.cc#L736-L738
# Reproducing
Download: [assert_OnReturnCallIndirectExpr_wabt.zip](https://github.com/WebAssembly/wabt/files/4606204/assert_OnReturnCallIndirectExpr_wabt.zip)
Run:
``` sh
./bin/wasm2wat --enable-all assert_OnReturnCallIndirectExpr_wabt.wasm -o /dev/null
wasm2wat: /home/scop/Documents/wabt/src/binary-reader-ir.cc:737: virtual wabt::Result wabt::(anonymous namespace)::BinaryReaderIR::OnReturnCallIndirectExpr(wabt::Index, wabt::Index): Assertion `sig_index < module_->types.size()' failed.
[1] 13148 abort (core dumped) ./bin/wasm2wat --enable-all assert_OnReturnCallIndirectExpr_wabt.wasm -o
```
|
[wasm2wat] Assertion failure in BinaryReaderIR::OnReturnCallIndirectExpr
|
https://api.github.com/repos/WebAssembly/wabt/issues/1414/comments
| 1 |
2020-05-10T17:05:05Z
|
2020-06-09T08:41:40Z
|
https://github.com/WebAssembly/wabt/issues/1414
| 615,433,760 | 1,414 |
[
"WebAssembly",
"wabt"
] |
Hey,
During fuzzing I triggered this assertion failure using `wasm2wat --enable-all`:
```
Assertion `sig_index < module_->types.size()' failed.
```
Related code (line `725`):
https://github.com/WebAssembly/wabt/blob/e88bc660cf89ca84dccda358cfbadc8a7c2bc935/src/binary-reader-ir.cc#L724-L726
# Reproducing
Download: [assert_OnCallIndirectExpr_wabt.zip](https://github.com/WebAssembly/wabt/files/4606171/assert_OnCallIndirectExpr_wabt.zip)
Run:
``` sh
./bin/wasm2wat --enable-all assert_OnCallIndirectExpr_wabt.wasm -o /dev/null
wasm2wat: /home/scop/Documents/wabt/src/binary-reader-ir.cc:725: virtual wabt::Result wabt::(anonymous namespace)::BinaryReaderIR::OnCallIndirectExpr(wabt::Index, wabt::Index): Assertion `sig_index < module_->types.size()' failed.
[1] 10570 abort (core dumped) ./bin/wasm2wat --enable-all assert_OnCallIndirectExpr_wabt.wasm -o /dev/null
```
|
[wasm2wat] Assertion failure in BinaryReaderIR::OnCallIndirectExpr
|
https://api.github.com/repos/WebAssembly/wabt/issues/1413/comments
| 1 |
2020-05-10T17:00:06Z
|
2020-06-09T08:40:51Z
|
https://github.com/WebAssembly/wabt/issues/1413
| 615,432,882 | 1,413 |
[
"WebAssembly",
"wabt"
] |
Seems like adding a dependency on https://github.com/cjihrig/uvwasi might be a good start.
|
Add WASI API to wasm-interp / wasm2c
|
https://api.github.com/repos/WebAssembly/wabt/issues/1409/comments
| 2 |
2020-05-10T00:21:57Z
|
2020-05-13T01:28:44Z
|
https://github.com/WebAssembly/wabt/issues/1409
| 615,286,250 | 1,409 |
[
"WebAssembly",
"wabt"
] |
`wasm-decompile.exe` tool is great!!! It gives better readable format.
Is it possible to have the mangled function name instead of demangled in the output file ?
|
Is it possible to have de-mangled function name in the output of wasm-decompile.exe
|
https://api.github.com/repos/WebAssembly/wabt/issues/1406/comments
| 13 |
2020-05-06T01:47:52Z
|
2023-01-03T19:30:11Z
|
https://github.com/WebAssembly/wabt/issues/1406
| 612,998,200 | 1,406 |
[
"WebAssembly",
"wabt"
] |
When `wast2json` is run on the upstream annotations proposal test it currently infinite loops:
```
$ wast2json testsuite/proposals/annotations/annotations.wast --enable-all
<hangs>
```
I've minimized this to:
```wat
(module quote "(@a \0a)") ;; \n
```
where `wast2json` run over that file infinite loops.
|
Infinite loop parsing upstream annotations proposal
|
https://api.github.com/repos/WebAssembly/wabt/issues/1404/comments
| 1 |
2020-05-05T14:35:22Z
|
2020-05-06T18:48:15Z
|
https://github.com/WebAssembly/wabt/issues/1404
| 612,651,834 | 1,404 |
[
"WebAssembly",
"wabt"
] |
Hi,
I want to use clang to compile the c file generated by wasm2c into LLVM IR.
The command I used is as follows:
`clang -emit-llvm -c test.c -I ~/wabt/wasm2c/`
However it fails and I got some errors listed below:
```
error: static declaration of '__signbitl' follows non-static declaration
error: too many arguments to function call, expected single argument '__value', have 2 arguments
i0 = __signbitl(j0, j1);
```
How can I fix this problem, or is there another way to achieve wasm2llvm (reverse engineering) ?
Thank you.
BTW, I pasted the detailed error information here:
```
test.c:1131:12: error: static declaration of 'strnlen' follows non-static declaration
static u32 strnlen(u32, u32);
^
/usr/include/string.h:390:15: note: previous declaration is here
extern size_t strnlen (const char *__string, size_t __maxlen)
^
test.c:1133:12: error: static declaration of '__signbitl' follows non-static declaration
static u32 __signbitl(u64, u64);
^
/usr/include/x86_64-linux-gnu/bits/mathcalls-helper-functions.h:25:1: note: previous declaration is here
__MATHDECL_1 (int, __signbit,, (_Mdouble_ __value))
^
/usr/include/math.h:283:15: note: expanded from macro '__MATHDECL_1'
extern type __MATH_PRECNAME(function,suffix) args __THROW
^
/usr/include/math.h:345:35: note: expanded from macro '__MATH_PRECNAME'
# define __MATH_PRECNAME(name,r) name##l##r
^
<scratch space>:331:1: note: expanded from here
__signbitl
^
test.c:1134:12: error: static declaration of '__fpclassifyl' follows non-static declaration
static u32 __fpclassifyl(u64, u64);
^
/usr/include/x86_64-linux-gnu/bits/mathcalls-helper-functions.h:21:1: note: previous declaration is here
__MATHDECL_1 (int, __fpclassify,, (_Mdouble_ __value))
^
/usr/include/math.h:283:15: note: expanded from macro '__MATHDECL_1'
extern type __MATH_PRECNAME(function,suffix) args __THROW
^
/usr/include/math.h:345:35: note: expanded from macro '__MATH_PRECNAME'
# define __MATH_PRECNAME(name,r) name##l##r
^
<scratch space>:330:1: note: expanded from here
__fpclassifyl
^
test.c:1135:13: error: static declaration of 'frexpl' follows non-static declaration
static void frexpl(u32, u64, u64, u32);
^
/usr/include/x86_64-linux-gnu/bits/mathcalls.h:98:1: note: previous declaration is here
__MATHCALL (frexp,, (_Mdouble_ __x, int *__exponent));
^
/usr/include/math.h:273:3: note: expanded from macro '__MATHCALL'
__MATHDECL (_Mdouble_,function,suffix, args)
^
/usr/include/math.h:275:3: note: expanded from macro '__MATHDECL'
__MATHDECL_1(type, function,suffix, args); \
^
/usr/include/math.h:283:15: note: expanded from macro '__MATHDECL_1'
extern type __MATH_PRECNAME(function,suffix) args __THROW
^
/usr/include/math.h:345:35: note: expanded from macro '__MATH_PRECNAME'
# define __MATH_PRECNAME(name,r) name##l##r
^
<scratch space>:385:1: note: expanded from here
frexpl
^
test.c:239420:25: error: too many arguments to function call, expected single argument '__value', have 2 arguments
i0 = __signbitl(j0, j1);
~~~~~~~~~~ ^~
/usr/include/x86_64-linux-gnu/bits/mathcalls-helper-functions.h:25:1: note: '__signbitl' declared here
__MATHDECL_1 (int, __signbit,, (_Mdouble_ __value))
^
/usr/include/math.h:283:3: note: expanded from macro '__MATHDECL_1'
extern type __MATH_PRECNAME(function,suffix) args __THROW
^
test.c:239478:28: error: too many arguments to function call, expected single argument '__value', have 2 arguments
i0 = __fpclassifyl(j0, j1);
~~~~~~~~~~~~~ ^~
/usr/include/x86_64-linux-gnu/bits/mathcalls-helper-functions.h:21:1: note: '__fpclassifyl' declared here
__MATHDECL_1 (int, __fpclassify,, (_Mdouble_ __value))
^
/usr/include/math.h:283:3: note: expanded from macro '__MATHDECL_1'
extern type __MATH_PRECNAME(function,suffix) args __THROW
^
test.c:239490:20: error: too many arguments to function call, expected 2, have 4
frexpl(i0, j1, j2, i3);
~~~~~~ ^~~~~~
test.c:240022:18: warning: incompatible integer to pointer conversion passing 'u32' (aka 'unsigned int') to parameter of type 'const char *' [-Wint-conversion]
i1 = strnlen(i1, i2);
^~
/usr/include/string.h:390:36: note: passing argument to parameter '__string' here
extern size_t strnlen (const char *__string, size_t __maxlen)
^
test.c:244638:12: error: static declaration of 'strnlen' follows non-static declaration
static u32 strnlen(u32 p0, u32 p1) {
^
/usr/include/string.h:390:15: note: previous declaration is here
extern size_t strnlen (const char *__string, size_t __maxlen)
^
test.c:244674:12: error: static declaration of '__signbitl' follows non-static declaration
static u32 __signbitl(u64 p0, u64 p1) {
^
/usr/include/x86_64-linux-gnu/bits/mathcalls-helper-functions.h:25:1: note: previous declaration is here
__MATHDECL_1 (int, __signbit,, (_Mdouble_ __value))
^
/usr/include/math.h:283:15: note: expanded from macro '__MATHDECL_1'
extern type __MATH_PRECNAME(function,suffix) args __THROW
^
/usr/include/math.h:345:35: note: expanded from macro '__MATH_PRECNAME'
# define __MATH_PRECNAME(name,r) name##l##r
^
<scratch space>:331:1: note: expanded from here
__signbitl
^
test.c:244686:12: error: static declaration of '__fpclassifyl' follows non-static declaration
static u32 __fpclassifyl(u64 p0, u64 p1) {
^
/usr/include/x86_64-linux-gnu/bits/mathcalls-helper-functions.h:21:1: note: previous declaration is here
__MATHDECL_1 (int, __fpclassify,, (_Mdouble_ __value))
^
/usr/include/math.h:283:15: note: expanded from macro '__MATHDECL_1'
extern type __MATH_PRECNAME(function,suffix) args __THROW
^
/usr/include/math.h:345:35: note: expanded from macro '__MATH_PRECNAME'
# define __MATH_PRECNAME(name,r) name##l##r
^
<scratch space>:330:1: note: expanded from here
__fpclassifyl
^
test.c:244732:13: error: static declaration of 'frexpl' follows non-static declaration
static void frexpl(u32 p0, u64 p1, u64 p2, u32 p3) {
^
/usr/include/x86_64-linux-gnu/bits/mathcalls.h:98:1: note: previous declaration is here
__MATHCALL (frexp,, (_Mdouble_ __x, int *__exponent));
^
/usr/include/math.h:273:3: note: expanded from macro '__MATHCALL'
__MATHDECL (_Mdouble_,function,suffix, args)
^
/usr/include/math.h:275:3: note: expanded from macro '__MATHDECL'
__MATHDECL_1(type, function,suffix, args); \
^
/usr/include/math.h:283:15: note: expanded from macro '__MATHDECL_1'
extern type __MATH_PRECNAME(function,suffix) args __THROW
^
/usr/include/math.h:345:35: note: expanded from macro '__MATH_PRECNAME'
# define __MATH_PRECNAME(name,r) name##l##r
^
<scratch space>:385:1: note: expanded from here
frexpl
^
test.c:244780:18: error: too many arguments to function call, expected 2, have 4
frexpl(i0, j1, j2, i3);
~~~~~~ ^~~~~~
test.c:248158:38: warning: incompatible function pointer types assigning to 'u32 (*)(u32, u32)' (aka 'unsigned int (*)(unsigned int, unsigned int)') from 'size_t (*)(const char *, size_t)' (aka 'unsigned long (*)(const char *, unsigned long)') [-Wincompatible-function-pointer-types]
WASM_RT_ADD_PREFIX(Z_strnlenZ_iii) = (&strnlen);
^ ~~~~~~~~~~
test.c:248162:41: warning: incompatible function pointer types assigning to 'u32 (*)(u64, u64)' (aka 'unsigned int (*)(unsigned long, unsigned long)') from 'int (*)(long double)' [-Wincompatible-function-pointer-types]
WASM_RT_ADD_PREFIX(Z___signbitlZ_ijj) = (&__signbitl);
^ ~~~~~~~~~~~~~
test.c:248164:44: warning: incompatible function pointer types assigning to 'u32 (*)(u64, u64)' (aka 'unsigned int (*)(unsigned long, unsigned long)') from 'int (*)(long double)' [-Wincompatible-function-pointer-types]
WASM_RT_ADD_PREFIX(Z___fpclassifylZ_ijj) = (&__fpclassifyl);
^ ~~~~~~~~~~~~~~~~
test.c:248166:39: warning: incompatible function pointer types assigning to 'void (*)(u32, u64, u64, u32)' (aka 'void (*)(unsigned int, unsigned long, unsigned long, unsigned int)') from 'long double (*)(long double, int *)' [-Wincompatible-function-pointer-types]
WASM_RT_ADD_PREFIX(Z_frexplZ_vijji) = (&frexpl);
^ ~~~~~~~~~
5 warnings and 12 errors generated.
```
|
Compile test.c (generated by wasm2c) into LLVM
|
https://api.github.com/repos/WebAssembly/wabt/issues/1402/comments
| 2 |
2020-05-01T14:39:19Z
|
2022-04-27T17:57:23Z
|
https://github.com/WebAssembly/wabt/issues/1402
| 610,784,282 | 1,402 |
[
"WebAssembly",
"wabt"
] |
Fuzz testcase:
```wat
(module
(type $none_=>_none (func))
(memory $0 1 1)
(global $global$0 (mut i32) (i32.const 10))
(export "hangLimitInitializer" (func $1))
(export "func_13_invoker" (func $0))
(func $0
(loop $label$1
(if
(global.get $global$0)
(block
(global.set $global$0
(i32.const 0)
)
(drop
(i32.load8_s offset=22 ;; note the offset is bigger than 16
(i32.const -16)
)
)
(br $label$1)
)
)
)
)
(func $1
(nop)
)
)
```
The key part is
```wat
(i32.load8_s offset=22 ;; note the offset is bigger than 16
(i32.const -16)
)
```
Wasm2c turns that into
```c
i0 = 4294967280u;
i0 = i32_load8_s((&M0), (u64)(i0 + 22));
```
The wasm here would trap, but the wasm2c output doesn't. I think what happens is `i0 + 22` wraps around, and only then do we turn it into a `u64` and do a load from the seemingly-valid address `6`.
|
wasm2c load/store offset calculation
|
https://api.github.com/repos/WebAssembly/wabt/issues/1400/comments
| 5 |
2020-04-28T16:06:21Z
|
2020-04-29T15:29:41Z
|
https://github.com/WebAssembly/wabt/issues/1400
| 608,436,825 | 1,400 |
[
"WebAssembly",
"wabt"
] |
For the input file
```
(module quote "")
```
wast2json 1.0.13 crashes:
```
$ wast2json malformed.wast --no-check
wast2json: /home/andrei/dev/wabt/src/wast-parser.cc:474: wabt::Token wabt::WastParser::Consume(): Assertion `!tokens_.empty()' failed.
Aborted (core dumped)
```
|
wast2json assertion failure when file contains malformed module
|
https://api.github.com/repos/WebAssembly/wabt/issues/1399/comments
| 0 |
2020-04-28T11:04:55Z
|
2020-04-28T11:04:55Z
|
https://github.com/WebAssembly/wabt/issues/1399
| 608,228,514 | 1,399 |
[
"WebAssembly",
"wabt"
] |
I've compiled a simple example with Clang 8.0.1:
```c
int f() {
return 42;
}
```
With latest wabt release (1.0.13), wasm2wat dump for this file is:
```wat
(module
(type (;0;) (func))
(func $__wasm_call_ctors (type 0))
(table (;0;) 1 1 funcref)
(memory (;0;) 2)
(global (;0;) (mut i32) (i32.const 66560))
(global (;1;) i32 (i32.const 66560))
(global (;2;) i32 (i32.const 1024))
(export "memory" (memory 0))
(export "__heap_base" (global 1))
(export "__data_end" (global 2)))
```
while wasm-decompile prints:
```
export memory memory(initial: 2, max: 0);
global g_a:int = 66560;
global heap_base:int = 66560;
global data_end:int = 1024;
table T_a:funcref(min: 1, max: 1);
function wasm_call_ctors() {
}
```
Note how `global`s are not marked as exported, even though they are as shown by wasm2wat.
|
wasm-decompile doesn't mark standard exported globals as exported
|
https://api.github.com/repos/WebAssembly/wabt/issues/1397/comments
| 1 |
2020-04-27T18:03:47Z
|
2023-01-03T19:30:27Z
|
https://github.com/WebAssembly/wabt/issues/1397
| 607,743,366 | 1,397 |
[
"WebAssembly",
"wabt"
] |
I tried to decompile a Wasm file that contains SIMD instructions to Wat and got this error:
```
Error: readWasm failed:
0000039: error: expected valid local type
```
|
wasm2wat crashes upon reaching SIMD instructions
|
https://api.github.com/repos/WebAssembly/wabt/issues/1396/comments
| 12 |
2020-04-27T04:51:59Z
|
2020-04-28T02:10:30Z
|
https://github.com/WebAssembly/wabt/issues/1396
| 607,231,333 | 1,396 |
[
"WebAssembly",
"wabt"
] |
I tried to build the gc branch using CMake directly, as described in the README.
The build fails with
```
In file included from /[..]/wabt/src/shared-validator.cc:17:
/[..]/wabt/src/shared-validator.h:194:47:
error: ‘MutVector’ does not name a type; did you mean ‘VarVector’?
194 | StructType(const TypeVector& types, const MutVector& muts)
| ^~~~~~~~~
| VarVector
```
on Debian unstable at commit b7e318e47a2784cd09e7be1489c902c4ea562525.
Reason I'm trying to run this: experimenting with compiling to WASM+GCMVP and looking for something to run the emitted code.
|
Failing to compile GC branch
|
https://api.github.com/repos/WebAssembly/wabt/issues/1395/comments
| 2 |
2020-04-25T15:31:42Z
|
2020-05-24T14:25:51Z
|
https://github.com/WebAssembly/wabt/issues/1395
| 606,793,930 | 1,395 |
[
"WebAssembly",
"wabt"
] |
I think wasm should have a framework that all browsers use. It should contain
- all the common numeric, literal and date type operations and casting.
- Dom manipulation operations.
- sending requests to the server if needs (like Ajax).
Isn't this all what we need from client code?
If this wasm framework contained in all browsers, this will targeting wasm from web technologies easier, since there will be no need to download anything to the client except a pure wasm code targeting this framework.
Without a wasm framework, it will can be a mess in the client machine, due to thousands of dlls and runtimes coming from hundreds of sites using different web technologies targeting wasm. Over time, it can consume the client storage very badly.
Web technologies like Blazer can have a wrapper to this wasm framework, that actually doesn't contain any code but the classes and method signatures, so developers can target this wrapper in manage code. This wrapper can provide the same names of .NET methods and classes can have the same names but staring with Wasm, such as WasmString, or belong to the Wasm namespace such as Wasm.String. This will make it very familiar and need zero time to learn.
If the wasm framework doesn't contain some advance or repeated functionality, we can write more classes targeting wasm framework, and download the dll to the client. this will minimal as the browser already has the common wasm framework used by all web technologies.
Is this possible and doable? Can it be better (less size and faster in development and production)?
|
Can we have a wasm framework?
|
https://api.github.com/repos/WebAssembly/wabt/issues/1394/comments
| 1 |
2020-04-23T17:16:45Z
|
2020-04-24T00:02:27Z
|
https://github.com/WebAssembly/wabt/issues/1394
| 605,707,635 | 1,394 |
[
"WebAssembly",
"wabt"
] |
The "Legacy active, funcref elemexpr" element segment (flag = 4) is not supported in wat2wasm.
It is however supported in wasm2wat.
|
The "Legacy active, funcref elemexpr" element segment not supported in wat2wasm.
|
https://api.github.com/repos/WebAssembly/wabt/issues/1391/comments
| 3 |
2020-04-15T19:12:45Z
|
2020-04-16T18:05:12Z
|
https://github.com/WebAssembly/wabt/issues/1391
| 600,526,951 | 1,391 |
[
"WebAssembly",
"wabt"
] |
The proposal document describes the opcode for v8x16.shuffle as 0xfd 0xc1,
The wabt tools however use the code 0xfd 0x03.
Which one is rightt?
|
Wrong opcode for v8x16.shuffle?
|
https://api.github.com/repos/WebAssembly/wabt/issues/1390/comments
| 2 |
2020-04-15T19:08:11Z
|
2020-04-15T20:38:35Z
|
https://github.com/WebAssembly/wabt/issues/1390
| 600,524,299 | 1,390 |
[
"WebAssembly",
"wabt"
] |
If try to compile the follow sample code with the command line: `wat2wasm.exe --enable-all sample.wat`
```
(module
(func $test(local $exn exnref)
try
i32.const 0
drop
catch
local.tee $exn
drop
end
)
)
```
then I receive the error:
```
sample.wat:2:28: error: unexpected token "exnref", expected i32, i64, f32, f64, v128 or anyref.
(func $test(local $exn exnref)
^^^^^^
```
Because try/catch from the exception proposal is supported WABT should also supports the variable type `exnref`.
I have use the master version from today on Windows.
|
locals of type exnref
|
https://api.github.com/repos/WebAssembly/wabt/issues/1388/comments
| 2 |
2020-04-13T13:41:31Z
|
2020-04-17T17:18:24Z
|
https://github.com/WebAssembly/wabt/issues/1388
| 598,896,263 | 1,388 |
[
"WebAssembly",
"wabt"
] |
Hi,
During fuzzing I found this vulnerability inside `wabt::BinaryReader`.
Based on quick analysis using GDB, valgrind and ASAN, it seems to be a uncontrolled memory allocation vulnerability ([CWE-789](https://cwe.mitre.org/data/definitions/789.html)) which generates a `std::bad_alloc` exception and finally allows an attacker to cause a denial of service.
In details, this bug is triggered using a crafted wasm module file with `br_table` size value out of bound. Asan determined that 7365283840 bytes (~58 GB) are trying to be allocated.
Bug seems to happen during resizing `line 661`:
https://github.com/WebAssembly/wabt/blob/343d24bf620594c985065d193bde2c3fc282a53e/src/binary-reader.cc#L658-L662
# Reproducer
WABT commit: 343d24bf620594c985065d193bde2c3fc282a53e
Download:
[abort_wabt_reader_bad_alloc.zip](https://github.com/WebAssembly/wabt/files/4466157/abort_wabt_reader_bad_alloc.zip)
``` sh
$ ./wasm2wat abort_wabt_reader_bad_alloc.wasm
terminate called after throwing an instance of 'std::bad_alloc'
what(): std::bad_alloc
[1] 28040 abort ./wasm2wat abort_wabt_reader_bad_alloc.wasm
```
# ASAN
``` sh
==30756==ERROR: AddressSanitizer failed to allocate 0x1b7015000 (7365283840) bytes of LargeMmapAllocator (error code: 12)
==30756==Process memory map follows:
[...]
==30756==End of process memory map.
==30756==AddressSanitizer CHECK failed: ../../../../src/libsanitizer/sanitizer_common/sanitizer_common.cc:118 "((0 && "unable to mmap")) != (0)" (0x0, 0x0)
#0 0x7f3f77112bf2 (/usr/lib/x86_64-linux-gnu/libasan.so.4+0xe9bf2)
#1 0x7f3f77131575 in __sanitizer::CheckFailed(char const*, int, char const*, unsigned long long, unsigned long long) (/usr/lib/x86_64-linux-gnu/libasan.so.4+0x108575)
#2 0x7f3f7711c482 (/usr/lib/x86_64-linux-gnu/libasan.so.4+0xf3482)
#3 0x7f3f77128895 (/usr/lib/x86_64-linux-gnu/libasan.so.4+0xff895)
#4 0x7f3f77052a51 (/usr/lib/x86_64-linux-gnu/libasan.so.4+0x29a51)
#5 0x7f3f7710940e in operator new(unsigned long) (/usr/lib/x86_64-linux-gnu/libasan.so.4+0xe040e)
#6 0x5617ed052c54 in __gnu_cxx::new_allocator<unsigned int>::allocate(unsigned long, void const*) /usr/include/c++/7/ext/new_allocator.h:111
#7 0x5617ed0528f3 in std::allocator_traits<std::allocator<unsigned int> >::allocate(std::allocator<unsigned int>&, unsigned long) /usr/include/c++/7/bits/alloc_traits.h:436
#8 0x5617ed05276b in std::_Vector_base<unsigned int, std::allocator<unsigned int> >::_M_allocate(unsigned long) /usr/include/c++/7/bits/stl_vector.h:172
#9 0x5617ed0518ad in std::vector<unsigned int, std::allocator<unsigned int> >::_M_default_append(unsigned long) /usr/include/c++/7/bits/vector.tcc:571
#10 0x5617ed0512e8 in std::vector<unsigned int, std::allocator<unsigned int> >::resize(unsigned long) (/tmp/wabt/bin/wasm2wat+0x2cf2e8)
#11 0x5617ed025da0 in ReadFunctionBody /tmp/wabt/src/binary-reader.cc:661
#12 0x5617ed04af0b in ReadCodeSection /tmp/wabt/src/binary-reader.cc:2272
#13 0x5617ed04e2be in ReadSections /tmp/wabt/src/binary-reader.cc:2412
#14 0x5617ed04f0f5 in ReadModule /tmp/wabt/src/binary-reader.cc:2474
#15 0x5617ed04f5d1 in wabt::ReadBinary(void const*, unsigned long, wabt::BinaryReaderDelegate*, wabt::ReadBinaryOptions const&) /tmp/wabt/src/binary-reader.cc:2491
#16 0x5617ecf42927 in wabt::ReadBinaryIr(char const*, void const*, unsigned long, wabt::ReadBinaryOptions const&, std::vector<wabt::Error, std::allocator<wabt::Error> >*, wabt::Module*) /tmp/wabt/src/binary-reader-ir.cc:1340
#17 0x5617ecf0fa00 in ProgramMain(int, char**) /tmp/wabt/src/tools/wasm2wat.cc:115
#18 0x5617ecf0ff58 in main /tmp/wabt/src/tools/wasm2wat.cc:147
#19 0x7f3f768d0b96 in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x21b96)
#20 0x5617ecf0e8d9 in _start (/tmp/wabt/bin/wasm2wat+0x18c8d9)
```
# GDB
``` sh
$ gdb --args ./wasm2wat abort_wabt_reader_bad_alloc.wasm
GNU gdb (Ubuntu 8.1-0ubuntu3.2) 8.1.0.20180409-git
Copyright (C) 2018 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law. Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-linux-gnu".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
<http://www.gnu.org/software/gdb/documentation/>.
For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from ./wasm2wat...done.
(gdb) r
Starting program: /tmp/wabt/build/wasm2wat abort_wabt_reader_bad_alloc.wasm
terminate called after throwing an instance of 'std::bad_alloc'
what(): std::bad_alloc
Program received signal SIGABRT, Aborted.
__GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:51
51 ../sysdeps/unix/sysv/linux/raise.c: No such file or directory.
(gdb) bt
#0 __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:51
#1 0x00007ffff769b801 in __GI_abort () at abort.c:79
#2 0x00007ffff7ad8957 in ?? () from /usr/lib/x86_64-linux-gnu/libstdc++.so.6
#3 0x00007ffff7adeae6 in ?? () from /usr/lib/x86_64-linux-gnu/libstdc++.so.6
#4 0x00007ffff7adeb21 in std::terminate() () from /usr/lib/x86_64-linux-gnu/libstdc++.so.6
#5 0x00007ffff7aded54 in __cxa_throw () from /usr/lib/x86_64-linux-gnu/libstdc++.so.6
#6 0x00007ffff7adf2dc in operator new(unsigned long) () from /usr/lib/x86_64-linux-gnu/libstdc++.so.6
#7 0x000055555572825e in __gnu_cxx::new_allocator<unsigned int>::allocate (this=0x7fffffffd6e8,
__n=1841318002) at /usr/include/c++/7/ext/new_allocator.h:111
#8 0x00005555557280a6 in std::allocator_traits<std::allocator<unsigned int> >::allocate (__a=...,
__n=1841318002) at /usr/include/c++/7/bits/alloc_traits.h:436
#9 0x0000555555727f1e in std::_Vector_base<unsigned int, std::allocator<unsigned int> >::_M_allocate (
this=0x7fffffffd6e8, __n=1841318002) at /usr/include/c++/7/bits/stl_vector.h:172
#10 0x0000555555727795 in std::vector<unsigned int, std::allocator<unsigned int> >::_M_default_append (
this=0x7fffffffd6e8, __n=1841318002) at /usr/include/c++/7/bits/vector.tcc:571
#11 0x0000555555727415 in std::vector<unsigned int, std::allocator<unsigned int> >::resize (
this=0x7fffffffd6e8, __new_size=1841318002) at /usr/include/c++/7/bits/stl_vector.h:692
#12 0x000055555571b7cc in wabt::(anonymous namespace)::BinaryReader::ReadFunctionBody (
this=0x7fffffffd650, end_offset=73) at /tmp/wabt/src/binary-reader.cc:661
#13 0x000055555572583e in wabt::(anonymous namespace)::BinaryReader::ReadCodeSection (
this=0x7fffffffd650, section_size=42) at /tmp/wabt/src/binary-reader.cc:2272
#14 0x00005555557265fc in wabt::(anonymous namespace)::BinaryReader::ReadSections (this=0x7fffffffd650)
at /tmp/wabt/src/binary-reader.cc:2412
#15 0x00005555557269e2 in wabt::(anonymous namespace)::BinaryReader::ReadModule (this=0x7fffffffd650)
at /tmp/wabt/src/binary-reader.cc:2474
#16 0x0000555555726ba7 in wabt::ReadBinary (data=0x555555a35a20, size=122, delegate=0x7fffffffd790,
options=...) at /tmp/wabt/src/binary-reader.cc:2491
#17 0x00005555556abb08 in wabt::ReadBinaryIr (
filename=0x555555a35ee0 "abort_wabt_reader_bad_alloc.wasm", data=0x555555a35a20, size=122,
options=..., errors=0x7fffffffd860, out_module=0x7fffffffd900)
at /tmp/wabt/src/binary-reader-ir.cc:1340
#18 0x0000555555699103 in ProgramMain (argc=2, argv=0x7fffffffdd98)
at /tmp/wabt/src/tools/wasm2wat.cc:115
#19 0x0000555555699364 in main (argc=2, argv=0x7fffffffdd98) at /tmp/wabt/src/tools/wasm2wat.cc:147
```
# Valgrind
``` sh
$ valgrind ./wasm2wat abort_wabt_reader_bad_alloc.wasm
==28191== Memcheck, a memory error detector
==28191== Copyright (C) 2002-2017, and GNU GPL'd, by Julian Seward et al.
==28191== Using Valgrind-3.13.0 and LibVEX; rerun with -h for copyright info
==28191== Command: ./wasm2wat abort_wabt_reader_bad_alloc.wasm
==28191==
**28191** new/new[] failed and should throw an exception, but Valgrind
**28191** cannot throw exceptions and so is aborting instead. Sorry.
==28191== at 0x4C2F81C: ??? (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==28191== by 0x4C301F5: operator new(unsigned long) (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==28191== by 0x2DC25D: __gnu_cxx::new_allocator<unsigned int>::allocate(unsigned long, void const*) (new_allocator.h:111)
==28191== by 0x2DC0A5: std::allocator_traits<std::allocator<unsigned int> >::allocate(std::allocator<unsigned int>&, unsigned long) (alloc_traits.h:436)
==28191== by 0x2DBF1D: std::_Vector_base<unsigned int, std::allocator<unsigned int> >::_M_allocate(unsigned long) (stl_vector.h:172)
==28191== by 0x2DB794: std::vector<unsigned int, std::allocator<unsigned int> >::_M_default_append(unsigned long) (vector.tcc:571)
==28191== by 0x2DB414: std::vector<unsigned int, std::allocator<unsigned int> >::resize(unsigned long) (stl_vector.h:692)
==28191== by 0x2CF7CB: wabt::(anonymous namespace)::BinaryReader::ReadFunctionBody(unsigned long) (binary-reader.cc:661)
==28191== by 0x2D983D: wabt::(anonymous namespace)::BinaryReader::ReadCodeSection(unsigned long) (binary-reader.cc:2272)
==28191== by 0x2DA5FB: wabt::(anonymous namespace)::BinaryReader::ReadSections() (binary-reader.cc:2412)
==28191== by 0x2DA9E1: wabt::(anonymous namespace)::BinaryReader::ReadModule() (binary-reader.cc:2474)
==28191== by 0x2DABA6: wabt::ReadBinary(void const*, unsigned long, wabt::BinaryReaderDelegate*, wabt::ReadBinaryOptions const&) (binary-reader.cc:2491)
==28191==
==28191== HEAP SUMMARY:
==28191== in use at exit: 2,863 bytes in 34 blocks
==28191== total heap usage: 218 allocs, 184 frees, 94,966 bytes allocated
==28191==
==28191== LEAK SUMMARY:
==28191== definitely lost: 0 bytes in 0 blocks
==28191== indirectly lost: 0 bytes in 0 blocks
==28191== possibly lost: 0 bytes in 0 blocks
==28191== still reachable: 2,863 bytes in 34 blocks
==28191== suppressed: 0 bytes in 0 blocks
==28191== Rerun with --leak-check=full to see details of leaked memory
==28191==
==28191== For counts of detected and suppressed errors, rerun with: -v
==28191== ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 0 from 0)
```
|
[crash] SIGABRT due to std::bad_alloc exception (resizing wasm br_table)
|
https://api.github.com/repos/WebAssembly/wabt/issues/1386/comments
| 0 |
2020-04-12T10:42:13Z
|
2020-05-13T22:27:33Z
|
https://github.com/WebAssembly/wabt/issues/1386
| 598,457,049 | 1,386 |
[
"WebAssembly",
"wabt"
] |
The current build requires python 3.5, which is commonly found on modern *nixes, but may not be installed on Windows, Mac, etc. It's only used for running tests, so it would be nice to fail gracefully if python isn't available instead of preventing the build to proceed.
|
Don't require Python in build (if not found, skip those targets)
|
https://api.github.com/repos/WebAssembly/wabt/issues/1385/comments
| 12 |
2020-04-09T19:43:22Z
|
2022-08-26T02:15:19Z
|
https://github.com/WebAssembly/wabt/issues/1385
| 597,510,787 | 1,385 |
[
"WebAssembly",
"wabt"
] |
I would be nice to get https://github.com/WebAssembly/simd/pull/197 into wabt. Though this seems to require the proposals test suite to be updated upstream first. @sbc100 ?
|
Update to more recent test suite
|
https://api.github.com/repos/WebAssembly/wabt/issues/1379/comments
| 3 |
2020-03-26T14:21:36Z
|
2020-03-27T21:50:56Z
|
https://github.com/WebAssembly/wabt/issues/1379
| 588,458,660 | 1,379 |
[
"WebAssembly",
"wabt"
] |
The exception proposal is currently supported for binary/text reading/writing and validation, but has no support in the interpreter.
Now that the interpreter has a garbage collector, it should be possible to implement this.
|
Implement exception proposal support in interpreter
|
https://api.github.com/repos/WebAssembly/wabt/issues/1378/comments
| 1 |
2020-03-25T23:11:41Z
|
2022-04-27T17:58:27Z
|
https://github.com/WebAssembly/wabt/issues/1378
| 588,046,295 | 1,378 |
[
"WebAssembly",
"wabt"
] |
See https://github.com/webassembly/function-references and https://github.com/WebAssembly/function-references/blob/master/proposals/function-references/Overview.md.
|
Implement function-references proposal
|
https://api.github.com/repos/WebAssembly/wabt/issues/1377/comments
| 1 |
2020-03-25T23:09:12Z
|
2021-07-08T11:16:47Z
|
https://github.com/WebAssembly/wabt/issues/1377
| 588,045,424 | 1,377 |
[
"WebAssembly",
"wabt"
] |
We are researching ways to support custom sections in the text file format (wat) so we can transform it easily to wasm and viceversa.
One of the ideas we came up with is to automatically base64 encode the custom section when decoding from a wasm file, and automatically base64 decode when passing from wat to wasm.
Here's the proposal:
### wasm2wat
When doing wasm2wat, we can base64 encode the contents of each of the binary sections.
Proposal for wat:
```wasm
(module
(section sectionName "base64:aGVsbG8=") ;; this is the base64 encoding of "hello"
(func (export "addTwo") (param i32 i32) (result i32)
local.get 0
local.get 1
i32.add))
```
### wat2wasm
When encoding the text format to wasm, we could just read the section value, see if it's using an encoding we support, and if that's the case we can just transform it into its binary format and append the section binary content to the wasm.
Are there other ways we could accomplish it?
Thoughts on this proposal?
|
Custom sections wasm2wat / wat2wasm
|
https://api.github.com/repos/WebAssembly/wabt/issues/1376/comments
| 14 |
2020-03-25T21:44:38Z
|
2023-10-03T13:44:31Z
|
https://github.com/WebAssembly/wabt/issues/1376
| 588,009,887 | 1,376 |
[
"WebAssembly",
"wabt"
] |
There are other TODOs in the source, but most of these should be small.
- [x] Update output from "type" to "func_type" [TODO](https://github.com/WebAssembly/wabt/blob/master/src/binary-reader-logging.cc#L146) [TODO](https://github.com/WebAssembly/wabt/blob/master/src/binary-writer.cc#L888)
- [ ] Rename LoadStoreExpr (maybe MemoryAccessExpr?) [TODO](https://github.com/WebAssembly/wabt/blob/master/src/ir.h#L528) [TODO](https://github.com/WebAssembly/wabt/blob/master/src/binary-writer.cc#L380)
- [ ] Use proper location in binary-reader-interp.cc [TODO](https://github.com/WebAssembly/wabt/blob/master/src/interp/binary-reader-interp.cc#L299)
- [ ] Implement event matching in interpreter [TODO](https://github.com/WebAssembly/wabt/blob/master/src/interp/interp.h#L167)
- [ ] Clean up "out of bounds" memory/table access messages [TODO](https://github.com/WebAssembly/wabt/blob/master/src/interp/interp.h#L1835)
- [ ] Use `u16` for SerializedOpcode in interpreter [TODO](https://github.com/WebAssembly/wabt/blob/master/src/interp/istream.h#L89)
- [ ] Move TypeChecker into SharedValidator [TODO](https://github.com/WebAssembly/wabt/blob/master/src/shared-validator.h#L48) [TODO](https://github.com/WebAssembly/wabt/blob/master/src/shared-validator.h#L279)
- [ ] Change `assert_unlinkable` to a single-line error [TODO](https://github.com/WebAssembly/wabt/blob/master/src/tools/spectest-interp.cc#L1277)
- [ ] Print `assert_uninstantiable` and `assert_exhaustion` errors when assertion passes [TODO](https://github.com/WebAssembly/wabt/blob/master/src/tools/spectest-interp.cc#L1318) [TODO](https://github.com/WebAssembly/wabt/blob/master/src/tools/spectest-interp.cc#L1474)
- [ ] Validate command-line arguments for value-stack-size and call-stack-size [TODO](https://github.com/WebAssembly/wabt/blob/master/src/tools/spectest-interp.cc#L78) [TODO](https://github.com/WebAssembly/wabt/blob/master/src/tools/spectest-interp.cc#L84) [TODO](https://github.com/WebAssembly/wabt/blob/master/src/tools/wasm-interp.cc#L81) [TODO](https://github.com/WebAssembly/wabt/blob/master/src/tools/wasm-interp.cc#L87)
- [x] Fix typo "initializing" [TODO](https://github.com/WebAssembly/wabt/blob/master/src/tools/wasm-interp.cc#L193)
- [ ] Remove ParseTextList, switch usage to ParseTextListOpt [TODO](https://github.com/WebAssembly/wabt/blob/master/src/wast-parser.cc#L2856) [TODO](https://github.com/WebAssembly/wabt/blob/master/src/wast-parser.cc#L2871)
|
Fix Various TODOs
|
https://api.github.com/repos/WebAssembly/wabt/issues/1375/comments
| 6 |
2020-03-25T19:15:25Z
|
2023-05-02T09:39:54Z
|
https://github.com/WebAssembly/wabt/issues/1375
| 587,930,331 | 1,375 |
[
"WebAssembly",
"wabt"
] |
See #1275 where these were removed. The upstream spec was changed to use a more generic syntax:
```
(assert_return_canonical_nan (invoke "..."))
```
becomes
```
(assert_return (invoke "...") (nan:canonical))
```
(And similarly for `assert_return_arithmetic_nan` and `nan:arithmetic`).
But in general, wabt tries to be backward compatible, so it could continue to support this old syntax too.
See https://github.com/WebAssembly/bulk-memory-operations/issues/144.
|
Provide backward compatible support for assert_return_arithmetic_nan
|
https://api.github.com/repos/WebAssembly/wabt/issues/1371/comments
| 6 |
2020-03-23T19:16:25Z
|
2023-03-15T08:12:25Z
|
https://github.com/WebAssembly/wabt/issues/1371
| 586,453,036 | 1,371 |
[
"WebAssembly",
"wabt"
] |
In https://github.com/WebAssembly/bulk-memory-operations there is a test that checks for a validation error against `data.drop 0`.
https://github.com/WebAssembly/bulk-memory-operations/blob/ffdbb6e357d79818c88c3557cd3325346a057d27/test/core/memory_init.wast#L188
This test fails with a malformed error instead because no `DataCount` section is generated from `wast2json` from the latest revision of wabt https://github.com/WebAssembly/wabt/commit/5ba0296190a077acfdc6c1de19510143b4dcc7c4, presumably because no `Data` section is present.
This violates the current version of the bulk memory spec, that a wasm binary without a `DataCount` section is malformed if `data.drop` or `memory.init` is used anywhere in the `Code` section. This is currently in review here https://github.com/WebAssembly/bulk-memory-operations/pull/143
The fix as I see it is that `wast2json` should always generate a `DataCount` section if `memory.init` or `data.drop` is used.
To save @binji some cycles, I'll provide a PR for this issue shortly.
|
wast2json not generating wasm with DataCount section when data.drop is used in code
|
https://api.github.com/repos/WebAssembly/wabt/issues/1368/comments
| 0 |
2020-03-22T21:29:31Z
|
2020-03-23T18:34:44Z
|
https://github.com/WebAssembly/wabt/issues/1368
| 585,816,825 | 1,368 |
[
"WebAssembly",
"wabt"
] |
## OS Info
```bash
➜ wabt git:(master) cat /etc/os-release
NAME="Ubuntu"
VERSION="18.04.1 LTS (Bionic Beaver)"
ID=ubuntu
ID_LIKE=debian
PRETTY_NAME="Ubuntu 18.04.1 LTS"
VERSION_ID="18.04"
HOME_URL="https://www.ubuntu.com/"
SUPPORT_URL="https://help.ubuntu.com/"
BUG_REPORT_URL="https://bugs.launchpad.net/ubuntu/"
PRIVACY_POLICY_URL="https://www.ubuntu.com/legal/terms-and-policies/privacy-policy"
VERSION_CODENAME=bionic
UBUNTU_CODENAME=bionic
➜ wabt git:(master) gcc --version
gcc (Ubuntu 7.5.0-3ubuntu1~18.04) 7.5.0
Copyright (C) 2017 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
➜ wabt git:(master) clang --version
clang version 6.0.0-1ubuntu2 (tags/RELEASE_600/final)
Target: x86_64-pc-linux-gnu
Thread model: posix
InstalledDir: /usr/bin
```
## build steps
follow the build steps in the [Building using the top-level Makefile (Linux and macOS)](https://github.com/webassembly/wabt#building-using-the-top-level-makefile-linux-and-macos)
make command output:
```bash
➜ wabt git:(master) make gcc-release-no-tests
mkdir -p out/gcc/Release/no-tests/
cd out/gcc/Release/no-tests/ && cmake -G "Unix Makefiles" /home/flyflypeng/Code/Github/wabt/ -DCMAKE_C_COMPILER=gcc -DCMAKE_CXX_COMPILER=g++ -DCMAKE_BUILD_TYPE=Release -DBUILD_TESTS=OFF
-- The C compiler identification is GNU 7.5.0
-- The CXX compiler identification is GNU 7.5.0
-- Check for working C compiler: /usr/bin/gcc
-- Check for working C compiler: /usr/bin/gcc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: /usr/bin/g++
-- Check for working CXX compiler: /usr/bin/g++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Looking for alloca.h
-- Looking for alloca.h - found
-- Looking for unistd.h
-- Looking for unistd.h - found
-- Looking for snprintf
-- Looking for snprintf - found
-- Looking for strcasecmp
-- Looking for strcasecmp - found
-- Looking for sys/types.h
-- Looking for sys/types.h - found
-- Looking for stdint.h
-- Looking for stdint.h - found
-- Looking for stddef.h
-- Looking for stddef.h - found
-- Check size of ssize_t
-- Check size of ssize_t - done
-- Check size of size_t
-- Check size of size_t - done
-- Looking for pthread.h
-- Looking for pthread.h - found
-- Looking for pthread_create
-- Looking for pthread_create - not found
-- Looking for pthread_create in pthreads
-- Looking for pthread_create in pthreads - not found
-- Looking for pthread_create in pthread
-- Looking for pthread_create in pthread - found
-- Found Threads: TRUE
-- Configuring done
-- Generating done
-- Build files have been written to: /home/flyflypeng/Code/Github/wabt/out/gcc/Release/no-tests
make --no-print-directory -C out/gcc/Release/no-tests/ all
...... // above everything is ok
[ 84%] Building CXX object CMakeFiles/wasm.dir/src/wast-parser.cc.o
/home/flyflypeng/Code/Github/wabt/src/wast-parser.cc: In member function ‘wabt::Result wabt::WastParser::ParseConst(wabt::Const*, wabt::WastParser::ConstType)’:
/home/flyflypeng/Code/Github/wabt/src/wast-parser.cc:2262:14: warning: ‘literal’ may be used uninitialized in this function [-Wmaybe-uninitialized]
result = ParseDouble(literal.type, s, end, &f64_bits);
~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/flyflypeng/Code/Github/wabt/src/wast-parser.cc:2262:14: warning: ‘end’ may be used uninitialized in this function [-Wmaybe-uninitialized]
/home/flyflypeng/Code/Github/wabt/src/wast-parser.cc:2262:14: warning: ‘s’ may be used uninitialized in this function [-Wmaybe-uninitialized]
[ 85%] Building CXX object CMakeFiles/wasm.dir/src/wat-writer.cc.o
[ 86%] Building CXX object CMakeFiles/wasm.dir/src/interp/binary-reader-interp.cc.o
[ 87%] Building CXX object CMakeFiles/wasm.dir/src/interp/interp.cc.o
[ 87%] Building CXX object CMakeFiles/wasm.dir/src/interp/interp-util.cc.o
[ 88%] Building CXX object CMakeFiles/wasm.dir/src/interp/istream.cc.o
[ 89%] Building CXX object CMakeFiles/wasm.dir/src/interp/interp-wasm-c-api.cc.o
/home/flyflypeng/Code/Github/wabt/src/interp/interp-wasm-c-api.cc:17:10: fatal error: wasm.h: No such file or directory
#include <wasm.h>
^~~~~~~~
compilation terminated.
CMakeFiles/wasm.dir/build.make:1094: recipe for target 'CMakeFiles/wasm.dir/src/interp/interp-wasm-c-api.cc.o' failed
make[3]: *** [CMakeFiles/wasm.dir/src/interp/interp-wasm-c-api.cc.o] Error 1
CMakeFiles/Makefile2:591: recipe for target 'CMakeFiles/wasm.dir/all' failed
make[2]: *** [CMakeFiles/wasm.dir/all] Error 2
Makefile:129: recipe for target 'all' failed
make[1]: *** [all] Error 2
Makefile:170: recipe for target 'gcc-release-no-tests' failed
make: *** [gcc-release-no-tests] Error 2
```
So I think should add wasm.h header file in the CMakeList.txt file.
|
build failed: fatal error: wasm.h : No such file or directory
|
https://api.github.com/repos/WebAssembly/wabt/issues/1367/comments
| 2 |
2020-03-22T15:10:12Z
|
2020-03-22T15:59:40Z
|
https://github.com/WebAssembly/wabt/issues/1367
| 585,740,267 | 1,367 |
[
"WebAssembly",
"wabt"
] |
See in-progress PR here: https://github.com/WebAssembly/wabt/pull/909.
I was making pretty good progress, but then I stalled out. It would be great if someone else could pick it up, since it's not super easy for me to test on Windows!
|
Get wasm2c tests running on MSVC/windows
|
https://api.github.com/repos/WebAssembly/wabt/issues/1366/comments
| 1 |
2020-03-20T23:44:42Z
|
2022-04-01T06:52:49Z
|
https://github.com/WebAssembly/wabt/issues/1366
| 585,381,729 | 1,366 |
[
"WebAssembly",
"wabt"
] |
I'm getting this test failure when running 1.0.13 test suite on ARM:
```
- test/wasm2c/spec/skip-stack-guard-page.txt
expected error code 0, got 1.
STDERR MISMATCH:
--- expected
+++ actual
@@ -0,0 +1,14 @@
+Traceback (most recent call last):
+ File "/builddir/build/BUILD/wabt-1.0.13/test/run-spec-wasm2c.py", line 421, in <module>
+ sys.exit(main(sys.argv[1:]))
+ File "/builddir/build/BUILD/wabt-1.0.13/test/run-spec-wasm2c.py", line 413, in main
+ utils.Executable(os.path.join(out_dir, main_exe),
+ File "/builddir/build/BUILD/wabt-1.0.13/test/utils.py", line 104, in RunWithArgs
+ raise error
+utils.Error: Signal raised running "out/test/wasm2c/spec/skip-stack-guard-page/skip-stack-guard-page": SIGSEGV
+b''
+During handling of the above exception, another exception occurred:
+Traceback (most recent call last):
+ File "/builddir/build/BUILD/wabt-1.0.13/test/run-spec-wasm2c.py", line 427, in <module>
+ sys.stderr.write(u'{0}\n'.format(e).encode('ascii', 'replace'))
+TypeError: write() argument must be str, not bytes
STDOUT MISMATCH:
--- expected
+++ actual
@@ -1 +0,0 @@
-10/10 tests passed.
```
Any idea what's going on here?
|
test/wasm2c/spec/skip-stack-guard-page.txt fails on 32-bit ARM
|
https://api.github.com/repos/WebAssembly/wabt/issues/1365/comments
| 8 |
2020-03-20T22:34:25Z
|
2023-01-03T18:36:04Z
|
https://github.com/WebAssembly/wabt/issues/1365
| 585,360,701 | 1,365 |
[
"WebAssembly",
"wabt"
] |
### Versions
- wabt: 1.0.13 (installed via `brew install wabt`)
- OS: macOS 10.14
### Repro
[foo.wasm.zip](https://github.com/WebAssembly/wabt/files/4357744/foo.wasm.zip)
Unzip above wasm binary and run `wasm-dis foo.wasm -o foo.wat`.
It emits wat file as follows:
```wat
(module
(type $i32_=>_none (func (param i32)))
(type $none_=>_i32 (func (result i32)))
(import "env" "print" (func $fimport$0 (param i32)))
(memory $0 2)
(data (i32.const 1028) "hi\00bye")
(export "memory" (memory $0))
(export "_start" (func $0))
(func $0 (; 1 ;) (result i32)
(block $label$1
(if
(i32.load
(i32.const 1024)
)
(block
(call $fimport$0
(i32.const 1028)
)
(br $label$1)
)
)
(call $fimport$0
(i32.const 1031)
)
)
(i32.const 0)
)
;; custom section "producers", size 27
)
```
This `if` instruction seems not correct.
```wat
(if
(i32.load
...
)
(block
...
)
)
```
From ['Folded Instruction' section of WebAssembly spec](https://webassembly.github.io/spec/core/text/instructions.html#folded-instructions),
> For 𝗂𝖿 instructions, both branches have to be wrapped into nested S-expressions, headed by the keywords ‘𝚝𝚑𝚎𝚗’ and ‘𝚎𝚕𝚜𝚎’.
<img width="718" alt="スクリーンショット 2020-03-20 11 35 55" src="https://user-images.githubusercontent.com/823277/77131435-fbcb4080-6a9e-11ea-9895-740ae493ef97.png">
With this spec, both `i32` and `block` instructions are parsed as condition part in above `if` instruction. For folded `if` instruction, at least `then` clause seems necessary (note that `else` clause is optional). If my understanding is correct, following is correct:
```wat
(if
(i32.load
...
)
(then
(block
...
)
)
)
```
|
wasm-dis emits invalid 'if' instruction in folded form
|
https://api.github.com/repos/WebAssembly/wabt/issues/1362/comments
| 1 |
2020-03-20T02:40:10Z
|
2020-03-20T02:50:05Z
|
https://github.com/WebAssembly/wabt/issues/1362
| 584,808,015 | 1,362 |
[
"WebAssembly",
"wabt"
] |
Since https://github.com/WebAssembly/wabt/commit/4c3189d1df4a4062fb2705182a525fd8c23d6af2, I get the following error:
```
[ 1%] Building CXX object CMakeFiles/wabt.dir/src/apply-names.cc.o
In file included from /tmp/wabt/src/apply-names.cc:17:
In file included from /tmp/wabt/src/apply-names.h:20:
In file included from /tmp/wabt/src/common.h:37:
In file included from /tmp/wabt/src/string-view.h:23:
In file included from /usr/include/c++/v1/ostream:140:
In file included from /usr/include/c++/v1/locale:208:
/usr/include/c++/v1/__bsd_locale_fallbacks.h:123:17: error: use of undeclared identifier 'vasprintf'; did you mean 'vsprintf'?
int __res = vasprintf(__s, __format, __va);
```
It seems like the problem is cause by `-D_POSIX_C_SOURCE=200809L`.
|
Compilation error on OpenBSD/clang
|
https://api.github.com/repos/WebAssembly/wabt/issues/1359/comments
| 0 |
2020-03-14T17:16:45Z
|
2020-03-15T17:12:05Z
|
https://github.com/WebAssembly/wabt/issues/1359
| 581,292,338 | 1,359 |
[
"WebAssembly",
"wabt"
] |
Attaching example that fails to disassemble with
> 000023c: error: unexpected opcode: 0xfd 0x82 0x1
[decoder_simd.wasm.zip](https://github.com/WebAssembly/wabt/files/4238833/decoder_simd.wasm.zip)
|
wasm-objdump: i32x4.max_s et al are not supported
|
https://api.github.com/repos/WebAssembly/wabt/issues/1343/comments
| 2 |
2020-02-22T05:00:19Z
|
2020-02-25T06:58:31Z
|
https://github.com/WebAssembly/wabt/issues/1343
| 569,282,291 | 1,343 |
[
"WebAssembly",
"wabt"
] |
LLVM still builds code using the old encoding for `i8x16.shuffle`--`0xfd03`. WABT expects code to have the [new encoding](https://github.com/WebAssembly/simd/blob/master/proposals/simd/BinarySIMD.md)--`0xfdc1`. Over in an [emscripten issue](https://github.com/emscripten-core/emscripten/issues/9281#issuecomment-589339146), @tlively mentioned that he would prefer to wait to modify all of the LLVM-emitted encodings until after all the encodings are renumbered. In the meantime, could we modify WABT to allow both `0xfd03` and `0xfdc1` to parse as `i8x16.shuffle`? Otherwise the WABT tools can't really be used to look at LLVM Wasm SIMD code (and I like WABT!).
I took a stab at this but quickly ran into things I don't yet understand about WABT. I wouldn't mind doing the work to get this working if 1) you all agree this type of temporary hack can be allowed (similar code exists in [wasmparser.rs](https://github.com/bytecodealliance/wasmparser/blob/4789a9cadd6390579df8574b4e2bba810d428fe9/src/binary_reader.rs#L1562-L1568)), and 2) someone can help me understand what I don't understand about `infos_` (and probably other locations that need changing):
```diff
diff --git a/src/opcode-code-table.c b/src/opcode-code-table.c
index c3e06d03..dcdbc060 100644
--- a/src/opcode-code-table.c
+++ b/src/opcode-code-table.c
@@ -38,4 +38,6 @@ uint32_t WabtOpcodeCodeTable[WABT_OPCODE_CODE_TABLE_SIZE] = {
[(prefix << 8) + code] = Name,
#include "opcode.def"
#undef WABT_OPCODE
+ // FIXME: alias V8X16Shuffle (currently numbered as 0xfdc1) to its previous opcode (0xfd03); remove when SIMD instructions are renumbered
+ [(0xfd << 8) + 0x03] = V8X16Shuffle,
};
diff --git a/src/opcode.cc b/src/opcode.cc
index 5327f4b4..46d91e0b 100644
--- a/src/opcode.cc
+++ b/src/opcode.cc
@@ -30,6 +30,8 @@ Opcode::Info Opcode::infos_[] = {
#include "src/opcode.def"
#undef WABT_OPCODE
+ // FIXME: alias V8X16Shuffle (currently numbered as 0xfdc1) to its previous opcode (0xfd03); remove when SIMD instructions are renumbered
+ {"v8x16.shuffle", "", Type::V128, Type::V128, Type::V128, Type::___, 0, 0xfd, 0x03, PrefixCode(0xfd, 0x03)},
{"<invalid>", "", Type::Void, Type::Void, Type::Void, Type::Void, 0, 0, 0, 0},
};
```
|
Can't decode LLVM-built i8x16.shuffle
|
https://api.github.com/repos/WebAssembly/wabt/issues/1339/comments
| 3 |
2020-02-21T00:08:51Z
|
2020-02-24T20:20:11Z
|
https://github.com/WebAssembly/wabt/issues/1339
| 568,657,185 | 1,339 |
[
"WebAssembly",
"wabt"
] |
### Steps to Reproduce
```
$ wasm2wat --enable-multi-value --no-check foo.wasm
```
### Test Case
https://github.com/bytecodealliance/wasmparser/files/4171056/foo.wasm.2.gz
### Actual Results
```
0000081: error: invalid call function index: 2097156
```
### Expected Results
(Produced by https://github.com/bytecodealliance/wasmprinter)
```wat
(module
(type (;0;) (func (param i32)))
(type (;1;) (func (param i32) (result i32)))
(type (;2;) (func (param i32 i32)))
(type (;3;) (func))
(func (;0;) (type 3))
(func (;1;) (type 0) (param i32))
(func (;2;) (type 1) (param i32) (result i32)
i32.const 1)
(func (;3;) (type 1) (param i32) (result i32)
i32.const 2)
(func (;4;) (type 2) (param i32 i32)
local.get 0
unreachable
unreachable
unreachable
unreachable
unreachable
unreachable
unreachable
block (param i32) ;; label = @1
unreachable
drop
end)
(func (;5;) (type 3)
(local i32)
unreachable
unreachable
i32.mul
i32.popcnt
i32.div_u
i32.sub
i32.popcnt
i32.div_u
i32.sub
local.tee 0
global.set 0
local.get 0
i32.const 8
i32.add
i32.const 1024
call 4
local.get 0
i32.const 8
i32.add
i32.const 25166864
unreachable
call 2097156
call_indirect (type 0)
i32.const 16
i32.add
global.set 0)
(func (;6;) (type 3)
i64.clz))
```
|
wasm2wat fails to disassemble invalid wasm file, even with --no-check
|
https://api.github.com/repos/WebAssembly/wabt/issues/1331/comments
| 2 |
2020-02-07T20:02:17Z
|
2020-03-11T17:24:03Z
|
https://github.com/WebAssembly/wabt/issues/1331
| 561,843,604 | 1,331 |
[
"WebAssembly",
"wabt"
] |
When I try to build wabt 1.0.13 from source, the build fails because wasm.h is not present in the source package.
I know that wasm.h is present in binaryen, but I don't understand how
src/interp/interp-wasm-c-api.cc
can be built from source in wabt without wasm.h.
In version 1.0.12 wasm.h was not required to compile interp-wasm-c-api.cc.
Please clarify how to build wabt from source in version 1.0.13
|
wabt fails to build from source because of missing wasm.h
|
https://api.github.com/repos/WebAssembly/wabt/issues/1315/comments
| 17 |
2020-01-23T01:13:45Z
|
2021-03-14T17:07:57Z
|
https://github.com/WebAssembly/wabt/issues/1315
| 553,885,312 | 1,315 |
[
"WebAssembly",
"wabt"
] |
Please don't require Git to build wabt. Similar to binaryen
https://github.com/WebAssembly/binaryen/issues/2563
Git is currently required to determine the version string. It would be great if wabt used the same method as binaryen to determine the version string.
|
Please don't require Git to build wabt
|
https://api.github.com/repos/WebAssembly/wabt/issues/1314/comments
| 0 |
2020-01-23T01:05:14Z
|
2020-01-24T01:50:05Z
|
https://github.com/WebAssembly/wabt/issues/1314
| 553,883,107 | 1,314 |
[
"WebAssembly",
"wabt"
] |
With release 1.0.13 the tool wat2wasm.exe with the command line parameter "--enable-reference-types" produce ever a DataCount section with zero entries.
Is this expected? I would expected that an empty section is not written never to reduce size and prevent such problems.
Are there any workarounds with wat2wasm to prevent this? I know I can switch back to version 1.0.12.
|
WebAssembly.compile(): unexpected section <DataCount>
|
https://api.github.com/repos/WebAssembly/wabt/issues/1311/comments
| 3 |
2020-01-18T12:12:10Z
|
2020-01-21T19:30:14Z
|
https://github.com/WebAssembly/wabt/issues/1311
| 551,761,325 | 1,311 |
[
"WebAssembly",
"wabt"
] |
If i use wasm-decompile the source / math is completely different to wasm2c
and using the math from either does not yeild the correct result compared to the original...
ie from nodejs...
```javascript
var t = [98, 111, 101, 110, 49, 110, 101, 57, 56, 99, 48, 104, 53, 49, 113, 53, 114, 51, 107, 48];
var fs = require('fs');
const sleep = (waitTimeInMs) => new Promise(resolve => setTimeout(resolve, waitTimeInMs));
const buf = fs.readFileSync('./output.wasm');
let res;
(async () => { res = await WebAssembly.instantiate(buf); })();
sleep(1000).then(() => {
console.log(res.instance.exports._advanced_test.apply(null, t))
});
```
Produces `14431`
I attempted to port the wasm2c output to python...
```python
p = [98, 111, 101, 110, 49, 110, 101, 57, 56, 99, 48, 104, 53, 49, 113, 53, 114, 51, 107, 48]
i0 = 0
i1 = (bool(p[3]) + p[3]) * (bool(p[0]) + p[0])
i1 += 1994
i1 += (bool(p[8]) + p[8]) * (bool(p[7]) + p[7])
i1 += (bool(p[10]) + p[10]) * (bool(p[4]) + p[4])
i1 += (bool(p[17]) + p[17]) * (bool(p[2]) + p[2])
i1 += (bool(p[19]) + p[19]) * (bool(p[18]) + p[18])
i2 = (bool(p[13]) + p[13]) * (bool(p[12]) + p[12])
i2 += (bool(p[6]) + p[6]) * (bool(p[1]) + p[1])
i2 += (bool(p[14]) + p[14]) * (bool(p[5]) + p[5])
i2 += (bool(p[15]) + p[15]) * (bool(p[11]) + p[11])
i2 += (bool(p[16]) + p[16]) * (bool(p[9]) + p[9])
i1 -= i2
p[1] = i1
i0 -= i1
p[0] = i0
if i0 > i1:
i0 = p[0]
else:
i0 = p[1]
p[0] = i0
i0 += bool(p[0])
```
However that produces `14614`
wasm-decompile vs was2c gives very conflicting math...
Here's the wasm file attached .
[output.wasm.zip](https://github.com/WebAssembly/wabt/files/4062825/output.wasm.zip)
|
Decompiler doesn't yeild same result
|
https://api.github.com/repos/WebAssembly/wabt/issues/1307/comments
| 1 |
2020-01-15T02:59:49Z
|
2020-01-15T04:27:32Z
|
https://github.com/WebAssembly/wabt/issues/1307
| 549,935,820 | 1,307 |
[
"WebAssembly",
"wabt"
] |
We currently have it as the `gh-pages` branch, but it will be easier to update if it was on `master`. See https://github.com/WebAssembly/wabt/pull/1295#discussion_r366575581
|
Move documentation to subdirectory of main branch
|
https://api.github.com/repos/WebAssembly/wabt/issues/1306/comments
| 0 |
2020-01-14T22:42:59Z
|
2020-03-11T17:27:12Z
|
https://github.com/WebAssembly/wabt/issues/1306
| 549,861,338 | 1,306 |
[
"WebAssembly",
"wabt"
] |
It looks like narrow and widen instructions aren't supported by the disassembler, so getting errors like this:
> 00009c3: error: unexpected opcode: 0xfd 0xca 0x1
[decoder_simd.zip](https://github.com/WebAssembly/wabt/files/4051426/decoder_simd.zip)
|
wasm-objdump: Missing support for i16x8.widen_low_i8x16_s et al
|
https://api.github.com/repos/WebAssembly/wabt/issues/1300/comments
| 1 |
2020-01-12T21:06:05Z
|
2020-01-14T17:24:33Z
|
https://github.com/WebAssembly/wabt/issues/1300
| 548,626,995 | 1,300 |
[
"WebAssembly",
"wabt"
] |
I'm attempting to perform analysis on this file - http://www.filedropper.com/buildexewasmcode
This file originates from a Unity WebGL Project, this is how they describe this file "build.wasm.code.unityweb file containing the WebAssembly binary."
- more about unity WebGl here https://docs.unity3d.com/Manual/webgl-building.html
Everything is out of position it seems including the magic number and version number.
It seems like some characters are escaped to \xXX?
I'm looking for any way I can go about fixing this binary.
SideNote: This file was retrieved with python requests then decompressed with Brotli
|
Problems with wasm binary created with UnityWebGL
|
https://api.github.com/repos/WebAssembly/wabt/issues/1299/comments
| 1 |
2020-01-11T20:44:48Z
|
2020-01-11T22:11:30Z
|
https://github.com/WebAssembly/wabt/issues/1299
| 548,478,157 | 1,299 |
[
"WebAssembly",
"wabt"
] |
I am converting some c++ code to wasm with em++ as follows
em++ -o enums.wasm -c -s WASM -s STANDALONE_WASM=1 -std=c++17 -g -O2 enums.cpp
Then I want to produce readable text as follows:
wasm2wat enums.wasm -o enums.wat
Which results in an error:
0000270: error: invalid section code: 12
In the doc the highest section number is 11.
How can I further investigate this?
Or is this a known problem?
|
wasm2wat produces 'error: invalid section code: 12'
|
https://api.github.com/repos/WebAssembly/wabt/issues/1292/comments
| 4 |
2020-01-09T15:42:07Z
|
2020-01-09T18:11:24Z
|
https://github.com/WebAssembly/wabt/issues/1292
| 547,557,344 | 1,292 |
[
"WebAssembly",
"wabt"
] |
Given an input `*.wast` file:
```wat
(module)
(module
(func $f)
(func $g)
(table $t funcref (elem (ref.func $f) (ref.null) (ref.func $g)))
)
(module)
```
Executing:
```sh
$ mkdir tmp
$ wast2json foo.wast -o tmp/foo.json --enable-all
$ ls tmp
foo.0.wasm foo.1.wasm foo.json
```
that lists only 2 modules but there should be 3, and looking at `foo.json` we see:
```json
{"source_filename": "foo.wast",
"commands": [
{"type": "module", "line": 1, "filename": "foo.0.wasm"},
{"type": "module", "line": 9, "filename": "foo.1.wasm"}]}
```
which appears to drop the module in the middle?
This was discovered running https://github.com/WebAssembly/testsuite/blob/4e4ceb6ccbcd9ef39d464a9a6a61d94a7d57e7ba/proposals/bulk-memory-operations/elem.wast through `wast2json` and it seemed to silently drop [this module](https://github.com/WebAssembly/testsuite/blob/4e4ceb6ccbcd9ef39d464a9a6a61d94a7d57e7ba/proposals/bulk-memory-operations/elem.wast#L68-L73)
|
wast2json drops module with funcref table
|
https://api.github.com/repos/WebAssembly/wabt/issues/1291/comments
| 2 |
2020-01-09T15:13:09Z
|
2020-01-10T19:18:21Z
|
https://github.com/WebAssembly/wabt/issues/1291
| 547,539,112 | 1,291 |
[
"WebAssembly",
"wabt"
] |
i'm compiling rust project to wasm with `wasm-pack`, then converting resulting wasm to wat and trying to read it.
currently I can find functions by their original names, but function params and variables lack original names.
so for this rust function
```rust
pub fn add_two(my_param: i32) -> i32 {
let my_arg = 2;
my_param + my_arg
}
```
i have this wat
```wat
...
(func $wasm_debug_symbols::add_two::h8849f07edd700d60 (type $t3) (param $p0 i32) (result i32)
...
```
there's only auto generated names for params/vars like `$p0`, `$p1`, `$l1`, `$l2`, etc.
but this is strange because I've configured rust project to include DWARF debug symbols to wasm
```toml
[package.metadata.wasm-pack.profile.dev.wasm-bindgen]
dwarf-debug-info = true
```
i can even see those `my_param` and `my_arg` strings in target wasm file
```bash
$ hexdump -C wasm_debug_symbols_bg.wasm | grep -A 1 -B 1 my
001174a0 73 63 72 69 62 65 5f 61 64 64 5f 74 77 6f 00 6d |scribe_add_two.m|
001174b0 79 5f 70 61 72 61 6d 00 6d 79 5f 61 72 67 00 61 |y_param.my_arg.a|
001174c0 72 67 30 00 5f 72 65 74 00 63 6c 61 6e 67 20 4c |rg0._ret.clang L|
```
apparently original names for params/vars are included in wasm, but `wasm2wat` cannot find them.
also i've checked that wasm file in dev tools of chrome and firefox, and i don't see original params/vars there either (i assume those browsers have their own wasm to wat converters)
also i've tried to write simple function in wat, feed it to `wat2wasm`, and then feed resulting wasm to `wasm2wat` back again. and i see that custom names for params are preserved. it means `wasm2wat` can extract param names from wasm ok.
<details>
<summary>simple function in wat</summary>
```wat
(module
(type $t0 (func (param i32 i32) (result i32)))
(func $addTwo (export "add_two") (type $t0) (param $my_param i32) (param $p1 i32) (result i32)
(i32.add
(local.get $my_param)
(local.get $my_param))))
```
</details>
so i assume that problem is
- either in `wasm-pack`, which generates invalid debug symbols, so `wasm2wat` cannot extract them
- or in `wasm2wat` , which cannot read valid debug symbols from wasm
any thoughts?
i've created [minimum rust project](https://github.com/art-in/wasm-debug-symbols) for testing.
[wasm_debug_symbols_bg.wasm](https://github.com/art-in/wasm-debug-symbols/raw/master/pkg/wasm_debug_symbols_bg.wasm) (from `wasm-pack`)
[wasm_debug_symbols_bg.wat](https://raw.githubusercontent.com/art-in/wasm-debug-symbols/master/pkg/wasm_debug_symbols_bg.wat) (from `wasm2wat`)
|
wasm2wat can't read debug names of params / vars
|
https://api.github.com/repos/WebAssembly/wabt/issues/1290/comments
| 5 |
2020-01-09T04:41:20Z
|
2020-01-10T14:14:28Z
|
https://github.com/WebAssembly/wabt/issues/1290
| 547,244,813 | 1,290 |
[
"WebAssembly",
"wabt"
] |
Hi,
I'm using wast2json as part of a test suite for a pet project. when using it with the reference test suite's `elem.wast` (https://github.com/WebAssembly/testsuite/blob/master/elem.wast#L15), the resulting first module is using the new segment flags which AFAIK are part of the bulk memory proposal, which that means that wabt is not outputting valid wasm as of the 1.0 MVP ? I had to dig in the proposals to find an explaination as it's not part of the official spec.
Element segment part of the proposal: https://github.com/WebAssembly/bulk-memory-operations/blob/master/proposals/bulk-memory-operations/Overview.md#element-segments
source wast extract of elem.wast first module ( https://github.com/WebAssembly/testsuite/blob/master/elem.wast#L15 ) :
`(elem $t (i32.const 0))`
resulting binary in elem.0.wasm:
`0x4C: 02 00 41 00 0B 00 00`
truncated output of `wasm-objdump.exe -x elem.0.wasm` :
` - segment[8] flags=2 table=0 count=0 - init i32=0`
Notice the `flags=2` part and the matching `02` in the binary.
I noticed the `wast2json` `--enable-bulk-memory` option, but shouldn't segment flags be enabled only if that option is present ?
Edit: looking at the code in wast-parser.cc, I think the issue is here:
```cpp
// Optional table specifier
if (options_->features.bulk_memory_enabled()) {
if (PeekMatchLpar(TokenType::Table)) {
field->elem_segment.flags |= SegExplicitIndex;
EXPECT(Lpar);
EXPECT(Table);
CHECK_RESULT(ParseVar(&field->elem_segment.table_var));
EXPECT(Rpar);
} else {
ParseVarOpt(&field->elem_segment.table_var, Var(0, loc));
}
} else {
if (has_name) {
field->elem_segment.table_var = Var(initial_name, loc);
field->elem_segment.flags |= SegExplicitIndex;
} else {
ParseVarOpt(&field->elem_segment.table_var, Var(0, loc));
}
}
```
if it has a name but that name resolves to the table 0, I'd say the flag is not required. More generally, shouldn't the flags only be used if `!options_->features.bulk_memory_enabled()` ?
|
wast2json outputs wasm code using segment flags which are not part of the MVP
|
https://api.github.com/repos/WebAssembly/wabt/issues/1281/comments
| 1 |
2020-01-04T17:15:51Z
|
2020-01-09T06:10:56Z
|
https://github.com/WebAssembly/wabt/issues/1281
| 545,308,499 | 1,281 |
[
"WebAssembly",
"wabt"
] |
This is a suggestion for a feature request.
## Idea ##
Convert WAT, representation of a Wasm binary, into a language-independent data format so that the information can be transmitted across the web and also parsed (by any language) for inspection.
## Why ##
As far as I can tell, after unsuccessfully attempting to parse WAT files as S-expression data ( using tools like lexpr [1] and atoms [2]) there does not seem to be a way to parse WAT as a native object and then dynamically query function names (as well as param and result types) via code.
## Example ##
The following WAT file could be converted to a data interchange format that can be a) sent over the web and b) parsed as an object
```
(module
(type (;0;) (func (param i32 i32) (result i32)))
(type (;1;) (func (param i32 i32 i32) (result i32)))
(func (;0;) (type 0) (param i32 i32) (result i32)
local.get 0
local.get 1
i32.add)
(func (;1;) (type 1) (param i32 i32 i32) (result i32)
local.get 0
local.get 1
i32.add
local.get 2
i32.add)
(export "add" (func 0))
(export "add_again" (func 1)))
```
## Arbitrary example of a format (in this case just a JSON file) ##
```
{
"functions": [{
"name": "add",
"type": "0",
"params": ["i32", "i32"],
"results": ["i32"]
},
{
"name": "add_again",
"type": "1",
"params": ["i32", "i32", "i32"],
"results": ["i32"]
}
]
}
```
## The parsed data object could be queried like this ##
```
data.functions[0].name
//returns "add"
data.functions[0].params[0]
//returns i32
```
Of course as with data objects the code could also iterate over the object and perform tasks such as determining how many params a function has etc.
## Usefulness ##
There are many use cases for this, including microservices where calling code that wants to execute a Wasm function on a remote server via RPC etc. needs to know the details about the remove function. For example:
- function name
- number of `param`
- `param` data type
- `result` data type
## References ##
[1] https://docs.rs/lexpr/0.2.4/lexpr/
[2] https://docs.rs/atoms/2.2.3/atoms/
|
Dynamic discovery of Wasm functions, params and result.
|
https://api.github.com/repos/WebAssembly/wabt/issues/1280/comments
| 1 |
2020-01-02T23:47:34Z
|
2020-01-09T06:10:58Z
|
https://github.com/WebAssembly/wabt/issues/1280
| 544,795,834 | 1,280 |
[
"WebAssembly",
"wabt"
] |
I create a new Wat project in
I edit a wat file with memory.grow and memory.size, such as the one below (just for illustration):
```
(module
(func $add (param $lhs i32) (param $rhs i32) (result i32)
get_local $lhs
get_local $rhs
memory.grow
memory.size
i32.add)
(export "add" (func $add))
)
```
and on build this gets the following errors
```
test.wat:5:5: error: unexpected token memory.grow, expected ).
memory.grow
test.wat:6:5: error: unexpected token memory.size.
memory.size
```
These are the same errors reported in
https://github.com/WebAssembly/wabt/issues/852
Perhaps you need to update to the latest version of wabt in Studio?
|
Getting errors on memory.grow and memory.size on https://webassembly.studio/
|
https://api.github.com/repos/WebAssembly/wabt/issues/1274/comments
| 1 |
2019-12-21T17:54:09Z
|
2020-01-08T23:53:46Z
|
https://github.com/WebAssembly/wabt/issues/1274
| 541,353,092 | 1,274 |
[
"WebAssembly",
"wabt"
] |
Ran into this issue when reviewing some recent additions.
Currently the only documentation I could find was that we specify `BasedOnStyle: Chromium` in `.clang-format`. This implicitly locks down a lot of things which good, more explicit docs would be good.
The specific issue we ran into was the wabt uses a style that requires curly braces around conditional blocks, but chromium, which inherits from google style allows from single line conditional, and conditional without curlys:
https://google.github.io/styleguide/cppguide.html#Conditionals
`In general, curly braces are not required for single-line statements`
We should be specific if we want to enforce this style.
|
C++ coding style is not documented
|
https://api.github.com/repos/WebAssembly/wabt/issues/1273/comments
| 5 |
2019-12-19T23:19:02Z
|
2020-01-09T00:44:02Z
|
https://github.com/WebAssembly/wabt/issues/1273
| 540,635,069 | 1,273 |
[
"WebAssembly",
"wabt"
] |
Given this input:
```
(module
(func $f)
(global (export "g") anyref (ref.func $f))
)
```
round-tripping this yields:
```
$ wat2wasm foo.wat -o foo.wasm --enable-all
$ wasm2wat foo.wasm --enable-all
foo.wasm:0000017: error: type mismatch at global initializer expression. got void, expected anyref
$ wasm2wat foo.wasm --enable-all --no-check
(module
(type (;0;) (func))
(func (;0;) (type 0))
(global (;0;) anyref)
(export "g" (global 0)))
```
it looks like `anyref` initializers for globals may not be working quite yet fully?
|
Anyref global initializer fails in `wasm2wat`
|
https://api.github.com/repos/WebAssembly/wabt/issues/1270/comments
| 1 |
2019-12-18T19:44:39Z
|
2020-01-10T19:56:25Z
|
https://github.com/WebAssembly/wabt/issues/1270
| 539,883,775 | 1,270 |
[
"WebAssembly",
"wabt"
] |
Given this `*.wat`:
```wat
(module
(table 1 funcref)
(elem (table 0) (i32.const 0) funcref))
```
this encodes as:
```
$ wat2wasm foo.wat --enable-all -o foo.wasm
$ wasm-objdump -x foo.wasm
foo.wasm: file format wasm 0x1
Section Details:
Table[1]:
- table[0] type=funcref initial=1
Elem[1]:
- segment[0] flags=7 table=0 count=0
DataCount:
- data count: 0
```
Here the element segment uses `flags=7` but I think this one should more accurately use either 4 or 6 according to https://github.com/WebAssembly/bulk-memory-operations/blob/master/proposals/bulk-memory-operations/Overview.md#element-segments?
|
Binary encoding for empty funcref segment may use wrong flags?
|
https://api.github.com/repos/WebAssembly/wabt/issues/1269/comments
| 1 |
2019-12-17T21:58:45Z
|
2020-01-09T06:13:36Z
|
https://github.com/WebAssembly/wabt/issues/1269
| 539,332,463 | 1,269 |
[
"WebAssembly",
"wabt"
] |
Given a module that looks like:
```wat
(module
(table 1 funcref)
(elem (table 0) (i32.const 0)))
```
this uses the nifty new `(table 0)` syntax to clarify that the `elem` segment is part of a particular table. This `*.wat`, however, is MVP-compatible but ends up being encoded as:
```
$ wat2wasm foo.wat --enable-all -o foo.wasm
$ wasm-objdump -x foo.wasm
foo.wasm: file format wasm 0x1
Section Details:
Table[1]:
- table[0] type=funcref initial=1
Elem[1]:
- segment[0] flags=2 table=0 count=0 - init i32=0
DataCount:
- data count: 0
```
The data count section is covered by https://github.com/WebAssembly/wabt/issues/1189 but using `flags=2` here isn't quite necessary when it could otherwise use `flags=0` and be MVP compatible?
|
Binary encoding of element segment uses non-MVP encoding when it could otherwise do so
|
https://api.github.com/repos/WebAssembly/wabt/issues/1268/comments
| 1 |
2019-12-17T21:55:57Z
|
2020-01-09T06:13:15Z
|
https://github.com/WebAssembly/wabt/issues/1268
| 539,331,314 | 1,268 |
[
"WebAssembly",
"wabt"
] |
I wasn't able to find much documentation about libwabt.js, but I was able to piece this together from various sources. Corrections/elaborations are invited.
### Usage ###
Call either `parseWat(filename:string, watSource:string, features: object)` or `readWasm(buffer: Uint8Array, {readDebugNames:true})`.
The `features` object can contain any of the following boolean keys: `mutable_globals`, `exceptions`, `multi_value`, `sign_extension`, `sat_float_to_int`, `simd`, `threads`, `tail_call`, `bulk_memory`, `reference_types`.
The calls to `parseWat` and `readWasm` will return an object `wasm` that supports the following methods:
* `wasm.destroy()`
* `wasm.resolveNames()`
* `wasm.validate(features)`
* `wasm.toBinary({log: boolean, write_debug_names: boolean}): { log: string, buffer: Uint8Array}`
* `wasm.generateNames()`
* `wasm.applyNames()`
* `wasm.toText({foldExprs: boolean, inlineExport: boolean}): string`
### Updating/Building ###
The file `demo/libwabt.js` in the wabt git repository is periodically updated. It's not clear how to do this manually oneself, to incorporate recent changes to the repo. Issue #536 says that this can be done by running `make emscripten-release`, which uses a target from the repo's top-level Makefile.
However, I just now tried going into my `emsdk` folder, updating it following the instructions [here](https://emscripten.org/docs/getting_started/downloads.html#updating-the-sdk) (including the `source ./emsdk_env.sh` command), then cd-ing into my wabt repo and trying `make emscripten-release`. This fails with:
```
mkdir -p out/emscripten/Release/
cd out/emscripten/Release/ && cmake -G "Unix Makefiles" /Users/jim/Documents/CLOUD/dev/wasm/wabt/ -DCMAKE_TOOLCHAIN_FILE=/Users/jim/Documents/CLOUD/dev/wasm/emsdk/upstream/emscripten//cmake/Modules/Platform/Emscripten.cmake -DCMAKE_BUILD_TYPE=Release
CMake Error at /Users/jim/_dev/wasm/emsdk/upstream/emscripten/cmake/Modules/Platform/Emscripten.cmake:100 (message):
Failed to fetch compiler version information with command
"'/Users/jim/_dev/wasm/emsdk/upstream/emscripten/emcc' -v"! Process
returned with error code 1.
Call Stack (most recent call first):
/opt/local/share/cmake-3.16/Modules/CMakeDetermineSystem.cmake:93 (include)
CMakeLists.txt:18 (project)
CMake Error: CMake was unable to find a build program corresponding to "Unix Makefiles". CMAKE_MAKE_PROGRAM is not set. You probably need to select a different build tool.
-- Configuring incomplete, errors occurred!
make: *** [out/emscripten/Release/Makefile] Error 1
```
|
More docs for building/using libwabt?
|
https://api.github.com/repos/WebAssembly/wabt/issues/1267/comments
| 5 |
2019-12-15T17:15:23Z
|
2024-03-09T04:53:25Z
|
https://github.com/WebAssembly/wabt/issues/1267
| 538,079,380 | 1,267 |
[
"WebAssembly",
"wabt"
] |
Function inlining can increase performance in x2 for different algorithms. But readability become worsens after that. I suggest to create a some directive for `wat2wasm` preprocessor.
```webassembly
;;@inline
(func $add (param $a f64) (param $b f64) (result f64)
(f64.add (get_local $a) (get_local $b))
)
```
|
[wat2wasm] directive @inline for preprocessor
|
https://api.github.com/repos/WebAssembly/wabt/issues/1260/comments
| 3 |
2019-12-09T14:44:32Z
|
2020-01-09T01:08:38Z
|
https://github.com/WebAssembly/wabt/issues/1260
| 534,977,993 | 1,260 |
[
"WebAssembly",
"wabt"
] |
A very simple wat file copied from https://github.com/WebAssembly/spec/blob/master/test/core/elem.wast
(module
(table $t 10 funcref)
(func $f)
;; (elem (i32.const 0))
(elem $t (offset (i32.const 0)))
)
The generated wasm file:
00000000 00 61 73 6d 01 00 00 00 01 04 01 60 00 00 03 02 |.asm.......`....|
00000010 01 00 04 04 01 70 00 0a **09 08 01 02 00 41 00 0b** |.....p.......A..|
00000020 **00 00** 0a 04 01 02 00 0b |........|
00000028
Note this issue doesn't exist in the previous version of wabt.
|
The latest version of wat2wasm generates malformed wasm file for 'elem' statement
|
https://api.github.com/repos/WebAssembly/wabt/issues/1259/comments
| 1 |
2019-12-09T08:36:08Z
|
2020-01-09T06:13:57Z
|
https://github.com/WebAssembly/wabt/issues/1259
| 534,772,379 | 1,259 |
[
"WebAssembly",
"wabt"
] |
Is there a roadmap of typed function references and GC proposal support?
Tools like **wasm-interp** or **wasm2c** would be useful to test compilers while waiting for browser support.
|
GC proposal
|
https://api.github.com/repos/WebAssembly/wabt/issues/1257/comments
| 2 |
2019-11-30T18:09:38Z
|
2020-03-04T03:03:48Z
|
https://github.com/WebAssembly/wabt/issues/1257
| 530,612,529 | 1,257 |
[
"WebAssembly",
"wabt"
] |
Run CI with -Werror (cmake -DWERROR=ON)
|
https://api.github.com/repos/WebAssembly/wabt/issues/1249/comments
| 1 |
2019-11-22T02:31:32Z
|
2020-08-19T00:44:53Z
|
https://github.com/WebAssembly/wabt/issues/1249
| 526,950,650 | 1,249 |
|
[
"WebAssembly",
"wabt"
] |
Currently we are not catching python3 regressions: https://github.com/WebAssembly/wabt/issues/1180
|
Run CI with python3 (as well as python2 for a while)
|
https://api.github.com/repos/WebAssembly/wabt/issues/1248/comments
| 1 |
2019-11-22T02:31:06Z
|
2020-01-10T19:19:09Z
|
https://github.com/WebAssembly/wabt/issues/1248
| 526,950,537 | 1,248 |
[
"WebAssembly",
"wabt"
] |
It looks like the test running the array of failed tests contain `Error` class as well as `TestResult`.. perhaps we should embed the `Error` in the `TestResult` on timeout to avoid this discrepancy?
```
./test/run-tests.py test/spec/memory_grow.txt -t0.1
- test/spec/memory_grow.txt
TIMEOUT
STDOUT:
STDERR:
**** FAILED ******************************************************************
Traceback (most recent call last):
File "./test/run-tests.py", line 956, in <module>
sys.exit(main(sys.argv[1:]))
File "./test/run-tests.py", line 947, in main
last_cmd = result.GetLastCommand() if result is not None else ''
AttributeError: 'Error' object has no attribute 'GetLastCommand'
```
|
Crash in test running when a test times out
|
https://api.github.com/repos/WebAssembly/wabt/issues/1243/comments
| 1 |
2019-11-21T20:03:04Z
|
2020-03-11T17:28:26Z
|
https://github.com/WebAssembly/wabt/issues/1243
| 526,812,361 | 1,243 |
[
"WebAssembly",
"wabt"
] |
I'm using WAT as a first-class language, and have an issue resolving imports: If one module exports a value, and another module imports that value, there is no (clean) way for the host to resolve the import, unless it knows what the files contain in advance.
When using the JavaScript API (though this seems to apply generally), we use `parseWat` to parse the WAT source to a *module*, then use the module's `toBinary` method to compile the module to a *buffer*. The buffer is then passed to `WebAssembly.instantiate` (with a hash of imports), to get an *instance* (which exposes its exports as attributes).
The host must provide the imports to `WebAssembly.instantiate`, but has no obvious way of knowing *what* must be provided (the module and field names for each import).
The buffer has a `log` attribute which contains an *import section* with a subsection for each import. Parsing the log to extract each pair of module and field names is possible, but obviously pretty clunky. It's inherently unreliable too, as there's no formal grammar for the log, so the parsing is crude and would choke on more complex import strings.
Could we give the buffer (returned by `toBinary`) an `imports` attribute (as well as `log`) that references a hash of import strings (populated as the log is generated), using the module names as keys and the field names as values?
Thanks for considering this, and for all the hard work you do on the project (it's my first post here).
|
WAT imports cannot be resolved dynamically.
|
https://api.github.com/repos/WebAssembly/wabt/issues/1229/comments
| 1 |
2019-11-17T22:01:16Z
|
2020-03-20T20:37:47Z
|
https://github.com/WebAssembly/wabt/issues/1229
| 524,054,701 | 1,229 |
[
"WebAssembly",
"wabt"
] |
Given this module:
```wat
(module
(func)
(func
ref.func 0
drop))
```
this yields:
```
$ wat2wasm --enable-all foo.wat -o foo.wasm
$ wasm2wat foo.wasm --enable-all
(module
(type (;0;) (func))
(func (;0;) (type 0))
(func (;1;) (type 0)
ref.func
0
drop))
```
A pretty minor issue, but it'd be a bit nicer if the `ref.func` didn't have a newline after it!
|
Formatting of `ref.func` inserts an extra newline by accident
|
https://api.github.com/repos/WebAssembly/wabt/issues/1228/comments
| 0 |
2019-11-15T23:30:14Z
|
2019-12-11T23:01:49Z
|
https://github.com/WebAssembly/wabt/issues/1228
| 523,745,852 | 1,228 |
[
"WebAssembly",
"wabt"
] |
Given a module like:
```wat
(module
(func (param v128) (result v128)
local.get 0
local.get 0
v8x16.shuffle 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0))
```
I get:
```
$ wat2wasm foo.wat -o foo.wasm --enable-simd
$ wasm2wat ./foo.wasm --enable-simd
(module
(type (;0;) (func (param v128) (result v128)))
(func (;0;) (type 0) (param v128) (result v128)
local.get 0
local.get 0
v8x16.shuffle 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 ))
```
There's two spaces between each lane in the shuffle instruction, and a trailing space afterwards. A pretty minor issue, but figured it may be worth bringing up!
|
Formatting of `v8x16.shuffle` has some extraneous whitespace
|
https://api.github.com/repos/WebAssembly/wabt/issues/1227/comments
| 2 |
2019-11-15T23:27:22Z
|
2020-03-24T00:32:55Z
|
https://github.com/WebAssembly/wabt/issues/1227
| 523,745,036 | 1,227 |
[
"WebAssembly",
"wabt"
] |
Given a module like so:
```wat
(module
(func $foo)
(func $bar
call $foo)
(start $foo))
```
it generates the following output:
```sh
$ wat2wasm foo.wat -o foo.wasm --debug-names
$ wasm2wat ./foo.wasm
(module
(type (;0;) (func))
(func $foo (type 0))
(func $bar (type 0)
call $foo)
(start 0))
```
Here there's `start 0`, but it'd be a bit nicer if it were `start $foo`!
|
`wasm2wat` doesn't give the start function a pretty name
|
https://api.github.com/repos/WebAssembly/wabt/issues/1226/comments
| 0 |
2019-11-15T23:22:34Z
|
2020-01-09T19:42:50Z
|
https://github.com/WebAssembly/wabt/issues/1226
| 523,743,329 | 1,226 |
[
"WebAssembly",
"wabt"
] |
There are a still a few outstanding issues and we don't yet run the reference-types spec tests.
|
Finish implementing reference-types and integrate all spec tests
|
https://api.github.com/repos/WebAssembly/wabt/issues/1223/comments
| 1 |
2019-11-15T16:53:53Z
|
2019-11-22T08:23:47Z
|
https://github.com/WebAssembly/wabt/issues/1223
| 523,580,671 | 1,223 |
[
"WebAssembly",
"wabt"
] |
Hi,
I believe that `wasm-validate` reports the wrong binary location in its error messages.
## Example
Validating following file generated via `wast2json` from the [spec test i32.wast][1]
```bash
$ xxd test/core/wasm/i32/i32.wast.8.wasm
00000000: 0061 736d 0100 0000 0104 0160 0000 0302 .asm.......`....
00000010: 0100 0a0e 010c 0041 0002 4045 0e00 001a .......A..@E....
00000020: 0b0b ..
$ wasm-objdump -d test/core/wasm/i32/i32.wast.8.wasm
i32.wast.8.wasm: file format wasm 0x1
Code Disassembly:
000016 func[0]:
000017: 41 00 | i32.const 0
000019: 02 40 | block
00001b: 45 | i32.eqz
00001c: 0e 00 00 | br_table
00001f: 1a | drop
000020: 0b | end
000021: 0b | end
```
with the `wasm-validate` program results in following error message:
```bash
$ wasm-validate test/core/wasm/i32/i32.wast.8.wasm
test/core/wasm/i32/i32.wast.8.wasm:000001c: error: type mismatch in i32.eqz, expected [i32] but got []
test/core/wasm/i32/i32.wast.8.wasm:0000021: error: type mismatch in function, expected [] but got [i32]
```
However, as can be seen in the object dump above the `i32.eqz` instruction (hex opcode `45`) is at offset `000001b`, **not** `000001c` as stated in the error message. Interestingly, the second error message displays the correct binary location.
### Expected Output
To clarify, I would have expected following output:
```bash
$ wasm-validate test/core/wasm/i32/i32.wast.8.wasm
test/core/wasm/i32/i32.wast.8.wasm:000001b: error: type mismatch in i32.eqz, expected [i32] but got []
test/core/wasm/i32/i32.wast.8.wasm:0000021: error: type mismatch in function, expected [] but got [i32]
```
## Additional Information
The [spec interpreter][2] reports the correct binary location:
```bash
$ wasm test/core/wasm/i32/i32.wast.8.wasm
../spec/core/wasm/i32/i32.wast.8.wasm:0x1b: invalid module: type mismatch: operator requires [i32] but stack has []
```
[1]: https://github.com/WebAssembly/spec/blob/master/test/core/i32.wast#L487
[2]: https://github.com/WebAssembly/spec/tree/master/interpreter
|
[wasm-validate] Wrong binary location reported in error message
|
https://api.github.com/repos/WebAssembly/wabt/issues/1217/comments
| 4 |
2019-11-10T00:35:11Z
|
2021-09-17T12:03:34Z
|
https://github.com/WebAssembly/wabt/issues/1217
| 520,533,774 | 1,217 |
[
"WebAssembly",
"wabt"
] |
Greetings wabt developers and contributors,
We’re reaching out because your project is an important part of the open source ecosystem, and we’d like to invite you to integrate with our [fuzzing](https://www.owasp.org/index.php/Fuzzing) service, [OSS-Fuzz]( https://opensource.googleblog.com/2016/12/announcing-oss-fuzz-continuous-fuzzing.html ). OSS-Fuzz is a free fuzzing infrastructure you can use to identify security vulnerabilities and stability bugs in your project. OSS-Fuzz will:
- Continuously run at scale all the fuzzers you write.
- Alert you when it finds issues.
- Automatically close issues after they’ve been fixed by a commit.
Many widely used [open source projects]( https://github.com/google/oss-fuzz/tree/master/projects ) like OpenSSL, FFmpeg, LibreOffice, and ImageMagick are fuzzing via OSS-Fuzz, which helps them find and remediate [critical issues]( https://bugs.chromium.org/p/oss-fuzz/issues/list?can=1&q=status%3AFixed%2CVerified+Type%3ABug%2CBug-Security+-component%3AInfra+ ).
Even though typical integrations can be done in < 100 LoC, we have a [reward program]( https://www.google.com/about/appsecurity/patch-rewards/ ) in place which aims to recognize folks who are not just contributing to open source, but are also working hard to make it more secure.
We want to stress that anyone who meets the eligibility criteria and integrates a project with OSS-Fuzz is eligible for a reward.
To help you getting started, we can attach our internal fuzzer for your project that you are welcome to use directly, or to use it as a starting point.
If you're not interested in integrating with OSS-Fuzz, it would be helpful for us to understand why—lack of interest, lack of time, or something else—so we can better support projects like yours in the future.
If we’ve missed your question in our [FAQ]( https://google.github.io/oss-fuzz/faq/ ), feel free to reply or reach out to us at [email protected].
Thanks!
Tommy
OSS-Fuzz Team
|
Integrating with OSS-Fuzz
|
https://api.github.com/repos/WebAssembly/wabt/issues/1212/comments
| 26 |
2019-11-07T19:47:31Z
|
2020-01-09T00:30:40Z
|
https://github.com/WebAssembly/wabt/issues/1212
| 519,475,023 | 1,212 |
[
"WebAssembly",
"wabt"
] |
A discussion about adding sourcemap support came up on twitter. There's an old PR (#432), that could be revived, but we may want to approach this differently now. @dschuff @sbc100 thoughts?
|
Sourcemap support for wat2wasm?
|
https://api.github.com/repos/WebAssembly/wabt/issues/1210/comments
| 6 |
2019-11-07T14:17:01Z
|
2022-03-27T14:33:39Z
|
https://github.com/WebAssembly/wabt/issues/1210
| 519,293,431 | 1,210 |
[
"WebAssembly",
"wabt"
] |
With:
```
$ clang -v
clang version 10.0.0 (https://github.com/llvm/llvm-project/ 64a362e7216a43e3ad44e50a89265e72aeb14294)
Target: x86_64-unknown-linux-gnu
Thread model: posix
```
I'm seeing:
```
test-hexfloat.cc:109:7: warning: implicit conversion from 'unsigned int' to 'float' changes value from 4294967295 to 4294967296 [-Wimplicit-int-float-conversion]
LOG_COMPLETION(bits);
^~~~~~~~~~~~~~~~~~~~
```
|
implicit-int-float-conversion warnings in test-hexfloat.cc
|
https://api.github.com/repos/WebAssembly/wabt/issues/1200/comments
| 0 |
2019-10-25T00:10:48Z
|
2020-01-08T19:46:47Z
|
https://github.com/WebAssembly/wabt/issues/1200
| 512,238,274 | 1,200 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.