Commit e2a805a
Zachary Whitley
docs(patches): carry jco #1574 — browser file read BigInt bounds coercion
Establish patches/jco/ + docs/upstream-patches.md as the
register for compatibility patches carried locally against
published upstream WASI / browser runtime layers.
Adds the first entry:
Patch: bytecodealliance/jco#1574
Reason: browser p2-shim file read BigInt bounds incompatibility
(Uint8Array.slice rejects the canonical-ABI BigInt
offset and length arguments)
Scope: JCO preview2/browser shim only
(packages/preview2-shim/lib/browser/filesystem.js
Descriptor.read)
Removal condition: first jco release containing #1574 or equivalent
upstream fix (detected at apply time via
'typeof offset === "bigint"' against the browser
filesystem.js source)
Substrate impact: none — patch lives in the compatibility layer,
not in any consumer's substrate code
Carried so that any consumer of @tegmentum/wasi-polyfill picks
up the corrected browser compatibility behavior without having
to learn about JCO's browser BigInt bug or carry a private
workaround.
Patch file applies with:
patch -p5 -d <shim-dir> < patches/jco/1574-coerce-browser-file-read-bounds-to-numbers.patch
against a copy of @bytecodealliance/preview2-shim's browser
build (verified on 0.18.0).
See docs/upstream-patches.md for the active/retired patch
register and the lifecycle of a carried patch.
Signed-off-by: Zachary Whitley <zachary.whitley@tegmentum.ai>1 parent 14a5322 commit e2a805a
2 files changed
Lines changed: 82 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
Lines changed: 32 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
0 commit comments