Commit a24c691
authored
fix: WASM signature mismatch in block fractional-indexing allocator (#42)
cloudsync_memory_alloc (dbmem_alloc, uint64_t) was cast directly into
fractional_indexing_allocator.malloc (void *(*)(size_t)). Native size_t
is 64-bit so the cast is a no-op, but WASM size_t is 32-bit and
call_indirect enforces strict typing: the function is registered as
(i64)->i32 and called as (i32)->i32, crashing cloudsync_set_column on
a table with pre-existing rows during the block-index migration.
Bridge via fi_malloc_wrapper, mirroring the existing fi_calloc_wrapper
pattern. Native builds are unaffected.
Bumps CLOUDSYNC_VERSION to 1.0.16.1 parent 79a3496 commit a24c691
3 files changed
Lines changed: 14 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
7 | 13 | | |
8 | 14 | | |
9 | 15 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
127 | 127 | | |
128 | 128 | | |
129 | 129 | | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
130 | 136 | | |
131 | 137 | | |
132 | 138 | | |
133 | 139 | | |
134 | 140 | | |
135 | 141 | | |
136 | 142 | | |
137 | | - | |
| 143 | + | |
138 | 144 | | |
139 | 145 | | |
140 | 146 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
18 | 18 | | |
19 | 19 | | |
20 | 20 | | |
21 | | - | |
| 21 | + | |
22 | 22 | | |
23 | 23 | | |
24 | 24 | | |
| |||
0 commit comments