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"
] |
```
>cmake .. -DCMAKE_BUILD_TYPE=DEBUG -DCMAKE_INSTALL_PREFIX=.\bin -G "Visual Studio 15 2017 Win64"
CMake Error: Could not create named generator Visual Studio 15 2017 Win64
Generators
Visual Studio 14 2015 [arch] = Generates Visual Studio 2015 project files.
Optional [arch] can be "Win64" or "ARM".
Visual Studio 12 2013 [arch] = Generates Visual Studio 2013 project files.
Optional [arch] can be "Win64" or "ARM".
Visual Studio 11 2012 [arch] = Generates Visual Studio 2012 project files.
Optional [arch] can be "Win64" or "ARM".
Visual Studio 10 2010 [arch] = Generates Visual Studio 2010 project files.
Optional [arch] can be "Win64" or "IA64".
Visual Studio 9 2008 [arch] = Generates Visual Studio 2008 project files.
Optional [arch] can be "Win64" or "IA64".
Visual Studio 8 2005 [arch] = Generates Visual Studio 2005 project files.
Optional [arch] can be "Win64".
Visual Studio 7 .NET 2003 = Generates Visual Studio .NET 2003 project
files.
Visual Studio 7 = Deprecated. Generates Visual Studio .NET
2002 project files.
Visual Studio 6 = Deprecated. Generates Visual Studio 6
project files.
```
|
CMake build doesn't support Visual Studio 2017
|
https://api.github.com/repos/WebAssembly/wabt/issues/923/comments
| 2 |
2018-10-06T14:35:03Z
|
2018-10-08T02:16:49Z
|
https://github.com/WebAssembly/wabt/issues/923
| 367,462,482 | 923 |
[
"WebAssembly",
"wabt"
] |
I want to set the flag "--enable-saturating-float-to-int" to libwabt.js bevor calling parseWat() How can I do this?
|
How to pass parameters to libwabt.js?
|
https://api.github.com/repos/WebAssembly/wabt/issues/920/comments
| 2 |
2018-10-03T20:52:14Z
|
2018-10-07T14:19:03Z
|
https://github.com/WebAssembly/wabt/issues/920
| 366,523,405 | 920 |
[
"WebAssembly",
"wabt"
] |
I have a .wasm file which has lots of mangled functions[which I Knew after converting it into .txt file using wasm-dis.ex]. How can I know the size of each function? Do we have any tool which can help me to achieve this?
|
Do we have any tool which can give me size of functions which are in .wasm file
|
https://api.github.com/repos/WebAssembly/wabt/issues/917/comments
| 5 |
2018-10-01T12:15:17Z
|
2019-01-16T06:03:47Z
|
https://github.com/WebAssembly/wabt/issues/917
| 365,433,512 | 917 |
[
"WebAssembly",
"wabt"
] |
Somehow, a module in text format like
```wat
(module
(type $t0 (func (param i32)))
(type $t1 (func))
(import "env" "log" (func $log (type $t0)))
(func $main (type $t1)
block $B0
block $B1
br $B1
i32.const 3
call $log
end
i32.const 2
call $log
end
i32.const 1
call $log)
(start 1))
```
becomes
```wat
(module
(type $t0 (func (param i32)))
(type $t1 (func))
(import "env" "log" (func $log (type $t0)))
(func $main (type $t1)
block $B0
block $B1
br 3228196 (; INVALID ;)
i32.const 3
call $log
end
i32.const 2
call $log
end
i32.const 1
call $log)
(start 1))
```
after parsing with libwabt.js. Note the invalid pointer value instead of the label on the `br`. Any ideas?
See: https://github.com/reklatsmasters/vscode-wasm/issues/14#issuecomment-423853330
|
Issue with br labels in the JS build
|
https://api.github.com/repos/WebAssembly/wabt/issues/915/comments
| 3 |
2018-09-23T23:07:08Z
|
2018-09-24T00:51:48Z
|
https://github.com/WebAssembly/wabt/issues/915
| 362,985,834 | 915 |
[
"WebAssembly",
"wabt"
] |
We still use asm.js for the emscripten version of wabt, but we should we use wasm instead. :-)
|
Convert online demo to wasm instead of asm.js
|
https://api.github.com/repos/WebAssembly/wabt/issues/914/comments
| 0 |
2018-09-14T22:43:46Z
|
2020-03-20T20:33:58Z
|
https://github.com/WebAssembly/wabt/issues/914
| 360,476,047 | 914 |
[
"WebAssembly",
"wabt"
] |
I attempted to upload a .wasm to the [web demo](https://cdn.rawgit.com/WebAssembly/wabt/aae5a4b7/demo/wasm2wat/)
and it generated the following error:
<img width="1011" alt="image" src="https://user-images.githubusercontent.com/675259/45258041-aa58d600-b37e-11e8-8316-4a339d9fb889.png">
Just wondering if there's a simple way around this (maybe client side) or would it have to be built differently (via Emscripten)?
<details>
<summary>Full output</summary>
```bin
abort("Cannot enlarge memory arrays. Either (1) compile with -s TOTAL_MEMORY=X with X higher than the current value 16777216, (2) compile with -s ALLOW_MEMORY_GROWTH=1 which allows increasing the size at runtime but prevents some optimizations, (3) set Module.TOTAL_MEMORY to a higher value before the program runs, or (4) if you want malloc to return NULL (0) instead of this abort, compile with -s ABORTING_MALLOC=0 ") at jsStackTrace@https://cdn.rawgit.com/WebAssembly/wabt/aae5a4b7/demo/libwabt.js:1:18545
stackTrace@https://cdn.rawgit.com/WebAssembly/wabt/aae5a4b7/demo/libwabt.js:1:18716
abort@https://cdn.rawgit.com/WebAssembly/wabt/aae5a4b7/demo/libwabt.js:19:10172
abortOnCannotGrowMemory@https://cdn.rawgit.com/WebAssembly/wabt/aae5a4b7/demo/libwabt.js:1:19590
enlargeMemory@https://cdn.rawgit.com/WebAssembly/wabt/aae5a4b7/demo/libwabt.js:1:20049
cv@https://cdn.rawgit.com/WebAssembly/wabt/aae5a4b7/demo/libwabt.js:10:1
ss@https://cdn.rawgit.com/WebAssembly/wabt/aae5a4b7/demo/libwabt.js:10:1
Qt@https://cdn.rawgit.com/WebAssembly/wabt/aae5a4b7/demo/libwabt.js:10:1
Lj@https://cdn.rawgit.com/WebAssembly/wabt/aae5a4b7/demo/libwabt.js:9:1
jm@https://cdn.rawgit.com/WebAssembly/wabt/aae5a4b7/demo/libwabt.js:11:1
pm@https://cdn.rawgit.com/WebAssembly/wabt/aae5a4b7/demo/libwabt.js:11:1
hk@https://cdn.rawgit.com/WebAssembly/wabt/aae5a4b7/demo/libwabt.js:9:1
hk@https://cdn.rawgit.com/WebAssembly/wabt/aae5a4b7/demo/libwabt.js:9:1
hk@https://cdn.rawgit.com/WebAssembly/wabt/aae5a4b7/demo/libwabt.js:9:1
hk@https://cdn.rawgit.com/WebAssembly/wabt/aae5a4b7/demo/libwabt.js:9:1
vk@https://cdn.rawgit.com/WebAssembly/wabt/aae5a4b7/demo/libwabt.js:9:1
gk@https://cdn.rawgit.com/WebAssembly/wabt/aae5a4b7/demo/libwabt.js:9:1
hk@https://cdn.rawgit.com/WebAssembly/wabt/aae5a4b7/demo/libwabt.js:9:1
vk@https://cdn.rawgit.com/WebAssembly/wabt/aae5a4b7/demo/libwabt.js:9:1
gk@https://cdn.rawgit.com/WebAssembly/wabt/aae5a4b7/demo/libwabt.js:9:1
hk@https://cdn.rawgit.com/WebAssembly/wabt/aae5a4b7/demo/libwabt.js:9:1
vk@https://cdn.rawgit.com/WebAssembly/wabt/aae5a4b7/demo/libwabt.js:9:1
gk@https://cdn.rawgit.com/WebAssembly/wabt/aae5a4b7/demo/libwabt.js:9:1
hk@https://cdn.rawgit.com/WebAssembly/wabt/aae5a4b7/demo/libwabt.js:9:1
vk@https://cdn.rawgit.com/WebAssembly/wabt/aae5a4b7/demo/libwabt.js:9:1
gk@https://cdn.rawgit.com/WebAssembly/wabt/aae5a4b7/demo/libwabt.js:9:1
hk@https://cdn.rawgit.com/WebAssembly/wabt/aae5a4b7/demo/libwabt.js:9:1
vk@https://cdn.rawgit.com/WebAssembly/wabt/aae5a4b7/demo/libwabt.js:9:1
gk@https://cdn.rawgit.com/WebAssembly/wabt/aae5a4b7/demo/libwabt.js:9:1
hk@https://cdn.rawgit.com/WebAssembly/wabt/aae5a4b7/demo/libwabt.js:9:1
vk@https://cdn.rawgit.com/WebAssembly/wabt/aae5a4b7/demo/libwabt.js:9:1
gk@https://cdn.rawgit.com/WebAssembly/wabt/aae5a4b7/demo/libwabt.js:9:1
hk@https://cdn.rawgit.com/WebAssembly/wabt/aae5a4b7/demo/libwabt.js:9:1
vk@https://cdn.rawgit.com/WebAssembly/wabt/aae5a4b7/demo/libwabt.js:9:1
gk@https://cdn.rawgit.com/WebAssembly/wabt/aae5a4b7/demo/libwabt.js:9:1
hk@https://cdn.rawgit.com/WebAssembly/wabt/aae5a4b7/demo/libwabt.js:9:1
vk@https://cdn.rawgit.com/WebAssembly/wabt/aae5a4b7/demo/libwabt.js:9:1
gk@https://cdn.rawgit.com/WebAssembly/wabt/aae5a4b7/demo/libwabt.js:9:1
hk@https://cdn.rawgit.com/WebAssembly/wabt/aae5a4b7/demo/libwabt.js:9:1
vk@https://cdn.rawgit.com/WebAssembly/wabt/aae5a4b7/demo/libwabt.js:9:1
gk@https://cdn.rawgit.com/WebAssembly/wabt/aae5a4b7/demo/libwabt.js:9:1
hk@https://cdn.rawgit.com/WebAssembly/wabt/aae5a4b7/demo/libwabt.js:9:1
vk@https://cdn.rawgit.com/WebAssembly/wabt/aae5a4b7/demo/libwabt.js:9:1
gk@https://cdn.rawgit.com/WebAssembly/wabt/aae5a4b7/demo/libwabt.js:9:1
hk@https://cdn.rawgit.com/WebAssembly/wabt/aae5a4b7/demo/libwabt.js:9:1
vk@https://cdn.rawgit.com/WebAssembly/wabt/aae5a4b7/demo/libwabt.js:9:1
gk@https://cdn.rawgit.com/WebAssembly/wabt/aae5a4b7/demo/libwabt.js:9:1
hk@https://cdn.rawgit.com/WebAssembly/wabt/aae5a4b7/demo/libwabt.js:9:1
vk@https://cdn.rawgit.com/WebAssembly/wabt/aae5a4b7/demo/libwabt.js:9:1
gk@https://cdn.rawgit.com/WebAssembly/wabt/aae5a4b7/demo/libwabt.js:9:1
_j@https://cdn.rawgit.com/WebAssembly/wabt/aae5a4b7/demo/libwabt.js:9:1
lb@https://cdn.rawgit.com/WebAssembly/wabt/aae5a4b7/demo/libwabt.js:12:1
WasmModule.prototype.toText@https://cdn.rawgit.com/WebAssembly/wabt/aae5a4b7/demo/libwabt.js:19:15958
compile/<@https://cdn.rawgit.com/WebAssembly/wabt/aae5a4b7/demo/wasm2wat/demo.js:49:11
If this abort() is unexpected, build with -s ASSERTIONS=1 which can give more information.
```
</details>
|
web demo fails when trying to upload .wasm
|
https://api.github.com/repos/WebAssembly/wabt/issues/908/comments
| 4 |
2018-09-08T19:58:06Z
|
2018-09-11T00:18:23Z
|
https://github.com/WebAssembly/wabt/issues/908
| 358,323,682 | 908 |
[
"WebAssembly",
"wabt"
] |
I'm getting this error when calling `.toText()` on any wasm module:
```
> new WabtModule().readWasm(buffer, {}).toText({})
libwabt.js:90376 Uncaught TypeError: Module._wabt_write_text_module is not a function
at eval (eval at <anonymous> (libwabt.js:90375), <anonymous>:1:1)
at WasmModule.toText (libwabt.js:90375)
```
This is on a beautified version of the 1.0.5 release, and it's pretty clear that the `_wabt_write_text_module` function is not present in the libwabt.js file.
|
libwabt.js: Module._wabt_write_text_module is not a function
|
https://api.github.com/repos/WebAssembly/wabt/issues/904/comments
| 0 |
2018-08-30T00:47:20Z
|
2018-09-13T07:06:18Z
|
https://github.com/WebAssembly/wabt/issues/904
| 355,383,206 | 904 |
[
"WebAssembly",
"wabt"
] |
Referring to https://github.com/WebAssembly/wabt/issues/308#issuecomment-280735411, has there been recommended way for getting (walking) though the parsed result? And what would be the best entry point to wrap in order to use the tool in other languages such as Java?
|
Using wabt tools as a parser
|
https://api.github.com/repos/WebAssembly/wabt/issues/897/comments
| 3 |
2018-08-17T14:41:23Z
|
2019-01-16T06:07:03Z
|
https://github.com/WebAssembly/wabt/issues/897
| 351,621,611 | 897 |
[
"WebAssembly",
"wabt"
] |
This buggy (the global is not not marked as `mut`) wasm program
```
(module
(type $foo.ty (func))
(global $g i32 (i32.const -1))
(func $foo (type $foo.ty)
(set_global $g (i32.const 1))
)
(export "foo" (func $foo))
)
```
compiles to `.wasm`, and that files, passes the `wasm-validate`, but gets rejected by the V8 module validator.
|
Writing to non-mutable global variables passes validator
|
https://api.github.com/repos/WebAssembly/wabt/issues/894/comments
| 2 |
2018-08-15T17:53:11Z
|
2020-03-20T20:34:32Z
|
https://github.com/WebAssembly/wabt/issues/894
| 350,903,619 | 894 |
[
"WebAssembly",
"wabt"
] |
Current version of Google test is using non-standard namespace that is not supported in Visual Studio 2017: google/googletest#1111
Would it be possible to update gtest to newer version? Its current head seems to work without changes to WABT code.
|
third_party/gtest fails to build with Visual Studio
|
https://api.github.com/repos/WebAssembly/wabt/issues/892/comments
| 0 |
2018-08-14T20:39:45Z
|
2018-08-15T21:27:42Z
|
https://github.com/WebAssembly/wabt/issues/892
| 350,589,070 | 892 |
[
"WebAssembly",
"wabt"
] |
I'm currently looking at the short "stuff" example code that the wat2wasm demo website includes, and unless I'm mistaken its invalid?
It defines the start function as idx 1, but in the generated wasm that has the type 1, which is `[] -> [f32]`
|
Example "stuff" in wat2wasm demo is invalid or has conversion bug
|
https://api.github.com/repos/WebAssembly/wabt/issues/885/comments
| 6 |
2018-08-03T12:19:04Z
|
2018-08-03T18:15:45Z
|
https://github.com/WebAssembly/wabt/issues/885
| 347,374,540 | 885 |
[
"WebAssembly",
"wabt"
] |
When executing [this](https://github.com/andoma/vmir/blob/master/examples/prebuilt/sha1sum.wasm) wasm file from the [vmir](https://github.com/andoma/vmir) project, `wasm-interp` fails with:
```
error: unknown import module "env"
000003b: error: OnImportFunc callback failed
```
I'm using [this](https://aur.archlinux.org/packages/wabt/) user-submitted Arch Linux package. Could this be a bug with the package, are any files missing at install-time? Here is a list of the installed files:
```
/usr/bin/spectest-interp
/usr/bin/wabt-unittests
/usr/bin/wasm-interp
/usr/bin/wasm-objdump
/usr/bin/wasm-opcodecnt
/usr/bin/wasm-validate
/usr/bin/wasm2c
/usr/bin/wasm2wat
/usr/bin/wast2json
/usr/bin/wat-desugar
/usr/bin/wat2wasm
```
|
error: OnImportFunc callback failed
|
https://api.github.com/repos/WebAssembly/wabt/issues/883/comments
| 1 |
2018-08-01T11:14:52Z
|
2022-05-19T01:38:13Z
|
https://github.com/WebAssembly/wabt/issues/883
| 346,555,758 | 883 |
[
"WebAssembly",
"wabt"
] |
I'm not great at reading this kind of formal grammar but it looks like I should be able to write this according to the docs here https://webassembly.github.io/spec/core/text/values.html#strings:
```
(module
(memory (import "js" "mem") 1)
(data (i32.const 0) 123))
)
```
However I get the error:
```
test.wat:3:25: error: unexpected token 123, expected ).
(data (i32.const 0) 123))
```
I can workaround by instead doing:
```
(data (i32.const 0) "\7b"))
```
But how come the first one doesn't work?
|
Integer values not allowed in data section
|
https://api.github.com/repos/WebAssembly/wabt/issues/881/comments
| 1 |
2018-07-26T07:17:36Z
|
2019-12-19T10:04:40Z
|
https://github.com/WebAssembly/wabt/issues/881
| 344,723,225 | 881 |
[
"WebAssembly",
"wabt"
] |
Can we have binary releases please?
I'am totaly not into C and I don't even have the required build toolchain installed. Furthermore I do use Windows7. I really would appreciate if you could provide ready to go binaries. I don't know too much about what wabt does, but I need to use it as a build tool chain for another project.
|
Binary Releases
|
https://api.github.com/repos/WebAssembly/wabt/issues/875/comments
| 1 |
2018-07-18T22:56:02Z
|
2018-07-24T20:41:32Z
|
https://github.com/WebAssembly/wabt/issues/875
| 342,520,052 | 875 |
[
"WebAssembly",
"wabt"
] |
I have been unable to find (or guess) how to declare a mutable global variable. Is it really supported? If so, what is the syntax?
Apologies in advance if this is a dense question.
FWIW I could find no examples of syntax for global variables (not imported) at all. I finally guessed it. This works for me.
(global $firstPrime i32 (i32.const 2))
|
Mutable global variables
|
https://api.github.com/repos/WebAssembly/wabt/issues/874/comments
| 2 |
2018-07-15T03:14:08Z
|
2018-07-18T16:23:11Z
|
https://github.com/WebAssembly/wabt/issues/874
| 341,288,294 | 874 |
[
"WebAssembly",
"wabt"
] |
<pre>
options:
-h, --headers Print headers
-j, --section=SECTION Select just one section
-s, --full-contents Print raw section contents
-d, --disassemble Disassemble function bodies
--debug Print extra debug information
-x, --details Show section details
-r, --reloc Show relocations inline with disassembly
-h, --help Print this help message
</pre>
|
The option -h of wasm-objdump is ambiguous
|
https://api.github.com/repos/WebAssembly/wabt/issues/872/comments
| 6 |
2018-07-14T11:42:45Z
|
2018-08-03T04:05:15Z
|
https://github.com/WebAssembly/wabt/issues/872
| 341,230,463 | 872 |
[
"WebAssembly",
"wabt"
] |
wat2wasm doesn't support Unicode names
According to the spec, we should support UTF-8-encoded names:
https://webassembly.github.io/spec/core/syntax/values.html#names
https://webassembly.github.io/spec/core/text/values.html#names
https://webassembly.github.io/spec/core/binary/values.html#names
|
wat2wasm doesn't support Unicode names
|
https://api.github.com/repos/WebAssembly/wabt/issues/871/comments
| 2 |
2018-07-05T06:17:15Z
|
2018-07-05T06:47:49Z
|
https://github.com/WebAssembly/wabt/issues/871
| 338,439,273 | 871 |
[
"WebAssembly",
"wabt"
] |
error:
`CMake Warning at CMakeLists.txt:151 (message):
Error running file on dummy executable`
commond:
`cmake .. -DCMAKE_BUILD_TYPE=DEBUG -DCMAKE_INSTALL_PREFIX=..\bin -G "MinGW Makefiles"`
why?
|
cmake error
|
https://api.github.com/repos/WebAssembly/wabt/issues/870/comments
| 7 |
2018-06-27T04:02:15Z
|
2020-09-03T16:38:06Z
|
https://github.com/WebAssembly/wabt/issues/870
| 336,069,543 | 870 |
[
"WebAssembly",
"wabt"
] |
I believe this: https://github.com/WebAssembly/wabt/blob/master/wasm2c/wasm-rt-impl.c#L106 is missing ` * PAGE_SIZE` and should read `memory->data = realloc(memory->data, new_pages * PAGE_SIZE);`
|
missing PAGE_SIZE
|
https://api.github.com/repos/WebAssembly/wabt/issues/868/comments
| 1 |
2018-06-25T21:40:19Z
|
2018-09-13T07:08:11Z
|
https://github.com/WebAssembly/wabt/issues/868
| 335,578,091 | 868 |
[
"WebAssembly",
"wabt"
] |
https://github.com/WebAssembly/wabt/blob/b83e670d5287856d02377609d1ce11a66640f7f9/src/binary-reader-logging.cc#L514
Shouldn't the call to OnGlobalSymbol() at line 514 actually read OnFunctionSymbol()?
|
Call to wrong delegate function?
|
https://api.github.com/repos/WebAssembly/wabt/issues/866/comments
| 1 |
2018-06-25T18:10:26Z
|
2018-06-25T21:49:41Z
|
https://github.com/WebAssembly/wabt/issues/866
| 335,512,212 | 866 |
[
"WebAssembly",
"wabt"
] |
Build fails on OpenBSD (and other BSDs) because of the check for alloca.
|
error no alloca
|
https://api.github.com/repos/WebAssembly/wabt/issues/864/comments
| 0 |
2018-06-18T11:43:42Z
|
2018-06-18T18:06:00Z
|
https://github.com/WebAssembly/wabt/issues/864
| 333,235,321 | 864 |
[
"WebAssembly",
"wabt"
] |
I'm tring to convert wasm to wat, but i get following error:
**ReferenceError: module is not defined**
My function is:
`function wasm2wat2(wasmLink) {
if (wasmLink == null) {
return null;
}
var Module = {};
var wasmBinary;
let finalResult;;
fetch(wasmLink)
.then(buffer => {
console.log(buffer);
try {
let contents = Uint8Array.from(buffer, (x) => x.charCodeAt(0));
log(contents);
var module = wabt.readWasm(contents, {
readDebugNames: true
});
module.generateNames();
module.applyNames();
let result =
module.toText({
foldExprs: true,
inlineExport: true
});
console.log("!!!!!!!!!!!!!!!!!!!!!!!!!:" + result.length);
finalResult = result;
} catch (e) {
console.log(e.toString());
} finally {
if (module) module.destroy();
}
log(finalResult);
return finalResult;
})
.catch(err => console.error(err)); // Never forget the final catch!
return finalResult;
/* var wat = getContent("https://example.com/dev/wasm/web.wat");
return wat;*/
}`
can you please tell me, what i am doing false?
|
wasm2wat issue
|
https://api.github.com/repos/WebAssembly/wabt/issues/863/comments
| 1 |
2018-06-17T19:43:29Z
|
2020-12-15T09:24:01Z
|
https://github.com/WebAssembly/wabt/issues/863
| 333,087,658 | 863 |
[
"WebAssembly",
"wabt"
] |
I have tried to compile WABT tools, but no luck until now.
I have cloned git repo, then cmake and make
after cmake seems to be ok, but it stops on wasm2c with below error
[ 89%] Linking CXX executable wasm2c
/usr/bin/ld: cannot open output file wasm2c: Is a directory
collect2: error: ld returned 1 exit status
CMakeFiles/wasm2c.dir/build.make:121: recipe for target 'wasm2c' failed
make[2]: *** [wasm2c] Error 1
CMakeFiles/Makefile2:930: recipe for target 'CMakeFiles/wasm2c.dir/all' failed
make[1]: *** [CMakeFiles/wasm2c.dir/all] Error 2
Makefile:129: recipe for target 'all' failed
make: *** [all] Error 2
I am on Linux 4.13.0-39-generic #44-Ubuntu x86_64 GNU/Linux
cmake version 3.9.1
clang version 5.0.0 (emscripten 1.37.36 : 1.37.36)
GNU Make 4.1
Any help please?
|
Compilation problem
|
https://api.github.com/repos/WebAssembly/wabt/issues/859/comments
| 2 |
2018-06-05T18:37:13Z
|
2018-06-05T20:08:03Z
|
https://github.com/WebAssembly/wabt/issues/859
| 329,576,706 | 859 |
[
"WebAssembly",
"wabt"
] |
The warning: `-Werror=class-memaccess`
How to reproduce:
- Have a GCC 8 (possibly 8.1)
- Set up a cmake build manually (make a subdirectory, `cmake ..` in it)
- `make`
Terminal output:
```
.../wabt> cd mybuild/
.../wabt/mybuild> cmake ..
-- The C compiler identification is GNU 8.1.0
-- The CXX compiler identification is GNU 8.1.0
-- Check for working C compiler: /usr/lib/ccache/bin/cc
-- Check for working C compiler: /usr/lib/ccache/bin/cc -- 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/lib/ccache/bin/c++
-- Check for working CXX compiler: /usr/lib/ccache/bin/c++ -- 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 sysconf
-- Looking for sysconf - 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
-- Using prebuilt re2c lexer
-- 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
-- Found PythonInterp: /usr/bin/python2.7 (found suitable version "2.7.15", minimum required is "2.7")
-- Configuring done
-- Generating done
-- Build files have been written to: /home/marvin/dev/rust/wasm/wabt/mybuild
marvin@tp-marvin-arch ~/d/r/w/w/mybuild> make
Scanning dependencies of target libgtest
[ 1%] Building CXX object CMakeFiles/libgtest.dir/third_party/gtest/googletest/src/gtest-all.cc.o
[ 2%] Linking CXX static library liblibgtest.a
[ 2%] Built target libgtest
Scanning dependencies of target libwabt
[ 3%] Building CXX object CMakeFiles/libwabt.dir/src/token.cc.o
[ 5%] Building CXX object CMakeFiles/libwabt.dir/src/opcode.cc.o
[ 6%] Building CXX object CMakeFiles/libwabt.dir/src/error-handler.cc.o
[ 7%] Building CXX object CMakeFiles/libwabt.dir/src/hash-util.cc.o
[ 9%] Building CXX object CMakeFiles/libwabt.dir/src/filenames.cc.o
[ 10%] Building CXX object CMakeFiles/libwabt.dir/src/string-view.cc.o
[ 11%] Building CXX object CMakeFiles/libwabt.dir/src/ir.cc.o
[ 12%] Building CXX object CMakeFiles/libwabt.dir/src/expr-visitor.cc.o
[ 14%] Building CXX object CMakeFiles/libwabt.dir/src/lexer-source.cc.o
[ 15%] Building CXX object CMakeFiles/libwabt.dir/src/lexer-source-line-finder.cc.o
[ 16%] Building CXX object CMakeFiles/libwabt.dir/src/wast-parser-lexer-shared.cc.o
[ 18%] Building CXX object CMakeFiles/libwabt.dir/src/prebuilt/wast-lexer-gen.cc.o
[ 19%] Building CXX object CMakeFiles/libwabt.dir/src/wast-parser.cc.o
[ 20%] Building CXX object CMakeFiles/libwabt.dir/src/type-checker.cc.o
[ 22%] Building CXX object CMakeFiles/libwabt.dir/src/validator.cc.o
[ 23%] Building CXX object CMakeFiles/libwabt.dir/src/binary-reader.cc.o
[ 24%] Building CXX object CMakeFiles/libwabt.dir/src/binary-reader-logging.cc.o
[ 25%] Building CXX object CMakeFiles/libwabt.dir/src/binary-writer.cc.o
[ 27%] Building CXX object CMakeFiles/libwabt.dir/src/binary-writer-spec.cc.o
[ 28%] Building CXX object CMakeFiles/libwabt.dir/src/binary-reader-ir.cc.o
[ 29%] Building CXX object CMakeFiles/libwabt.dir/src/binding-hash.cc.o
[ 31%] Building CXX object CMakeFiles/libwabt.dir/src/wat-writer.cc.o
[ 32%] Building CXX object CMakeFiles/libwabt.dir/src/interp.cc.o
[ 33%] Building CXX object CMakeFiles/libwabt.dir/src/binary-reader-interp.cc.o
[ 35%] Building CXX object CMakeFiles/libwabt.dir/src/apply-names.cc.o
[ 36%] Building CXX object CMakeFiles/libwabt.dir/src/generate-names.cc.o
[ 37%] Building CXX object CMakeFiles/libwabt.dir/src/resolve-names.cc.o
[ 38%] Building CXX object CMakeFiles/libwabt.dir/src/binary.cc.o
[ 40%] Building CXX object CMakeFiles/libwabt.dir/src/color.cc.o
[ 41%] Building CXX object CMakeFiles/libwabt.dir/src/common.cc.o
[ 42%] Building CXX object CMakeFiles/libwabt.dir/src/config.cc.o
[ 44%] Building CXX object CMakeFiles/libwabt.dir/src/feature.cc.o
[ 45%] Building CXX object CMakeFiles/libwabt.dir/src/leb128.cc.o
[ 46%] Building CXX object CMakeFiles/libwabt.dir/src/literal.cc.o
[ 48%] Building CXX object CMakeFiles/libwabt.dir/src/option-parser.cc.o
[ 49%] Building CXX object CMakeFiles/libwabt.dir/src/stream.cc.o
[ 50%] Building CXX object CMakeFiles/libwabt.dir/src/tracing.cc.o
[ 51%] Building CXX object CMakeFiles/libwabt.dir/src/utf8.cc.o
[ 53%] Linking CXX static library libwabt.a
[ 53%] Built target libwabt
Scanning dependencies of target wabt-unittests
[ 54%] Building CXX object CMakeFiles/wabt-unittests.dir/src/test-circular-array.cc.o
[ 55%] Building CXX object CMakeFiles/wabt-unittests.dir/src/test-intrusive-list.cc.o
[ 57%] Building CXX object CMakeFiles/wabt-unittests.dir/src/test-literal.cc.o
[ 58%] Building CXX object CMakeFiles/wabt-unittests.dir/src/test-string-view.cc.o
[ 59%] Building CXX object CMakeFiles/wabt-unittests.dir/src/test-filenames.cc.o
[ 61%] Building CXX object CMakeFiles/wabt-unittests.dir/src/test-utf8.cc.o
[ 62%] Building CXX object CMakeFiles/wabt-unittests.dir/src/test-wast-parser.cc.o
[ 63%] Building CXX object CMakeFiles/wabt-unittests.dir/third_party/gtest/googletest/src/gtest_main.cc.o
[ 64%] Linking CXX executable wabt-unittests
[ 64%] Built target wabt-unittests
Scanning dependencies of target wabt-unittests-copy-to-bin
[ 64%] Built target wabt-unittests-copy-to-bin
Scanning dependencies of target hexfloat_test
[ 66%] Building CXX object CMakeFiles/hexfloat_test.dir/src/literal.cc.o
[ 67%] Building CXX object CMakeFiles/hexfloat_test.dir/src/test-hexfloat.cc.o
[ 68%] Building CXX object CMakeFiles/hexfloat_test.dir/third_party/gtest/googletest/src/gtest_main.cc.o
[ 70%] Linking CXX executable hexfloat_test
[ 70%] Built target hexfloat_test
Scanning dependencies of target wat-desugar
[ 71%] Building CXX object CMakeFiles/wat-desugar.dir/src/tools/wat-desugar.cc.o
[ 72%] Linking CXX executable wat-desugar
[ 72%] Built target wat-desugar
Scanning dependencies of target wat-desugar-copy-to-bin
[ 72%] Built target wat-desugar-copy-to-bin
Scanning dependencies of target spectest-interp
[ 74%] Building CXX object CMakeFiles/spectest-interp.dir/src/tools/spectest-interp.cc.o
/home/marvin/dev/rust/wasm/wabt/src/tools/spectest-interp.cc: In function ‘wabt::interp::Result spectest::DefaultHostCallback(const wabt::interp::HostFunc*, const wabt::interp::FuncSignature*, wabt::Index, wabt::interp::TypedValue*, wabt::Index, wabt::interp::TypedValue*, void*)’:
/home/marvin/dev/rust/wasm/wabt/src/tools/spectest-interp.cc:828:58: error: ‘void* memset(void*, int, size_t)’ clearing an object of non-trivial type ‘struct wabt::interp::TypedValue’; use assignment or value-initialization instead [-Werror=class-memaccess]
memset(out_results, 0, sizeof(TypedValue) * num_results);
^
In file included from /home/marvin/dev/rust/wasm/wabt/src/tools/spectest-interp.cc:31:
/home/marvin/dev/rust/wasm/wabt/src/interp.h:148:8: note: ‘struct wabt::interp::TypedValue’ declared here
struct TypedValue {
^~~~~~~~~~
cc1plus: all warnings being treated as errors
make[2]: *** [CMakeFiles/spectest-interp.dir/build.make:63: CMakeFiles/spectest-interp.dir/src/tools/spectest-interp.cc.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:333: CMakeFiles/spectest-interp.dir/all] Error 2
make: *** [Makefile:130: all] Error 2
```
|
Build error due `-Werror=class-memaccess` in GCC 8.1
|
https://api.github.com/repos/WebAssembly/wabt/issues/857/comments
| 0 |
2018-06-05T15:03:40Z
|
2018-06-05T20:52:47Z
|
https://github.com/WebAssembly/wabt/issues/857
| 329,498,822 | 857 |
[
"WebAssembly",
"wabt"
] |
Could I ask a quick question about the [interpreter](https://github.com/WebAssembly/wabt/blob/409d61ef5d485ae2ce783968f290050840e87a22/src/interp.cc)?
It handles `Br` and `BrIf` opcodes by adjusting the program counter (`pc`). The specification for [control instructions](https://webassembly.github.io/spec/core/syntax/instructions.html#control-instructions) says that "[t]aking a branch *unwinds* the operand stack up to the height where the targeted structured control instruction was entered". This unwinding is [formalized](https://webassembly.github.io/spec/core/exec/instructions.html#control-instructions) by repeatedly popping the stack according to the provided label index.
Where is this unwinding happening in wabt? Thank you for your time!
|
Unwinding of Branches and Loops
|
https://api.github.com/repos/WebAssembly/wabt/issues/854/comments
| 2 |
2018-06-04T18:05:40Z
|
2018-09-13T07:46:02Z
|
https://github.com/WebAssembly/wabt/issues/854
| 329,159,710 | 854 |
[
"WebAssembly",
"wabt"
] |
Not quite sure what's failing here, though maybe I'm doing something weird w/ `--pre-js`:
See [this travis failure](https://travis-ci.org/WebAssembly/wabt/jobs/387896293) for example.
```
Assertion failed: could not find the assigment to "asmLibraryArg". perhaps
--pre-js or --post-js code moved it out of the global scope? (things like that
should be done after emcc runs, as they do not need to be run through the
optimizer which is the special thing about --pre-js/--post-js code)
```
@kripken, any clues?
|
Emscripten travis failure
|
https://api.github.com/repos/WebAssembly/wabt/issues/853/comments
| 2 |
2018-06-04T17:50:14Z
|
2018-09-13T07:45:28Z
|
https://github.com/WebAssembly/wabt/issues/853
| 329,154,961 | 853 |
[
"WebAssembly",
"wabt"
] |
wast2json returns errors on instructions `memory.grow` and `memory.size`. Errors look like the following when run on the official test suite file memory.wast.
```
$ wast2json memory.wast -o memory.json
memory.wast:11:64: error: unexpected token "memory.size", expected an instr.
(module (memory (data)) (func (export "memsize") (result i32) (memory.size)))
^^^^^^^^^^^
memory.wast:13:67: error: unexpected token "memory.size", expected an instr.
(module (memory (data "")) (func (export "memsize") (result i32) (memory.size)))
^^^^^^^^^^^
memory.wast:15:68: error: unexpected token "memory.size", expected an instr.
...ule (memory (data "x")) (func (export "memsize") (result i32) (memory.size)))
^^^^^^^^^^^
memory.wast:39:24: error: unexpected token "memory.size", expected an expr.
(module (func (drop (memory.size))))
^^^^^^^^^^^
memory.wast:43:12: error: unexpected token "func", expected an instr.
(module (func (drop (memory.grow (i32.const 0)))))
^^^^
memory.wast:43:24: error: unexpected token memory.grow.
(module (func (drop (memory.grow (i32.const 0)))))
```
Similar errors for the following files from the official test suite.
br.wast
br_table.wast
imports.wast
linking.wast
memory_trap.wast
memory.wast
nop.wast
resizing.wast
return.wast
typecheck.wast
unreachable.wast
|
wast2json errors for memory.grow and memory.size
|
https://api.github.com/repos/WebAssembly/wabt/issues/852/comments
| 2 |
2018-06-02T18:59:19Z
|
2018-06-02T19:38:31Z
|
https://github.com/WebAssembly/wabt/issues/852
| 328,768,721 | 852 |
[
"WebAssembly",
"wabt"
] |
When I build wabt with `make clang-release-msan`, and run `wasm2wat` against almost any other files (e.g., `./wasm2wat ./CMakeCache.txt`), MSan reports use of uninitialized value such as:
```
Uninitialized bytes in __interceptor_strlen at offset 16 inside [0x702000000380, 17)
==23518==WARNING: MemorySanitizer: use-of-uninitialized-value
#0 0x4c5425 in std::char_traits<char>::length(char const*) /usr/bin/../lib/gcc/x86_64-linux-gnu/8.0.1/../../../../include/c++/8.0.1/bits/char_traits.h:320:9
#1 0x4c5425 in wabt::string_view::string_view(char const*) /home/hongxu/tests/wabt/src/string-view.h:196
#2 0x4c5425 in ProgramMain(int, char**) /home/hongxu/tests/wabt/src/tools/wasm2wat.cc:108
#3 0x4c5e43 in main /home/hongxu/tests/wabt/src/tools/wasm2wat.cc:148:10
#4 0x7f7044e5bb96 in __libc_start_main /build/glibc-OTsEL5/glibc-2.27/csu/../csu/libc-start.c:310
#5 0x4489c9 in _start (/home/hongxu/tests/wabt/out/clang/Release/msan/wasm2wat+0x4489c9)
SUMMARY: MemorySanitizer: use-of-uninitialized-value /usr/bin/../lib/gcc/x86_64-linux-gnu/8.0.1/../../../../include/c++/8.0.1/bits/char_traits.h:320:9 in std::char_traits<char>::length(char const*)
Exiting
```
```
$ clang --version
clang version 6.0.1-svn332782-1~exp1~20180520222702.86 (branches/release_60)
Target: x86_64-pc-linux-gnu
Thread model: posix
InstalledDir: /usr/bin
```
Any hints what's happening?
|
MSan reported use of uninitialized value
|
https://api.github.com/repos/WebAssembly/wabt/issues/850/comments
| 2 |
2018-05-28T03:47:52Z
|
2018-05-28T04:26:36Z
|
https://github.com/WebAssembly/wabt/issues/850
| 326,887,233 | 850 |
[
"WebAssembly",
"wabt"
] |
wat2wasm enforces that imports are the first fields within a module. However the [specification states that](http://webassembly.github.io/spec/core/text/modules.html#text-module):
> A module consists of a sequence of fields that can occur in any order.
|
"error: imports must occur before all non-import definitions" is not spec compliant
|
https://api.github.com/repos/WebAssembly/wabt/issues/847/comments
| 3 |
2018-05-25T19:19:38Z
|
2018-09-13T07:45:49Z
|
https://github.com/WebAssembly/wabt/issues/847
| 326,636,007 | 847 |
[
"WebAssembly",
"wabt"
] |
--- token.h
// Tokens with Literal data.
Float,
Int,
Nat,
--- token.cc
// Literal.
"FLOAT",
"NAT",
"INT",
"NAT" and "INT" have been changed.
|
Some TokenType names do not match.
|
https://api.github.com/repos/WebAssembly/wabt/issues/844/comments
| 1 |
2018-05-20T07:39:21Z
|
2018-05-21T23:28:41Z
|
https://github.com/WebAssembly/wabt/issues/844
| 324,690,383 | 844 |
[
"WebAssembly",
"wabt"
] |
When running `wasm2wat` on Rust-generated WASM, I get an error:
```
wasm2wat --fold-exprs --generate-names --inline-exports --ignore-custom-section-errors --no-check -o /tmp/out.wat target/wasm32-unknown-unknown/release/playground.wasm.gc
002e818: error: invalid linking metadata version: 3
```
[playground.wasm.zip](https://github.com/WebAssembly/wabt/files/2010022/playground.zip)
The ` --ignore-custom-section-errors ` flag doesn't seem to take effect; perhaps I'm doing something wrong?
I'm using:
- `rustc 1.27.0-nightly (f0fdaba04 2018-05-15)`
- Commit dd7663d78bf483308cd8d70d114748321f2cd61f
(moved from comments on #841)
|
"invalid linking metadata version: 3" when running against Rust-generated WASM
|
https://api.github.com/repos/WebAssembly/wabt/issues/842/comments
| 11 |
2018-05-16T16:46:11Z
|
2018-06-14T17:56:42Z
|
https://github.com/WebAssembly/wabt/issues/842
| 323,702,124 | 842 |
[
"WebAssembly",
"wabt"
] |
I'm compiling Rust code to wasm, and I'm getting the leb128 issue with wasm-validate.
Rust code:
#[no_mangle]
pub extern "C" fn test(n: i32) -> i32 {
n
}
I'm using the latest wabt master branch as of today, and a Rust May 9, 2018 nightly.
$ cargo build --release --target wasm32-unknown-unknown
$ wasm-validate target/wasm32-unknown-unknown/release/test.wasm
Has LLVM perhaps been updated to use a different format? Maybe wabt is expecting an older format?
|
0000099: error: unable to read u32 leb128: stack pointer index
|
https://api.github.com/repos/WebAssembly/wabt/issues/838/comments
| 10 |
2018-05-14T19:45:53Z
|
2018-05-15T17:31:54Z
|
https://github.com/WebAssembly/wabt/issues/838
| 322,954,619 | 838 |
[
"WebAssembly",
"wabt"
] |

wasm2wat works before [1.0.1](https://github.com/WebAssembly/wabt/releases/tag/1.0.1).
|
wasm2wat not work with rust
|
https://api.github.com/repos/WebAssembly/wabt/issues/836/comments
| 5 |
2018-05-11T18:08:12Z
|
2018-05-14T19:10:03Z
|
https://github.com/WebAssembly/wabt/issues/836
| 322,386,129 | 836 |
[
"WebAssembly",
"wabt"
] |
I'm debugging a Wasm compile error in a specific function. It'd be nice to be able to limit the disassembly dump to only a specific function or functions. For example:
```
wasm-objdump -d out.wasm --functions=13,64
```
This would only show the disassembly for functions 13 and 64. For bonus points, it'd be nice to be able to specify their name if a names section is present.
|
wasm-objdump should have a way to only show specific functions
|
https://api.github.com/repos/WebAssembly/wabt/issues/828/comments
| 0 |
2018-04-10T18:16:36Z
|
2020-03-20T20:34:59Z
|
https://github.com/WebAssembly/wabt/issues/828
| 313,035,314 | 828 |
[
"WebAssembly",
"wabt"
] |
The implementation of the `OnLocalDecl` callback used in `BinaryReader::ReadCodeSection` does not ensure that there are positive local declarations. `0` is a valid `ReadU32Leb128` input when filling out the vector pairs in `current_func_->local_types`. This wouldn't be a problem if it weren't for the way the custom iterator of the `LocalTypes` struct in `ir.h`. Usually, the `LocalTypes.decls` vector contains `Index` values of `1` and `2` and so on, and the `LocalTypes::const_iterator` behaves well. If the vector contains `0` and `2`, however, the loop in `WatWriter::WriteTypeBindings` will loop too many times due to the disagreement between the number of elements in the `for : each` loop, the `++index`, and the size of the `index_to_name_` derived from the invalid `types.size()`. The line
```
const std::string& name = index_to_name_[index];
```
will assign to an index out of bounds for `index_to_name_` (incorrectly resized by `MakeTypeBindingReverseMapping`) causing undefined behavior, usually a `SEGFAULT`.
The attached wasm file will crash wasm2wat.
[wasm2wat-crash-zero-localtypes.zip](https://github.com/WebAssembly/wabt/files/1892971/wasm2wat-crash-zero-localtypes.zip)
|
wasm2wat: OnLocalDecl callback does not enforce nonzero values
|
https://api.github.com/repos/WebAssembly/wabt/issues/826/comments
| 3 |
2018-04-10T05:34:04Z
|
2018-04-10T22:24:05Z
|
https://github.com/WebAssembly/wabt/issues/826
| 312,778,785 | 826 |
[
"WebAssembly",
"wabt"
] |
The type mangling map in c-writer.cc does not support the V128 type in the following code:
```
static char CWriter::MangleType(Type type) {
switch (type) {
case Type::I32: return 'i';
case Type::I64: return 'j';
case Type::F32: return 'f';
case Type::F64: return 'd';
default: WABT_UNREACHABLE;
}
}
```
However, the binary reader considers the V128 type valid and will parse it just fine (passes the `is_concrete_type` check with a value of `-0x5`).
```
static bool is_concrete_type(Type type) {
switch (type) {
case Type::I32:
case Type::I64:
case Type::F32:
case Type::F64:
case Type::V128:
return true;
default:
return false;
}
}
```
This causes wasm2c to SEGFAULT when attempting to append `__builtin_unreachable()` to a `std::string`. If the code does not fault (not debug, no stack checks, etc) undefined behavior occurs, usually still resulting in a SEGFAULT, but much more dangerously.
The small wasm file attached exercises this problem and crashes wasm2c.
[wasm2c-crash-v128.zip](https://github.com/WebAssembly/wabt/files/1878400/wasm2c-crash-v128.zip)
|
wasm2c: Type Mangling does not support V128, causing SEGFAULT
|
https://api.github.com/repos/WebAssembly/wabt/issues/823/comments
| 3 |
2018-04-05T02:32:08Z
|
2018-04-07T02:35:27Z
|
https://github.com/WebAssembly/wabt/issues/823
| 311,453,006 | 823 |
[
"WebAssembly",
"wabt"
] |
git clone'd
cd'd into dir
`make`
`unable to find stddef.h`
what are the dependencies for this?
Ubuntu 17.10
|
Unable to compile with make
|
https://api.github.com/repos/WebAssembly/wabt/issues/822/comments
| 5 |
2018-04-03T03:57:12Z
|
2018-11-06T19:25:51Z
|
https://github.com/WebAssembly/wabt/issues/822
| 310,685,897 | 822 |
[
"WebAssembly",
"wabt"
] |
Wasm2wat spent several tens of seconds to parse and more than 6GB of RAM before reporting failure.
```
AGFzbQEAAAABDANgAAF9YAABf2AAAAMGBQABAgICBQQBAQEBBzcFCGYzMi5sb2FkAAAIaTMyLmxv
YWQAAQlmMzIuc3RvcmUAAglpMzIuc3RvcmUAAwVyZXNldAAECjYFB37zpf61DH3rop4IXXkDaaD5
6JHNjjpK64pBqXg6oID5JfAjsJdPJjZphD7uqVcvZBtuIs8GHIJNwJ6XmpWPyKx/AuGsYOyfDwcq
UjAvpYjrvNqj3AIACwkAQQBB/zYCAAsLCgG9QQALBAEAQes=
```
Log:
```
BeginModule(version: 1)
BeginTypeSection(12)
OnTypeCount(3)
OnType(index: 0, params: [], results: [f32])
OnType(index: 1, params: [], results: [i32])
OnType(index: 2, params: [], results: [])
EndTypeSection
BeginFunctionSection(6)
OnFunctionCount(5)
OnFunction(index: 0, sig_index: 0)
OnFunction(index: 1, sig_index: 1)
OnFunction(index: 2, sig_index: 2)
OnFunction(index: 3, sig_index: 2)
OnFunction(index: 4, sig_index: 2)
EndFunctionSection
BeginMemorySection(4)
OnMemoryCount(1)
OnMemory(index: 0, initial: 1, max: 1)
EndMemorySection
BeginExportSection(55)
OnExportCount(5)
OnExport(index: 0, kind: func, item_index: 0, name: "f32.load")
OnExport(index: 1, kind: func, item_index: 1, name: "i32.load")
OnExport(index: 2, kind: func, item_index: 2, name: "f32.store")
OnExport(index: 3, kind: func, item_index: 3, name: "i32.store")
OnExport(index: 4, kind: func, item_index: 4, name: "reset")
EndExportSection
BeginCodeSection(54)
OnFunctionBodyCount(5)
BeginFunctionBody(0)
OnLocalDeclCount(126)
OnLocalDecl(index: 0, count: 3334443763, type: f32)
000006d: error: expected valid local type
```
Not sure that it is concern for a developer tool such as wabt, is it?
|
Invalid module takes a lot of time and memory to validate.
|
https://api.github.com/repos/WebAssembly/wabt/issues/819/comments
| 0 |
2018-03-27T09:44:34Z
|
2018-03-28T20:43:25Z
|
https://github.com/WebAssembly/wabt/issues/819
| 308,895,986 | 819 |
[
"WebAssembly",
"wabt"
] |
Hi,
I understand libwabt.js is essentially wabt run through Emscripten, but it looks like a pretty handy little JS lib itself. I can see myself using it for some things and I suspect I'm not alone. I think it would be kind of great if libwabt.js was a separate repo (or CDN even) people can use to play around with.
Just a thought. Cool stuff 👍
PS: This thought is motivated by some experimental work compiling Julia to wasm https://github.com/MikeInnes/Charlotte.jl and I'm thinking about how to make it interactive, e.g. via WebSockets or something, e.g. generate .wat files and send them to a browser. Better solution is to write a wabt wrapper in Julia and that will happen eventually 😊 I can think of many other educational purposes for libwabt.js as well like the existing demos.
|
Consider a separate repo for libwabt.js?
|
https://api.github.com/repos/WebAssembly/wabt/issues/818/comments
| 3 |
2018-03-25T03:31:43Z
|
2018-03-27T06:41:46Z
|
https://github.com/WebAssembly/wabt/issues/818
| 308,319,102 | 818 |
[
"WebAssembly",
"wabt"
] |
It'd be helpful in debugging generated Wasm code. It doesn't have to be wasm-objdump, but that seems like the most logical tool.
|
wasm-objdump should have a way to show locals declared in a function
|
https://api.github.com/repos/WebAssembly/wabt/issues/807/comments
| 1 |
2018-03-14T21:43:10Z
|
2018-03-16T22:07:56Z
|
https://github.com/WebAssembly/wabt/issues/807
| 305,339,827 | 807 |
[
"WebAssembly",
"wabt"
] |
```
$ make
.....
Scanning dependencies of target libwabt
[ 1%] Building CXX object CMakeFiles/libwabt.dir/src/token.cc.o
In file included from /Users/sam/wasm/wabt/src/token.cc:17:
/Users/sam/itt/wasm/wabt/src/token.h:20:10: fatal error: 'string' file not found
#include <string>
^~~~~~~~
1 error generated.
make[3]: *** [CMakeFiles/libwabt.dir/src/token.cc.o] Error 1
make[2]: *** [CMakeFiles/libwabt.dir/all] Error 2
make[1]: *** [all] Error 2
make: *** [clang-debug] Error 2
```
How to fix it?
cmake version: 3.8.0
mac version: 10.13.3 High Sierra
|
fatal error: 'string' file not found
|
https://api.github.com/repos/WebAssembly/wabt/issues/805/comments
| 15 |
2018-03-12T14:21:58Z
|
2022-05-19T01:36:49Z
|
https://github.com/WebAssembly/wabt/issues/805
| 304,391,439 | 805 |
[
"WebAssembly",
"wabt"
] |
Hi all,
how to install wabt on windows 10 ?
i tried following
git clone --recursive https://github.com/WebAssembly/wabt
mkdir build
cd build
c:\users\myusername\wabt -DCMAKE_BUILD_TYPE=RELEASE -DCMAKE_INSTALL_PREFIX=c:\users\myusername\build\bin -G "Visual Studio 15 2017"
cmake --build c:\users\myusername\wabt --config RELEASE --target install
Error: could not load cache
need help, thank you
|
windows 10 VS2017 wabt installation
|
https://api.github.com/repos/WebAssembly/wabt/issues/804/comments
| 2 |
2018-03-12T10:06:39Z
|
2019-02-16T09:43:43Z
|
https://github.com/WebAssembly/wabt/issues/804
| 304,307,865 | 804 |
[
"WebAssembly",
"wabt"
] |
```
AGFzbQEAAAABBAFgAAADAgEAChABDgBCgICAgICAgID/fhoL
```
This file is successfully loaded by the spec interpreter and binaryen.
But wasm2wat reports an error:
```
0000018: error: unable to read i64 leb128: i64.const value
```
|
i64.const value couldn't read
|
https://api.github.com/repos/WebAssembly/wabt/issues/799/comments
| 4 |
2018-03-08T21:43:23Z
|
2018-03-16T22:08:47Z
|
https://github.com/WebAssembly/wabt/issues/799
| 303,642,933 | 799 |
[
"WebAssembly",
"wabt"
] |
Hello,
I am trying to run an exported function of WASM binary and following is the
error I am getting. What am I doing wrong? Any help appreciated.
```
$wasm-interp ../../hello.wasm
error: unknown import module "env"
0000083: error: OnImportMemory callback failed
$wasm-interp ../../hello.wasm --run-all-exports --trace
error: unknown import module "env"
0000083: error: OnImportMemory callback failed
```
|
How to run/test exported function of WASM binary using wasm-interp?
|
https://api.github.com/repos/WebAssembly/wabt/issues/798/comments
| 7 |
2018-03-07T22:58:03Z
|
2022-05-19T01:36:13Z
|
https://github.com/WebAssembly/wabt/issues/798
| 303,291,772 | 798 |
[
"WebAssembly",
"wabt"
] |
Hi, I believe wast2wasm should be part of wabt? https://github.com/Hanks10100/wasm-examples/tree/master/simple uses it, but wast2wasm doesn't exist in the wabt I built (latest GitHub)...
(new to WebAssembly)
|
wast2wasm not found
|
https://api.github.com/repos/WebAssembly/wabt/issues/777/comments
| 2 |
2018-02-28T10:52:42Z
|
2018-03-16T22:09:25Z
|
https://github.com/WebAssembly/wabt/issues/777
| 300,977,973 | 777 |
[
"WebAssembly",
"wabt"
] |
For the following module spec interpreter reports OK, but `wasm2wat` reports
```
000000a: error: unable to read u32 leb128: string length
```
base64:
```
AGFzbQEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAQAHAAA=
```
i'm not sure who is culprit in this case, so cc @rossberg
|
spec/wabt behavior difference
|
https://api.github.com/repos/WebAssembly/wabt/issues/762/comments
| 5 |
2018-02-15T23:30:14Z
|
2018-02-21T02:11:56Z
|
https://github.com/WebAssembly/wabt/issues/762
| 297,634,414 | 762 |
[
"WebAssembly",
"wabt"
] |
Fuzzer come up with a such module (base64 form)
```
AGFzbQEAAAAAKAoAAABhcycAAABtAQAAACYBAAAAAC8AAAAAYXNtAQAAAABhc20BAAcHB/////EHBwcHAAA=
```
Running it makes my test machine to blow up:
```
$ echo "AGFzbQEAAAAAKAoAAABhcycAAABtAQAAACYBAAAAAC8AAAAAYXNtAQAAAABhc20BAAcHB/////EHBwcHAAA=" | base64 -d > ~/test.wasm
$ wasm2wat ~/test.wasm
terminate called after throwing an instance of 'std::bad_alloc'
what(): std::bad_alloc
Aborted
```
it has 2GB of RAM + 4GB of swap.
I understand that this is quite degenerate case, so I'm wondering is it in scope for this project to handle such fails gracefully?
|
Small module makes wabt to do an enourmous allocation
|
https://api.github.com/repos/WebAssembly/wabt/issues/760/comments
| 14 |
2018-02-15T21:59:13Z
|
2018-03-28T23:05:12Z
|
https://github.com/WebAssembly/wabt/issues/760
| 297,611,396 | 760 |
[
"WebAssembly",
"wabt"
] |
It seems that wabt by default (i.e. without any options) successfully validates modules that have non MVP features, e.g. this one:
```WebAssembly
(module
(memory 1 1 shared)
)
```
However, features (at least in wabt options) are looks like opt-in:
```
--enable-exceptions Experimental exception handling
--enable-saturating-float-to-int Saturating float-to-int operators
--enable-threads Threading support
--enable-simd SIMD support
```
So, I'm wondering is it intended?
|
wabt validates memory with `shared` flag with default options.
|
https://api.github.com/repos/WebAssembly/wabt/issues/754/comments
| 1 |
2018-02-13T11:40:01Z
|
2018-02-13T19:37:30Z
|
https://github.com/WebAssembly/wabt/issues/754
| 296,707,209 | 754 |
[
"WebAssembly",
"wabt"
] |
Here is a binary
https://github.com/pepyakin/wasmi/files/1708839/livesplit_core.zip
afc3f3a8
```
* thread #1, queue = 'com.apple.main-thread', stop reason = EXC_BAD_ACCESS (code=2, address=0x7fff5f3fff30)
* frame #0: 0x0000000100035679 wasm2wat`wabt::TypeChecker::PushLabel(this=<unavailable>, label_type=<unavailable>, sig=<unavailable>) at type-checker.cc:75
frame #1: 0x00000001000391e4 wasm2wat`wabt::TypeChecker::OnBlock(this=0x00007fff5fbfef30, sig=0x000000010076a288 size=1) at type-checker.cc:325
frame #2: 0x000000010004216a wasm2wat`wabt::(anonymous namespace)::Validator::CheckExpr(this=0x00007fff5fbfeee0, expr=0x000000010076a230) at validator.cc:494
frame #3: 0x00000001000419f1 wasm2wat`wabt::(anonymous namespace)::Validator::CheckExprList(this=0x00007fff5fbfeee0, loc=0x000000010076a1b8, exprs=0x000000010076a210) at validator.cc:417
frame #4: 0x00000001000421a7 wasm2wat`wabt::(anonymous namespace)::Validator::CheckExpr(this=0x00007fff5fbfeee0, expr=0x000000010076a1a0) at validator.cc:495
< 10268 frames earlier... >
frame #10272: 0x00000001000421a7 wasm2wat`wabt::(anonymous namespace)::Validator::CheckExpr(this=0x00007fff5fbfeee0, expr=0x00000001006b1a40) at validator.cc:495
frame #10273: 0x00000001000419f1 wasm2wat`wabt::(anonymous namespace)::Validator::CheckExprList(this=0x00007fff5fbfeee0, loc=0x00000001006b19c8, exprs=0x00000001006b1a20) at validator.cc:417
frame #10274: 0x0000000100042b19 wasm2wat`wabt::(anonymous namespace)::Validator::CheckExpr(this=0x00007fff5fbfeee0, expr=0x00000001006b19b0) at validator.cc:599
frame #10275: 0x00000001000419f1 wasm2wat`wabt::(anonymous namespace)::Validator::CheckExprList(this=0x00007fff5fbfeee0, loc=0x000000010030a8a8, exprs=0x000000010030a9c8) at validator.cc:417
frame #10276: 0x0000000100040acc wasm2wat`wabt::(anonymous namespace)::Validator::CheckFunc(this=0x00007fff5fbfeee0, loc=0x000000010030a8a8, func=0x000000010030a8d0) at validator.cc:719
frame #10277: 0x000000010003c8f9 wasm2wat`wabt::(anonymous namespace)::Validator::CheckModule(this=0x00007fff5fbfeee0, module=0x00007fff5fbff3e0) at validator.cc:960
frame #10278: 0x000000010003c745 wasm2wat`wabt::ValidateModule(lexer=0x0000000000000000, module=0x00007fff5fbff3e0, error_handler=0x00007fff5fbff108, options=0x00007fff5fbff0a8) at validator.cc:1285
frame #10279: 0x0000000100001a20 wasm2wat`ProgramMain(argc=2, argv=0x00007fff5fbff6b8) at wasm2wat.cc:117
frame #10280: 0x0000000100002232 wasm2wat`main(argc=2, argv=0x00007fff5fbff6b8) at wasm2wat.cc:143
frame #10281: 0x00007fff9011b235 libdyld.dylib`start + 1
frame #10282: 0x00007fff9011b235 libdyld.dylib`start + 1
```
|
segfault when pointing `wasm2wat` to a module with a really big function
|
https://api.github.com/repos/WebAssembly/wabt/issues/752/comments
| 2 |
2018-02-08T21:34:41Z
|
2018-02-22T19:28:54Z
|
https://github.com/WebAssembly/wabt/issues/752
| 295,673,382 | 752 |
[
"WebAssembly",
"wabt"
] |
https://github.com/WebAssembly/spec/blob/4f078ff69de51d07c1c265273e396f42b2fb2dd3/test/core/unreached-invalid.wast#L507
I expect `wat2wasm` will successfuly serialize the following module:
```WebAssembly
(module (func (export "test") (result i32)
(block (result i32)
(unreachable) (br_if 0 (i32.const 0) (i32.const 0)) (i32.const 0)
)
)
)
```
however, `wat2wasm` reports an error:
```
Error: validate failed:
test.wast:3:60: error: type mismatch in block, expected [] but got [i32]
(unreachable) (br_if 0 (i32.const 0) (i32.const 0)) (i32.const 0)
^^^^^^^^^
```
I've checked there https://cdn.rawgit.com/WebAssembly/wabt/aae5a4b7/demo/wat2wasm/ and on a74072b2163ca20645e4a313636507cb3984f5fb (`master`, at the moment of writing)
|
Seems like wabt don't pass testsuite?
|
https://api.github.com/repos/WebAssembly/wabt/issues/749/comments
| 2 |
2018-02-07T10:12:01Z
|
2018-02-07T17:32:43Z
|
https://github.com/WebAssembly/wabt/issues/749
| 295,078,038 | 749 |
[
"WebAssembly",
"wabt"
] |
At line 90:
https://github.com/WebAssembly/wabt/blob/a74072b2163ca20645e4a313636507cb3984f5fb/src/lexer-source-line-finder.cc#L87-L94
stacktrace:
```
* thread #1, queue = 'com.apple.main-thread', stop reason = EXC_BAD_ACCESS (code=1, address=0x0)
* frame #0: 0x0000000100034fa6 wat2wasm`wabt::LexerSourceLineFinder::GetLineOffsets(this=0x00000001003026b8, find_line=1, out_range=0x00007fff5fbfe008) at lexer-source-line-finder.cc:90
frame #1: 0x0000000100034911 wat2wasm`wabt::LexerSourceLineFinder::GetSourceLine(this=0x00000001003026b8, loc=0x00007fff5fbfe530, max_line_length=80, out_source_line=0x00007fff5fbfe228) at lexer-source-line-finder.cc:40
frame #2: 0x00000001000381d5 wat2wasm`wabt::WastFormatError(error_handler=0x00007fff5fbff140, loc=0x00007fff5fbfe530, lexer=0x00000001003026b0, format="unexpected token \"%s\"%s.", args=0x00007fff5fbfe500) at wast-parser-lexer-shared.cc:43
frame #3: 0x0000000100064c35 wat2wasm`wabt::WastParser::Error(this=0x00007fff5fbfeef0, loc=Location @ 0x00007fff5fbfe530, format="unexpected token \"%s\"%s.") at wast-parser.cc:353
frame #4: 0x00000001000663dd wat2wasm`wabt::WastParser::ErrorExpected(this=0x00007fff5fbfeef0, expected=size=1, example=0x0000000000000000) at wast-parser.cc:475
frame #5: 0x000000010006db89 wat2wasm`wabt::WastParser::ParseModule(this=0x00007fff5fbfeef0, out_module=0x00007fff5fbff120) at wast-parser.cc:713
frame #6: 0x0000000100094bee wat2wasm`wabt::ParseWatModule(lexer=0x00000001003026b0, out_module=0x00007fff5fbff120, error_handler=0x00007fff5fbff140, options=0x00007fff5fbff118) at wast-parser.cc:2239
frame #7: 0x0000000100001646 wat2wasm`ProgramMain(argc=2, argv=0x00007fff5fbff688) at wat2wasm.cc:138
frame #8: 0x00000001000027a2 wat2wasm`main(argc=2, argv=0x00007fff5fbff688) at wat2wasm.cc:168
frame #9: 0x00007fff9011b235 libdyld.dylib`start + 1
frame #10: 0x00007fff9011b235 libdyld.dylib`start + 1
```
|
segfault when running `wat2wasm -`
|
https://api.github.com/repos/WebAssembly/wabt/issues/748/comments
| 1 |
2018-02-07T10:05:25Z
|
2018-02-11T18:31:41Z
|
https://github.com/WebAssembly/wabt/issues/748
| 295,075,695 | 748 |
[
"WebAssembly",
"wabt"
] |
Is it possible to generate compileable c code from web assembly by using wasm2c?
I have try to compiled by failed.
|
use wasm2c to generate code is unable to compile
|
https://api.github.com/repos/WebAssembly/wabt/issues/746/comments
| 8 |
2018-02-06T06:58:29Z
|
2020-03-11T15:05:37Z
|
https://github.com/WebAssembly/wabt/issues/746
| 294,651,566 | 746 |
[
"WebAssembly",
"wabt"
] |
I've used `wat2wasm` a minimal implementation divided on two files and want to link them. When I invoke `wasm-link` it says the tool is deprecated, and I should use `lld` instead.
However, `lld` fails with error `invalid data format`. I've tried with `5.0.0` `5.0.1` and `6.0.0`, all built from source with `-DLLVM_EXPERIMENTAL_TARGETS_TO_BUILD"
Although this is an error maybe more related to `llvm` toolchain, I'm raising it here because the tool is explicitly mentioned in `wasm-link`.
|
wasm-link deprecated but cannot get suggested replacement lld to work
|
https://api.github.com/repos/WebAssembly/wabt/issues/745/comments
| 2 |
2018-02-01T15:26:59Z
|
2018-02-01T19:43:15Z
|
https://github.com/WebAssembly/wabt/issues/745
| 293,571,636 | 745 |
[
"WebAssembly",
"wabt"
] |
See [Oxidizing Source Maps with Rust and WebAssembly](https://hacks.mozilla.org/2018/01/oxidizing-source-maps-with-rust-and-webassembly/).
> We found size profiling WebAssembly was more difficult than necessary. To get useful information presented meaningfully, we were forced to write our own home-grown script to post-process wasm-objdump. The script constructs the call graph, and lets us query who the callers of some function were, helping us understand why the function was emitted in the .wasm file, even if we didn’t expect it to be. It is pretty hacky, and doesn’t expose information about inlined functions. A proper WebAssembly size profiler would have helped, and would be a benefit for anyone following in our tracks.
It shouldn't be too difficult to add this functionality to wabt.
|
Implement better size profiler
|
https://api.github.com/repos/WebAssembly/wabt/issues/724/comments
| 4 |
2018-01-18T23:03:51Z
|
2019-02-05T16:14:24Z
|
https://github.com/WebAssembly/wabt/issues/724
| 289,806,831 | 724 |
[
"WebAssembly",
"wabt"
] |
When I run `make`, I get an error complaining about gtest. When I did `brew search gtest`, it gave the following warning, so I didn't attempt to install it system wide:
```
==> Searching local taps...
==> Searching taps on GitHub...
==> Searching blacklisted, migrated and deleted formulae...
Installing gtest system-wide is not recommended; it should be vendored
in your projects that use it.
```
Here is the error that I get when I run `make`:
```
mkdir -p out/clang/Debug/
cd out/clang/Debug/ && cmake -G "Unix Makefiles" /Users/rbalicki/code/random/wabt/ -DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++ -DCMAKE_BUILD_TYPE=Debug
-- The C compiler identification is AppleClang 9.0.0.9000039
-- The CXX compiler identification is AppleClang 9.0.0.9000039
-- Check for working C compiler: /usr/bin/clang
-- Check for working C compiler: /usr/bin/clang -- 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/clang++
-- Check for working CXX compiler: /usr/bin/clang++ -- 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 sysconf
-- Looking for sysconf - 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
-- Using prebuilt re2c lexer
-- Looking for pthread.h
-- Looking for pthread.h - found
-- Looking for pthread_create
-- Looking for pthread_create - found
-- Found Threads: TRUE
CMake Error at CMakeLists.txt:336 (message):
Can't find third_party/gtest. Run git submodule update --init, or disable
with CMake -DBUILD_TESTS=OFF.
-- Configuring incomplete, errors occurred!
See also "$MY_DIR/wabt/out/clang/Debug/CMakeFiles/CMakeOutput.log".
make: *** [out/clang/Debug/Makefile] Error 1
```
Many thanks!
|
build fails on MacOS 10.12.6: complaint about third_party/gtest
|
https://api.github.com/repos/WebAssembly/wabt/issues/716/comments
| 9 |
2018-01-14T23:02:38Z
|
2018-12-20T22:10:44Z
|
https://github.com/WebAssembly/wabt/issues/716
| 288,447,607 | 716 |
[
"WebAssembly",
"wabt"
] |
On Windows
|
How could I get this without compile by myself
|
https://api.github.com/repos/WebAssembly/wabt/issues/715/comments
| 1 |
2018-01-13T09:19:18Z
|
2018-01-13T16:06:37Z
|
https://github.com/WebAssembly/wabt/issues/715
| 288,315,279 | 715 |
[
"WebAssembly",
"wabt"
] |
It would be cool to keep support for the spec repo's `.wast` format: take the `.wat` part, convert to `.wasm`, and ignore the assertions. I don't think you want this to be the default behavior for `wat2wasm`, but maybe it can be a flag?
|
wast2wasm
|
https://api.github.com/repos/WebAssembly/wabt/issues/693/comments
| 1 |
2017-12-14T00:36:34Z
|
2017-12-14T00:43:20Z
|
https://github.com/WebAssembly/wabt/issues/693
| 281,944,466 | 693 |
[
"WebAssembly",
"wabt"
] |
Over in https://github.com/alexcrichton/wasm-gc/pull/8 I'm experimenting with demangling rust symbols in wasm output. This results in symbol names such as `<alloc::vec::Vec<T>>::extend_from_slice` and `<&'a T as core::fmt::Debug>::fmt`.
While `wasm2wat` produces very nice looking output, I get a segmentation fault when feeding this output back into `wat2wasm`. I'm guessing that the space characters are causing issues when parsing the `.wat` file but other characters could be causing problems as well.
[example.wasm.gz](https://github.com/WebAssembly/wabt/files/1524991/wasm.gc.wasm.gz)
|
Strange symbols don't roundtrip through wasm2wat and wat2wasm
|
https://api.github.com/repos/WebAssembly/wabt/issues/685/comments
| 2 |
2017-12-03T17:25:00Z
|
2022-05-19T01:35:45Z
|
https://github.com/WebAssembly/wabt/issues/685
| 278,801,340 | 685 |
[
"WebAssembly",
"wabt"
] |
Steps to reproduce:
```
$ echo '(module (func))' > test.wat
$ wat2wasm -r test.wat -o test.wasm
$ wasm-ld test.wasm -o out.wasm
wasm-ld: error: test.wasm: not a relocatable wasm file
```
Furthermore, files produced by wat2wasm with and without -r option don't seem to differ:
```
$ wat2wasm test.wat -o test-nor.wasm
$ diff test.wasm test-nor.wasm
$
```
Not sure if such a minimal example should differ, but my best guess is yes, since lld is complaining about it.
|
wat2wasm relocatable output files will not link with lld
|
https://api.github.com/repos/WebAssembly/wabt/issues/681/comments
| 0 |
2017-12-01T15:00:16Z
|
2017-12-06T01:02:57Z
|
https://github.com/WebAssembly/wabt/issues/681
| 278,492,139 | 681 |
[
"WebAssembly",
"wabt"
] |
When I'm trying wast2wasm the following code:
```WebAssembly
(module
(global i32 (i32.const 0))
(global i32 (get_global 0))
)
```
error message is printed:
```
init_with_internal_global.wast:3:3: initializer expression can only reference an imported global
```
[Spec states that](https://webassembly.github.io/spec/valid/modules.html#globals):
> `expr` should be constant,
and then, [spec states](https://webassembly.github.io/spec/valid/instructions.html#constant-expressions) that constant exprs can be either in form of `t.const`, or
> of the form get_global 𝑥, in which case 𝐶.globals[𝑥] must be a global type of the form const 𝑡.
But I can't see anything about that `x` should be imported. Binaryen's `wasm-as` seems like to accept this code.
Is it a bug, error in the spec or am I get something wrong?
|
initializer expression can only reference an imported global
|
https://api.github.com/repos/WebAssembly/wabt/issues/680/comments
| 3 |
2017-12-01T14:26:08Z
|
2017-12-04T18:48:14Z
|
https://github.com/WebAssembly/wabt/issues/680
| 278,481,962 | 680 |
[
"WebAssembly",
"wabt"
] |
Since we can link with lld, perhaps it makes sense to remove `wasm-link` so to reduce confusion. It'd be nice to have an alternate linker, but since `wasm-link` isn't quite there, it may be creating more harm than good. @sbc100 wdyt?
|
Remove wasm-link?
|
https://api.github.com/repos/WebAssembly/wabt/issues/679/comments
| 3 |
2017-11-30T23:11:34Z
|
2018-03-12T19:27:12Z
|
https://github.com/WebAssembly/wabt/issues/679
| 278,302,641 | 679 |
[
"WebAssembly",
"wabt"
] |
The "write_debug_names" option should be enabled in the WAT2WASM online demo. This will add the debug names section to the generated WASM binary and will in consequence allow better debugging in latest Chrome and Firefox.
I'd be happy to provide a pull request.
|
Enable "write_debug_names" option in WAT2WASM online demo
|
https://api.github.com/repos/WebAssembly/wabt/issues/675/comments
| 2 |
2017-11-22T11:17:54Z
|
2017-11-23T20:58:33Z
|
https://github.com/WebAssembly/wabt/issues/675
| 276,031,263 | 675 |
[
"WebAssembly",
"wabt"
] |
Testcase:
````
(module
(func $0 (result i32)
(loop $label$1 (result i32)
(br $label$1)
)
)
)
````
Hits this error:
````
wasm2c: /wabt/src/c-writer.cc:712: void wabt::{anonymous}::CWriter::Write(const wabt::{anonymous}::StackVar&): Assertion `index < type_stack_.size()' failed.
````
|
c-writer fails on un-exited loop with value
|
https://api.github.com/repos/WebAssembly/wabt/issues/674/comments
| 3 |
2017-11-21T23:17:11Z
|
2017-11-21T23:46:49Z
|
https://github.com/WebAssembly/wabt/issues/674
| 275,892,569 | 674 |
[
"WebAssembly",
"wabt"
] |
wabt's validation logic doesn't reject invalid modules in some testcases recently added to the spec testsuite:
```
$ wast2json unreached-invalid.wast -o unreached-invalid.json
$ wasm2wat unreached-invalid.87.wasm -o x.wat
```
For comparison, the spec interpreter rejects the same file:
```
$ wasm unreached-invalid.87.wasm
unreached-invalid.87.wasm:0x20-0x21: invalid module: type mismatch: operator requires [f64] but stack has [f32]
```
|
wabt validation doesn't reject new unreached-invalid cases
|
https://api.github.com/repos/WebAssembly/wabt/issues/670/comments
| 1 |
2017-11-14T00:24:20Z
|
2017-11-14T17:14:53Z
|
https://github.com/WebAssembly/wabt/issues/670
| 273,625,957 | 670 |
[
"WebAssembly",
"wabt"
] |
Currently,
```
$ wast2json imports.wast -o output/imports.json
$ ls output/
imports.0.wasm imports.22.wasm imports.49.wasm imports.75.wasm
imports.100.wast imports.23.wasm imports.4.wasm imports.76.wasm
imports.101.wast imports.24.wasm imports.50.wasm imports.77.wasm
imports.102.wast imports.25.wasm imports.51.wasm imports.78.wasm
imports.103.wast imports.26.wasm imports.52.wasm imports.79.wasm
[...]
```
As I understand it, the purpose of wast2json is to handle the details of the wast format and emit standalone wasm modules that can be tested in tools that don't support the full wast syntax. For the "assert_malformed" tests, it'd be consistent with this purpose to write out a "wat" file instead of "wast" file.
|
wast2json should produce "wat" files
|
https://api.github.com/repos/WebAssembly/wabt/issues/668/comments
| 0 |
2017-11-14T00:01:57Z
|
2017-11-14T02:54:04Z
|
https://github.com/WebAssembly/wabt/issues/668
| 273,621,853 | 668 |
[
"WebAssembly",
"wabt"
] |
Any ongoing efforts to support SIMD opcodes in WABT? We have an implementation in progress and will be happy to contribute.
|
SIMD support in WABT
|
https://api.github.com/repos/WebAssembly/wabt/issues/663/comments
| 9 |
2017-10-30T23:34:25Z
|
2018-03-19T22:45:57Z
|
https://github.com/WebAssembly/wabt/issues/663
| 269,787,851 | 663 |
[
"WebAssembly",
"wabt"
] |
I'd like to use wasm-link create objects for use with an embedded interpreter, where the host provides implementations of some functions, but I don't see how to accomplish this. The linker refuses to create files with unresolved function imports, and while the WABT interpreter has a notion of "host functions" and even has a fake opcode to support this, I don't see a way to satisfy wasm-link. Just leaving the import unresolved and specifying "-r" results in a fatal error:
> unsupport export type: 3
Without "-r", it reports:
> undefined symbol: host_symbol
Have I missed something, or have we not yet considered this use case?
|
Support for host exported functions in wasm-link.
|
https://api.github.com/repos/WebAssembly/wabt/issues/651/comments
| 2 |
2017-10-13T17:31:26Z
|
2018-03-16T22:10:51Z
|
https://github.com/WebAssembly/wabt/issues/651
| 265,363,632 | 651 |
[
"WebAssembly",
"wabt"
] |
Abseil (http://abseil.io/) has finally made its escape from the walls of Google, and might now be a great place to get some utilities such as `string_view` (http://abseil.io/docs/cpp/guides/strings), feature testing, backwards C++ compatibility, etc.
|
Use Abseil for things like string_view?
|
https://api.github.com/repos/WebAssembly/wabt/issues/639/comments
| 3 |
2017-09-26T17:20:35Z
|
2022-05-19T01:28:36Z
|
https://github.com/WebAssembly/wabt/issues/639
| 260,704,157 | 639 |
[
"WebAssembly",
"wabt"
] |
The following wat code triggers an assertion
```wat
(module (test))
```
`Assertion failed: !"ParseModuleField should only be called if IsModuleField() is true", file E:\Projects\wabt\src\wast-parser.cc, line 734`
`ParseModuleFieldList` tries to `ParseModuleField` then on error validate with `IsModuleField`.
Either it should check beforehand, like the assert mentions, or remove the assertion.
This doesn't seem to have any effect on release build since the error case is correctly handled.
|
ModuleField assertion
|
https://api.github.com/repos/WebAssembly/wabt/issues/637/comments
| 1 |
2017-09-23T00:02:49Z
|
2017-09-23T01:33:34Z
|
https://github.com/WebAssembly/wabt/issues/637
| 259,965,388 | 637 |
[
"WebAssembly",
"wabt"
] |
Since we have name sections for minimal debug info, we should support the common use case of generating a name-ful binary at compile time, and then keeping a copy of that while deploying a stripped version to users. Eventually we'll want it to be smart enough to strip debug info custom sections while leaving others, but for now, just stripping the names should be sufficient.
|
We should have a wasm-strip tool
|
https://api.github.com/repos/WebAssembly/wabt/issues/631/comments
| 0 |
2017-09-18T17:28:20Z
|
2018-09-13T07:47:51Z
|
https://github.com/WebAssembly/wabt/issues/631
| 258,558,918 | 631 |
[
"WebAssembly",
"wabt"
] |
I have a bogus wasm file that apparently has a bad opcode somewhere in the code section (0xb531). I just wanted to see the section headers but I'm still getting an error:
$ bin/wasm-objdump --enable-threads -h pthread_create.wasm
pthread_create.wasm: file format wasm 0x1
*ERROR*: @0x0000b531: unexpected opcode: 0 (0x0)
Should this work?
|
wasm-objdump errors out on bad opcodes even when just printing section headers
|
https://api.github.com/repos/WebAssembly/wabt/issues/627/comments
| 7 |
2017-09-14T22:53:45Z
|
2017-09-27T02:04:43Z
|
https://github.com/WebAssembly/wabt/issues/627
| 257,879,559 | 627 |
[
"WebAssembly",
"wabt"
] |
In wat2wasm.
When parsing a pair of token, if we have to reallocate (ie: grow) the read buffer between both token and a parsing error occurs, if the first token is printed in the error message, the text will have been freed by then.
From what I see, in WastParser, when pushing tokens in `tokens_` the token keep a reference to the Lexer's read buffer. However, if we reach the limit of the buffer while reading the next token (see `WastLexer::Fill`) the memory referenced by the first token is freed.
Once done parsing the second token, if there is a mismatch of tokens in the pair, the first token might be printf into the error message.
The repro file I got are not small, but are easy to reconstruct in javascript.
```js
const repro1 = `(module (data "${"a".repeat(0x5000)}" "${"a".repeat(0x10000)}"))`;
const repro2 = `notparen${" ".repeat(0x10000)}notmodule`;
console.log(repro1);
console.log(repro2);
```
|
Possible use-after-free in error message
|
https://api.github.com/repos/WebAssembly/wabt/issues/623/comments
| 1 |
2017-09-13T17:07:19Z
|
2017-09-20T04:06:12Z
|
https://github.com/WebAssembly/wabt/issues/623
| 257,454,170 | 623 |
[
"WebAssembly",
"wabt"
] |
Given a .wat file with multiple modules (as if a .wast file containing multiple modules were naively renamed as .wat), wabt's wat2wasm seems to silently ignore trailing modules.
```
$ cat t.wat
(module (func $foo (result i32) (i32.const 77)))
(module (func $bar (result i32) (i32.const 88)))
$ wat2wasm t.wat -o t.wasm
$ wasm2wat t.wasm -o s.wat
$ cat s.wat
(module
(type (;0;) (func (result i32)))
(func (;0;) (type 0) (result i32)
i32.const 77))
$
```
As a related question, wat2wasm seems ok if the surrounding `(module` ... `)` isn't present, but doesn't seem to mind if it's present either. Is it intended that both forms are valid?
|
wat2wasm silently swallows trailing modules
|
https://api.github.com/repos/WebAssembly/wabt/issues/621/comments
| 1 |
2017-09-12T18:07:16Z
|
2017-09-20T04:06:24Z
|
https://github.com/WebAssembly/wabt/issues/621
| 257,133,399 | 621 |
[
"WebAssembly",
"wabt"
] |
Hello, new to WASM here.
I'm using WABT's `wat2wasm` tool (at caf98190ca5267a0864ef019889b31ed16d95f77) to compile this:
```wat
(module
(func $test (result i32) (i32.const 64))
)
```
But in Chromium 61 on Linux I am getting an error:
```yml
CompileError: AsyncCompile: Wasm decoding failed: expected 11 bytes, fell off end @+30
```
So far I have discovered the error is related to the `i32.const` instruction. If I put any number above `63` I get these decoding errors. So this program is decoding in chromium fine:
```wat
(module
(func $test (result i32) (i32.const 10))
)
```
Another interesting effect, the more `i32.const` instructions I have that are over `63`, it seems to break more. In some cases the "expected x bytes" would grow in large numbers, or I would receive a different error.
|
i32.const not working on Chrome 61 Linux
|
https://api.github.com/repos/WebAssembly/wabt/issues/620/comments
| 7 |
2017-09-10T01:17:42Z
|
2017-09-12T04:21:48Z
|
https://github.com/WebAssembly/wabt/issues/620
| 256,477,349 | 620 |
[
"WebAssembly",
"wabt"
] |
I thought this was a bug in SpiderMonkey as wabt and v8 accept the binary, but @lukewagner says it is the opposite. Details here: https://bugzilla.mozilla.org/show_bug.cgi?id=1385717
Seems like it comes down to what is pushed on the stack by a br_if with a value whose input value is unreachable, but this is a confusing part of the spec at least for me so I'm not sure what is right. Looks like v8 and wabt do one thing with sm and the spec interpreter do the other.
|
Potential bug in br_if validation
|
https://api.github.com/repos/WebAssembly/wabt/issues/588/comments
| 7 |
2017-07-31T15:57:02Z
|
2017-07-31T19:38:43Z
|
https://github.com/WebAssembly/wabt/issues/588
| 246,806,237 | 588 |
[
"WebAssembly",
"wabt"
] |
[cc.wasm.gz](https://github.com/WebAssembly/wabt/files/1184527/cc.wasm.gz)
The file contains this:
````
$ ../wabt/out/wasm2wast cc.wasm
(module
(type (;0;) (func))
(func (;0;) (type 0)
(local f32)
i32.const 259
if ;; label = @1
unreachable
tee_local 0
end))
````
wabt accepts this, but sm and v8 do not,
````
a.js:19:41 CompileError: at offset 49: unused values not explicitly dropped by end of block
a.js:19: CompileError: WebAssembly.Module(): Compiling WASM function #0: failed:: expected 0 elements on the stack for fallthru to @6 @+11
````
|
unreachable tee incorrectly accepted?
|
https://api.github.com/repos/WebAssembly/wabt/issues/586/comments
| 1 |
2017-07-29T00:38:33Z
|
2017-07-30T04:37:16Z
|
https://github.com/WebAssembly/wabt/issues/586
| 246,487,501 | 586 |
[
"WebAssembly",
"wabt"
] |
Shouldn't it be 0x1? When I try to view a 0x1 binary, I get
````
error reading binary:
error: @0x00000008: bad wasm file version: 0x1 (expected 0xd)
````
|
Expected version is 0xd
|
https://api.github.com/repos/WebAssembly/wabt/issues/585/comments
| 2 |
2017-07-26T23:50:29Z
|
2017-07-27T02:02:46Z
|
https://github.com/WebAssembly/wabt/issues/585
| 245,887,361 | 585 |
[
"WebAssembly",
"wabt"
] |
Hi,
Our code scanner has reported a file descriptor leak at [src/writer.cc#L33](https://github.com/WebAssembly/wabt/blob/master/src/writer.cc#L33),
the file pointer is allocated here: `FILE* file = fopen(filename_str.c_str(), "wb");`
for any early return, would skip the fclose(file) statement and leak this file descriptor, could any one have a look?
```c++
Result OutputBuffer::WriteToFile(string_view filename) const {
std::string filename_str = filename.to_string();
FILE* file = fopen(filename_str.c_str(), "wb");
if (!file) {
ERROR("unable to open %s for writing\n", filename_str.c_str());
return Result::Error;
}
if (data.empty()) {
return Result::Ok; // <== early return
}
ssize_t bytes = fwrite(data.data(), 1, data.size(), file);
if (bytes < 0 || static_cast<size_t>(bytes) != data.size()) {
ERROR("failed to write %" PRIzd " bytes to %s\n", data.size(),
filename_str.c_str());
return Result::Error; // <== early return
}
fclose(file);
return Result::Ok;
}
```
Regards,
SourceBrella Inc., Alex
|
Potential file descriptor leak at src/writer.cc
|
https://api.github.com/repos/WebAssembly/wabt/issues/571/comments
| 0 |
2017-07-14T11:40:54Z
|
2017-09-05T05:22:17Z
|
https://github.com/WebAssembly/wabt/issues/571
| 242,974,105 | 571 |
[
"WebAssembly",
"wabt"
] |
Hi all,
Our code scanner has reported a double free at [wasm-opcodecnt.cc#L221](https://github.com/WebAssembly/wabt/blob/master/src/tools/wasm-opcodecnt.cc#L221),
There are two `delete[] data` inside function `ProgramMain`, if read_file failed, it could occur some unexpected behaviors.
May be we can add a return statement after the first delete to avoid this?
```c++
char* data;
size_t size;
Result result = read_file(s_infile, &data, &size);
if (Failed(result)) {
const char* input_name = s_infile ? s_infile : "stdin";
ERROR("Unable to parse: %s", input_name);
delete[] data; // <===
}
if (Succeeded(result)) {
....
}
delete[] data; // <====
return result != Result::Ok;
```
SourceBrella Inc.
Alex
|
Potential double free at src/tools/wasm-opcodecnt.cc::ProgramMain
|
https://api.github.com/repos/WebAssembly/wabt/issues/570/comments
| 0 |
2017-07-14T07:49:30Z
|
2017-07-14T21:37:35Z
|
https://github.com/WebAssembly/wabt/issues/570
| 242,923,198 | 570 |
[
"WebAssembly",
"wabt"
] |
I'm getting this error when running wasm-link on a wasm module generated by llc.
The wasm module (as printed by wasm2wast):
```
(module
(type (;0;) (func))
(func $function (type 0)
i32.const 0
i32.const 1
i32.store8)
(table (;0;) 0 anyfunc)
(memory (;0;) 1)
(global (;0;) i32 (i32.const 0))
(export "function" (func $function))
(data (i32.const 0) "\00"))
```
## Steps to reproduce
Given this LLVM IR file:
```
target triple = "wasm32-unknown-unknown-wasm"
@global_boolean = internal global i1 false
define void @function() {
entry:
store i1 true, i1* @global_boolean
ret void
}
```
* Run `llc -filetype=obj -o function.wasm ir.ll`
* Run `wasm-link --output linked.wasm function.wasm`
Output: `unhandled relocation type: R_GLOBAL_ADDR_LEB`
|
wasm-link: unhandled relocation type: R_GLOBAL_ADDR_LEB
|
https://api.github.com/repos/WebAssembly/wabt/issues/565/comments
| 6 |
2017-07-11T08:02:21Z
|
2018-03-16T22:11:26Z
|
https://github.com/WebAssembly/wabt/issues/565
| 241,960,537 | 565 |
[
"WebAssembly",
"wabt"
] |
```
$ wasm2wast /tmp/emscripten_temp/emcc-lld-output.wasm
(null):0: mutable globals cannot be exported
```
This happens whether of not I specify a -o file.
|
wasm2wast error message have strange locations
|
https://api.github.com/repos/WebAssembly/wabt/issues/557/comments
| 2 |
2017-07-07T00:44:06Z
|
2017-07-13T17:23:27Z
|
https://github.com/WebAssembly/wabt/issues/557
| 241,125,991 | 557 |
[
"WebAssembly",
"wabt"
] |
We should change the tools to the following (adding on to #354):
- [x] `wat2wasm`: converts .wat text files only to .wasm binary files, and optionally validates
- [x] `wast2json`: converts .wast spec test files to .json and .wasm files
- ~~`wat-validate`: standalone .wat file validation, no conversion~~
- [x] `wasm2wat`: converts .wasm files to .wat text files, and optionally validates (rename of `wasm2wast`)
- [x] `wasm-validate`: standalone .wasm file validation, no conversion
- [x] `spectest-interp`: (better name?) run the spec tests in interpreter (current `wasm-interp` functionality)
- [x] `wasm-interp`: only run a single .wasm file, later adding passing arguments (see #198)
All of the functionality is available currently, this is just splitting it out. Thoughts?
|
Reorganize tools
|
https://api.github.com/repos/WebAssembly/wabt/issues/543/comments
| 2 |
2017-06-29T17:39:44Z
|
2017-11-01T05:11:13Z
|
https://github.com/WebAssembly/wabt/issues/543
| 239,558,380 | 543 |
[
"WebAssembly",
"wabt"
] |
Hi,
Im interested to know more about 'fuzz-in' directory and how to use those content to fuzz webassembly, but the readme file doesnt have any information about them!
Can you please explain how I can use those files and what is the idea of the fuzzer?
Thanks
|
no notes for fuzz-in/ directory
|
https://api.github.com/repos/WebAssembly/wabt/issues/537/comments
| 3 |
2017-06-27T13:04:32Z
|
2022-05-19T01:27:32Z
|
https://github.com/WebAssembly/wabt/issues/537
| 238,843,873 | 537 |
[
"WebAssembly",
"wabt"
] |
I'm working around the issue by not using wasm-link and just including the [c files into a single source](https://github.com/winksaville/test-nn-wasm/blob/master/lib/libwasm.c). What is the time frame for adding memory section support?
|
What's the plan for supporting memory sections in wasm-link?
|
https://api.github.com/repos/WebAssembly/wabt/issues/507/comments
| 5 |
2017-06-17T18:39:08Z
|
2018-03-16T22:11:35Z
|
https://github.com/WebAssembly/wabt/issues/507
| 236,677,095 | 507 |
[
"WebAssembly",
"wabt"
] |
Building CXX object ... test-string-view.cc eventually tries to include c++/type_traits, where "struct __is_floating_point_helper<__float128>" fails to compile.
This is 64-bit Cygwin running on Windows7. Git-cloned just today.
|
Add documentation to README.md for the MSVC build
|
https://api.github.com/repos/WebAssembly/wabt/issues/496/comments
| 5 |
2017-06-13T01:14:57Z
|
2017-06-16T00:37:52Z
|
https://github.com/WebAssembly/wabt/issues/496
| 235,409,010 | 496 |
[
"WebAssembly",
"wabt"
] |
Hi,
I have built wabt successfully using the command `make gcc-release`, but there seems no installation support for it. make install seems to assume I have clang installed. Is there a way to run the make install target when using the gcc target?
|
Install gcc build
|
https://api.github.com/repos/WebAssembly/wabt/issues/495/comments
| 2 |
2017-06-12T22:04:47Z
|
2017-06-17T00:32:19Z
|
https://github.com/WebAssembly/wabt/issues/495
| 235,379,424 | 495 |
[
"WebAssembly",
"wabt"
] |
I was following https://developer.mozilla.org/en-US/docs/WebAssembly/Understanding_the_text_format which suggests using the following syntax for an imported function with two i32 params:
```
(import "console" "log" (func $log (param i32) (param i32)))
```
But I get the error
```
test.wast:3:62: syntax error, unexpected PARAM, expecting RESULT
(import "console" "log" (func $log (param i32) (param i32)))
^^^^^
```
I was able to get `wabt` to accept:
```
(import "console" "log" (func $log (param i32 i32)))
```
but it would be nice if the longer version worked as well.
|
import accepts (param i32 i32) but not (param i32) (param i32)
|
https://api.github.com/repos/WebAssembly/wabt/issues/493/comments
| 5 |
2017-06-12T02:41:14Z
|
2017-06-12T23:03:39Z
|
https://github.com/WebAssembly/wabt/issues/493
| 235,112,560 | 493 |
[
"WebAssembly",
"wabt"
] |
We should clarify what subset of input modules are acceptable and that the goal of linking is. In the README and perhaps in the --help too.
|
Clarify goals and purpose of wasm-link
|
https://api.github.com/repos/WebAssembly/wabt/issues/489/comments
| 1 |
2017-06-09T17:09:22Z
|
2017-12-19T18:23:11Z
|
https://github.com/WebAssembly/wabt/issues/489
| 234,887,455 | 489 |
[
"WebAssembly",
"wabt"
] |
wast2wasm (master) fails on the `forward.wast` from the testsuite (master):
wast2wasm --spec forward.wast
```
wasm2wast stdout:
wasm2wast stderr: ./testsuite/forward.wast:3:10: syntax error, unexpected RESULT
(if (result i32) (i32.eq (get_local $n) (i32.const 0))
```
Probably this is a version mismatch issue between tests and wabt? If this is the case, what is the recommended stable combination of wabt (this repo) and testsuite (https://github.com/WebAssembly/testsuite) versions?
|
Forward.wast
|
https://api.github.com/repos/WebAssembly/wabt/issues/478/comments
| 1 |
2017-06-05T13:58:30Z
|
2017-06-06T08:57:39Z
|
https://github.com/WebAssembly/wabt/issues/478
| 233,596,428 | 478 |
[
"WebAssembly",
"wabt"
] |
Hi, just wanted to clarify about this line in i32.wast of the testsuite:
https://github.com/WebAssembly/testsuite/blob/c4ec0044b99feb322fc63708907d0be0a3088ed3/i32.wast#L173
`
(assert_return (invoke "shl" (i32.const 1) (i32.const 32)) (i32.const 1))
`
so it is asserting that 1 << 32 = 1
how is that true and what spec describes such behaviour?
|
Shift left in test suite
|
https://api.github.com/repos/WebAssembly/wabt/issues/477/comments
| 2 |
2017-06-05T11:50:25Z
|
2017-06-05T14:39:16Z
|
https://github.com/WebAssembly/wabt/issues/477
| 233,565,309 | 477 |
[
"WebAssembly",
"wabt"
] |
```
...
block i32 i32
i32.const 1
i32.const 2
end
...
```
`wast2wasm` accepts this, but it is caught by the browser when compiling the .wasm file. Chrome produced the following error message:
```
Compiling WASM function #1: failed:: invalid block arity > 1 @+2
```
It would be nice if wast2wasm reported this as a error so that issues are caught earlier in the pipeline.
|
wast2wasm: more than one result type accepted by 'block' and 'if'
|
https://api.github.com/repos/WebAssembly/wabt/issues/473/comments
| 1 |
2017-06-03T17:05:26Z
|
2017-06-07T17:47:45Z
|
https://github.com/WebAssembly/wabt/issues/473
| 233,382,079 | 473 |
[
"WebAssembly",
"wabt"
] |
it would be nice to expose a few more features to libwabt.js. most useful will would probably be
- wasm2wast
- wast-desugar
|
Add functionality to the JS build
|
https://api.github.com/repos/WebAssembly/wabt/issues/470/comments
| 2 |
2017-06-02T18:42:19Z
|
2017-09-04T20:06:18Z
|
https://github.com/WebAssembly/wabt/issues/470
| 233,266,602 | 470 |
[
"WebAssembly",
"wabt"
] |
Starting from this test, taken from br_if.wast in the spec testsuite:
```
(assert_invalid
(module (func $unbound-label (br_if 1 (i32.const 1))))
"unknown label"
)
```
Running `wast2wasm --spec` to extract the module to this (hexdump -C):
```
00000000 00 61 73 6d 01 00 00 00 01 04 01 60 00 00 03 02 |.asm.......`....|
00000010 01 00 0a 08 01 06 00 41 01 0d 01 0b |.......A....|
0000001c
```
and then ~~`wast2wasm`~~`wasm2wast` on the module to print it, produces this output, with an assertion failure:
```
(module
(type (;0;) (func))
(func (;0;) (type 0)
i32.const 1
wasm2wast: /.../wasm/wabt/src/wat-writer.cc:359: void wabt::(anonymous namespace)::WatWriter::WriteBrVar(const wabt::Var *, wabt::(anonymous namespace)::NextChar): Assertion `var->index < GetLabelStackSize()' failed.
br_ifAborted
```
|
assertion failure in wasm2wast in invalid module
|
https://api.github.com/repos/WebAssembly/wabt/issues/468/comments
| 0 |
2017-06-02T17:15:08Z
|
2017-06-02T21:20:33Z
|
https://github.com/WebAssembly/wabt/issues/468
| 233,246,242 | 468 |
[
"WebAssembly",
"wabt"
] |
Using wast2wasm installed from homebrew produces wasm binaries that don't load ("expected version 01 00 00 00, found 0d 00 00 00") in Chrome 58.
|
Update Homebrew Formula
|
https://api.github.com/repos/WebAssembly/wabt/issues/459/comments
| 6 |
2017-05-26T16:16:12Z
|
2017-09-04T20:05:38Z
|
https://github.com/WebAssembly/wabt/issues/459
| 231,671,951 | 459 |
[
"WebAssembly",
"wabt"
] |
IIRC the $ that preceeds names in the wast format is not actually part of the name and should be stripped on intput and generated on output.
Right now I run wasm2wast on an llvm-generated object the wast file is invalid because the names are not preceded by $.
|
wasm2wast should add $ to debug names
|
https://api.github.com/repos/WebAssembly/wabt/issues/448/comments
| 1 |
2017-05-22T18:23:10Z
|
2017-05-23T21:14:50Z
|
https://github.com/WebAssembly/wabt/issues/448
| 230,478,675 | 448 |
[
"WebAssembly",
"wabt"
] |
In a simple linking test I've got something similar to the following linking scenario:
```
(module
(import "__extern" "foo" (func $import0 (param i32) (result i32)))
(import "__extern" "bar" (func $import1 (param i32) (result i32)))
(func $local_func (param i32)
get_local 0
call $local_func
call $import0
call $import1
call 3)
(func (param i32)
get_local 0)
)
(module
(import "__extern" "baz" (func $import0 (param f64)))
(export "foo" (func $local_func))
(func $local_func (param i64)
f64.const 1
call $import0
i64.const 10
call $local_func)
)
```
The `call 3` in the first module should be updated to become a `call 2` in the linked output. I'm seeing the custom relocation data being created to represent this relocation in the binary, but when running in the browser it doesn't seem to pick this up and instead gives a stack error.
Is this because browser support for relocations is pending? Or is there something that can be done here to get these relocations to work in the browser?
|
Function relocations not executing with wasm-link
|
https://api.github.com/repos/WebAssembly/wabt/issues/447/comments
| 14 |
2017-05-22T12:55:30Z
|
2017-05-31T20:42:17Z
|
https://github.com/WebAssembly/wabt/issues/447
| 230,386,719 | 447 |
[
"WebAssembly",
"wabt"
] |
Given a cpp file
```c_cpp
#include <stdint.h>
uint64_t fct1() { return 1llu << 63; }
uint64_t fct2() { return (1llu << 63) + 255; }
```
the .s generated by clang contains the correct value
```
fct1: i64.const $push0=, -9223372036854775808
fct2: i64.const $push0=, -9223372036854775553
```
the .wast is ok too
```
(func $_Z4fct6v (result i64)
(i64.const -9223372036854775808)
)
(func $_Z4fct7v (result i64)
(i64.const -9223372036854775553)
)
```
.wasm is generated by binaryen, wasmdump print them as
```
004e7f func[1679]:
004e81: 42 80 80 80 80 80 80 80 80 80 | i64.const 0
004e8c: 0b | end
004e8d func[1680]:
004e8f: 42 ff 81 80 80 80 80 80 80 80 | i64.const 255
004e9a: 0b | end
```
output should look like
```
004e7f func[1679]:
004e81: 42 80 80 80 80 80 80 80 80 80 7f| i64.const -9223372036854775808
004e8c: 0b | end
004e8d func[1680]:
004e8f: 42 ff 81 80 80 80 80 80 80 80 7f| i64.const -9223372036854775553
004e9a: 0b | end
```
wasmdump correctly eat the right number of byte.
Another problem but unrelated to wasmdump, in the last byte, only bit 0 is used and I expected all other bits set to 0, I don't know if leb128 encoding specify than unused bits of last byte when reaching max length are garbage, must be set to 1 or must be set to 0. Any thought about that?
|
i64.const too big are not printed correctly by wasmdump
|
https://api.github.com/repos/WebAssembly/wabt/issues/445/comments
| 1 |
2017-05-22T01:00:26Z
|
2017-05-22T23:02:59Z
|
https://github.com/WebAssembly/wabt/issues/445
| 230,261,928 | 445 |
[
"WebAssembly",
"wabt"
] |
When linking two WASM binaries with exported memories, the operation fails with message `unsupport export type: 2`.
s2wasm exports the memory by default, so this would be a useful feature to have to be able to link these files.
An adjustment like https://github.com/WebAssembly/wabt/compare/master...guybedford:memory-export may work here?
|
Supporting exported memory for wasm-link
|
https://api.github.com/repos/WebAssembly/wabt/issues/439/comments
| 14 |
2017-05-18T14:05:10Z
|
2018-03-16T22:10:24Z
|
https://github.com/WebAssembly/wabt/issues/439
| 229,683,543 | 439 |
[
"WebAssembly",
"wabt"
] |
@kanaka mentions [here](https://github.com/WebAssembly/spec/pull/471#issuecomment-301565835) that having some of the sugar makes for easier debugging. It shouldn't be too much work to add options to the wat-writer to support this:
- [ ] ~~inline function types for imported functions~~ (not valid in text format)
- [x] inline imports
- [x] inline exports
- [x] mnemonic labeling of variables (you can do this currently with the `--generate-names` flag, perhaps should be done by default?)
- [x] optional expression folding
- [x] use import/export name as debug name if no other debug name is supplied
|
Add options to wat-writer
|
https://api.github.com/repos/WebAssembly/wabt/issues/436/comments
| 4 |
2017-05-15T19:53:40Z
|
2018-01-09T01:02:31Z
|
https://github.com/WebAssembly/wabt/issues/436
| 228,825,792 | 436 |
[
"WebAssembly",
"wabt"
] |
I am javascript programmers. wast text code can be easier? similar to what I found in the early wast code.
see:
https://github.com/ncbray/wassembler/blob/master/demos/simple.wasm
|
wast text code can be easier?
|
https://api.github.com/repos/WebAssembly/wabt/issues/435/comments
| 2 |
2017-05-15T11:01:41Z
|
2017-09-04T20:07:26Z
|
https://github.com/WebAssembly/wabt/issues/435
| 228,678,875 | 435 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.