Ali Mohammad Pur
6760ea33a0
LibWasm: Make memory_grow validation push back the old memory size
2022-04-22 21:12:47 +04:30
Ali Mohammad Pur
6e07e74261
LibWasm: Make local_tee validation keep the value on the stack
2022-04-22 21:12:47 +04:30
Idan Horowitz
086969277e
Everywhere: Run clang-format
2022-04-01 21:24:45 +01:00
Ali Mohammad Pur
a6c4b6848b
LibWasm: Use some template magic to greatly simplify stack validation
...
This also auto-fixes a few bugs that were present before as we were
manually checking the stack.
2022-03-20 10:44:32 +03:30
Ali Mohammad Pur
18c5b0f1cc
LibWasm: Allow Limits max value to be equal to 2^k-1
...
That value fits in k bits, so we should allow it.
2022-03-20 10:44:32 +03:30
Ali Mohammad Pur
eccdf4eb4b
LibWasm: Fix validation of if-else blocks
...
We were doing a number of things wrong:
- Switching to the parent context in the else meant that we couldn't
break out of the else section anymore
- We were not validating the resulting values, and so the stack was
in a relatively unknown state after 'else'
This commit fixes these issues :^)
2022-02-16 22:48:32 +03:30
Ali Mohammad Pur
76ed7f2b20
LibWasm: Fix silly typo in f32 reinterpret validation
2021-12-21 05:03:44 +03:30
Ali Mohammad Pur
fecbf0e03a
LibWasm: Make blocks that take arguments actually work
...
Previously we were ignoring the actual parameters and setting the arity
to an incorrect value, which could cause crashes (or unexpected traps).
2021-12-21 05:03:44 +03:30
Ali Mohammad Pur
b5ca290605
LibWasm: Implement memory.init and passive mode data
2021-12-21 05:03:44 +03:30
Andreas Kling
03ddda7979
LibWasm: Fix broken build after merging un-rebased Validator changes
2021-11-11 09:27:00 +01:00
Ali Mohammad Pur
7d1142e2c8
LibWasm: Implement module validation
2021-11-11 09:20:04 +01:00