page: content key works without SharedArrayBuffer; SP leg tests native-debian

moduleContentKey (3e8dab8e) tested 'bytes.buffer instanceof
SharedArrayBuffer', a ReferenceError in the single-thread build, so every
in-place install trapped (SP page busybox and gears failed in integ-1010b).
It uses isShared() now. The SP smoke leg's default demos replace the x86
'debian' rootfs, which nothing builds, with native-debian.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
Claude-Session: https://claude.ai/code/session_781bad2ec05143db9067c86b4b2678e2
This commit is contained in:
velzieandClaude Opus 5.5 committed 2026-10-11 02:52:22 -04:00
1 parent 250df34867
commit 07f1ed19d8
2 files changed
+3 -3

No files matched your search

+1 -1
View File
@@ -221,7 +221,7 @@ function moduleContentKey(bytes) {
let a = 0x811c9dc5;
let b = 0x9e3779b9;
const n = bytes.length >>> 2;
const words = (bytes.byteOffset & 3) === 0 && !(bytes.buffer instanceof SharedArrayBuffer)
const words = (bytes.byteOffset & 3) === 0 && !isShared(bytes.buffer)
? new Uint32Array(bytes.buffer, bytes.byteOffset, n)
: null;
for (let i = 0; i < n; i++) {
+2 -2
View File
@@ -7,7 +7,7 @@
# must run the single build. Each demo must pass, and the terminal must
# say it was the single build, so a silent fallback cannot pass.
#
# tests/single/run.sh [gexc] # demos: SP_DEMOS (default busybox debian gears)
# tests/single/run.sh [gexc] # demos: SP_DEMOS (default busybox native-debian gears)
#
# Needs web/build-all.sh --sp (or --both) first: web/dist-sp, served
# without COOP/COEP from its own dist. The gears demo also needs a
@@ -22,7 +22,7 @@ fail=0
out=${WORK:-$root/target/single-test}
mkdir -p "$out"
[ -d "$root/web/dist-sp" ] || { echo "FAIL single-page (no web/dist-sp: run web/build-all.sh --sp)"; exit 1; }
for d in ${SP_DEMOS:-busybox debian gears}; do
for d in ${SP_DEMOS:-busybox native-debian gears}; do
(cd "$root" && GEX_DIST="$root/web/dist-sp" GEX_NO_COI=1 GEX_TAIL=0 GEX_STDERR=all node web/test/site.mjs "$d") > "$out/site-$d.txt" 2>&1; rc=$?
if [ $rc = 0 ] && grep -aq 'single-thread build (no SharedArrayBuffer)' "$out/site-$d.txt"; then
echo "ok single-page $d"