Ali Mohammad Pur
65355c388b
LibWasm: Use AK::StackInfo to track stack size
...
This way, we can make sure that it doesn't overflow when ASAN is
enabled.
2021-07-12 18:42:45 +04:30
Ali Mohammad Pur
2fc0040ceb
LibWasm: Tweak the implementation-defined limits a bit
2021-07-06 17:55:00 +04:30
Ali Mohammad Pur
b538e15548
LibWasm: Give traps a reason and display it when needed
...
This makes debugging wasm code a bit easier, as we now know what fails
instead of just "too bad, something went wrong".
2021-07-02 04:53:01 +04:30
Ali Mohammad Pur
c4b82ace74
LibWasm: Limit the call stack depth and the number of executed insts
...
These limits are described in the spec, and we're supposed to stop
execution at some point.
The limits are arbitrarily chosen.
2021-06-22 00:26:25 +04:30
Ali Mohammad Pur
95b9821f26
LibWasm: Implement memory.grow, memory.size and drop
...
These allow a very basic memory-using program to work.
2021-05-17 23:25:30 +02:00
Ali Mohammad Pur
aa4d8d26b9
LibWasm: Start implementing a basic WebAssembly binary format parser
...
This can currently parse a really simple module.
Note that it cannot parse the DataCount section, and it's still missing
almost all of the instructions.
This commit also adds a 'wasm' test utility that tries to parse a given
webassembly binary file.
It currently does nothing but exit when the parse fails, but it's a
start :^)
2021-05-08 22:14:39 +02:00