Repository navigation
Commit be2811d
[wasm] Derive the typer's Wasm exports from a WasmModuleInterface
The typer predicts which objects a Wasm module imports and under which
names the lifted module re-exports them, but it used its own copy of
the lifter's rules. For JS functions, these had drifted: the lifter
imports a JS function once per Wasm signature of the wasmJsCalls that
call it and once per signature type of the table entries that hold it,
while the typer registered it once per JS signature. So the typer's
iw<n> exports could differ from the actual ones.
This CL adds WasmModuleInterface, which records the imports and
definitions of a module with the **lifter's** rules and derives the
export names from them. The JSTyper records it while typing the module
and derives the type of the exports object from it.
The subsequent CL will make WasmLifter reuse the typer's results,
so that the two can't get out of sync anymore.
Misc:
- Re-exported JS functions are now typed with their import's Wasm
signature converted to JS, instead of the JS function's own signature,
as the re-export converts arguments and results according to the
import's signature.
- The typer doesn't need its DefUseAnalyzer anymore, so this also
removes it and the isBundle parameter that only served it.
Bug: 555602358
Change-Id: I3d97343782bf8160a0260a625c892e6c3981f377
Reviewed-on: https://chrome-internal-review.googlesource.com/c/v8/fuzzilli/+/9910835
Reviewed-by: Matthias Liedtke <mliedtke@google.com>
Commit-Queue: Leon Bettscheider <bettscheider@chromium.org>1 parent d01e5fe commit be2811d
11 files changed
Lines changed: 354 additions & 256 deletions
File tree
- Sources/Fuzzilli
- Base
- CodeGen
- FuzzIL
- Lifting
- Minimization
- Tests/FuzzilliTests
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
226 | 226 | | |
227 | 227 | | |
228 | 228 | | |
229 | | - | |
| 229 | + | |
230 | 230 | | |
231 | 231 | | |
232 | 232 | | |
| |||
1842 | 1842 | | |
1843 | 1843 | | |
1844 | 1844 | | |
1845 | | - | |
| 1845 | + | |
1846 | 1846 | | |
1847 | 1847 | | |
1848 | 1848 | | |
| |||
8122 | 8122 | | |
8123 | 8123 | | |
8124 | 8124 | | |
8125 | | - | |
| 8125 | + | |
| 8126 | + | |
| 8127 | + | |
8126 | 8128 | | |
8127 | 8129 | | |
8128 | 8130 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
599 | 599 | | |
600 | 600 | | |
601 | 601 | | |
602 | | - | |
603 | | - | |
| 602 | + | |
| 603 | + | |
| 604 | + | |
604 | 605 | | |
605 | 606 | | |
606 | 607 | | |
| |||
652 | 653 | | |
653 | 654 | | |
654 | 655 | | |
655 | | - | |
656 | | - | |
| 656 | + | |
| 657 | + | |
| 658 | + | |
657 | 659 | | |
658 | 660 | | |
659 | 661 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
37 | 37 | | |
38 | 38 | | |
39 | 39 | | |
40 | | - | |
41 | | - | |
| 40 | + | |
42 | 41 | | |
43 | 42 | | |
44 | 43 | | |
45 | 44 | | |
46 | | - | |
47 | | - | |
48 | | - | |
49 | | - | |
50 | | - | |
51 | 45 | | |
52 | 46 | | |
53 | 47 | | |
54 | 48 | | |
55 | | - | |
56 | 49 | | |
57 | 50 | | |
58 | 51 | | |
| |||
61 | 54 | | |
62 | 55 | | |
63 | 56 | | |
64 | | - | |
65 | | - | |
66 | | - | |
67 | 57 | | |
68 | 58 | | |
69 | 59 | | |
| |||
0 commit comments