Commit 79bf3e0
authored
[SPLIT_MODULE] Fix imports into deferred module when loading (#25621)
Fix an error when attempted to reserve a new memory space in the
deferred module when building with MEMORY64 + SPLIT_MODULE.
```
TypeError: Cannot convert <func ptr> to a BigInt
```
In a mem64 build, we call applySignatureConversions on `malloc()` in the
wasmExports. `applySignatureConversions()` wraps the exports and
converts the return value to a javascript number. The wasmExports is
passed into the deferred module during instantiation so when we call a
malloc in the deferred module, we'd be calling the wrapped function,
hitting into this error.
Furthermore, we are making a direct call when calling a malloc, so
strictly speaking, we should not need to go through the JS trampoline.1 parent 47b155d commit 79bf3e0
File tree
4 files changed
+16
-2
lines changed- src
- lib
- test/other
4 files changed
+16
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
523 | 523 | | |
524 | 524 | | |
525 | 525 | | |
526 | | - | |
| 526 | + | |
527 | 527 | | |
528 | 528 | | |
529 | 529 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
289 | 289 | | |
290 | 290 | | |
291 | 291 | | |
| 292 | + | |
| 293 | + | |
| 294 | + | |
292 | 295 | | |
293 | 296 | | |
294 | 297 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
514 | 514 | | |
515 | 515 | | |
516 | 516 | | |
517 | | - | |
| 517 | + | |
518 | 518 | | |
519 | 519 | | |
520 | 520 | | |
| |||
734 | 734 | | |
735 | 735 | | |
736 | 736 | | |
| 737 | + | |
| 738 | + | |
| 739 | + | |
737 | 740 | | |
738 | 741 | | |
739 | 742 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
10 | 18 | | |
0 commit comments