Skip to content

fix: bigint - x panicked through every fused subtraction opcode #505

fix: bigint - x panicked through every fused subtraction opcode

fix: bigint - x panicked through every fused subtraction opcode #505

Workflow file for this run

name: gengo-ci
env:
WASMTIME_VERSION: v46.0.1
WASMTIME_SHA256: 9ae0b17ea298bcc52277a8208d6ab7fae8e1a89579672f9d82f9d86c116edb62
BINARYEN_VERSION: version_130
BINARYEN_SHA256: 0a18362361ad05465118cd8eeb72edaeec89de6894bc283576ef4e07aa3babcc
on:
push:
branches:
- '**'
paths-ignore:
- 'docs/**'
- '*.md'
- 'dev-docs/**'
- 'LICENSE'
pull_request:
paths-ignore:
- 'docs/**'
- '*.md'
- 'dev-docs/**'
- 'LICENSE'
jobs:
test:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Zig
uses: mlugg/setup-zig@v2
with:
version: 0.16.0
- name: Install wasmtime
run: |
set -euo pipefail
TARBALL="wasmtime-${WASMTIME_VERSION}-x86_64-linux.tar.xz"
URL="https://github.com/bytecodealliance/wasmtime/releases/download/${WASMTIME_VERSION}/${TARBALL}"
for attempt in 1 2 3; do
echo "Downloading wasmtime ${WASMTIME_VERSION} (attempt ${attempt})..."
curl -fsSL --retry 3 --retry-delay 5 "$URL" -o "/tmp/${TARBALL}" && break
[ "$attempt" -lt 3 ] && sleep 15 || exit 1
done
echo "${WASMTIME_SHA256} /tmp/${TARBALL}" | sha256sum --check --strict
tar -xJf "/tmp/${TARBALL}" -C /tmp
mkdir -p "$HOME/.wasmtime/bin"
mv "/tmp/wasmtime-${WASMTIME_VERSION}-x86_64-linux/wasmtime" "$HOME/.wasmtime/bin/"
echo "$HOME/.wasmtime/bin" >> "$GITHUB_PATH"
- name: Install wasm-opt
run: |
TARBALL="binaryen-${BINARYEN_VERSION}-x86_64-linux.tar.gz"
curl -fsSL "https://github.com/WebAssembly/binaryen/releases/download/${BINARYEN_VERSION}/${TARBALL}" -o "/tmp/${TARBALL}"
echo "${BINARYEN_SHA256} /tmp/${TARBALL}" | sha256sum --check --strict
tar -xzf "/tmp/${TARBALL}"
echo "$PWD/binaryen-${BINARYEN_VERSION}/bin" >> "$GITHUB_PATH"
- name: Check formatting and whitespace
run: |
zig fmt --check build.zig src tools examples
git diff --check
- name: Run test suite
run: zig build -Dpreset=dev test
- name: Run benchmarks
run: zig build -Dpreset=dev bench
- name: Run native capability tests
run: zig build -Dpreset=dev native-cap
- name: Check chaos test discipline (every .gengo needs .out or .err)
run: |
shopt -s nullglob
errors=0
for f in tests/chaos/*.gengo; do
base="${f%.gengo}"
if [ ! -f "$base.out" ]; then
echo "FAIL: $f has no .out file"
errors=$((errors + 1))
fi
done
for f in tests/chaos/fail/*.gengo; do
base="${f%.gengo}"
if [ ! -f "$base.err" ]; then
echo "FAIL: $f has no .err file"
errors=$((errors + 1))
fi
done
for f in tests/chaos/*.out; do
base="${f%.out}"
if [ ! -f "$base.gengo" ]; then
echo "FAIL: $f has no corresponding .gengo (orphaned .out)"
errors=$((errors + 1))
fi
done
for f in tests/chaos/fail/*.err; do
base="${f%.err}"
if [ ! -f "$base.gengo" ]; then
echo "FAIL: $f has no corresponding .gengo (orphaned .err)"
errors=$((errors + 1))
fi
done
if [ $errors -gt 0 ]; then
echo "test discipline FAILED: $errors errors"
exit 1
fi
echo "test discipline OK"
- name: Run chaos tests
run: zig build -Dpreset=dev chaos
- name: Run heap tests
run: zig build -Dpreset=dev heap-test
stress-test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: mlugg/setup-zig@v2
with:
version: 0.16.0
- name: Install wasmtime
run: |
set -euo pipefail
TARBALL="wasmtime-${WASMTIME_VERSION}-x86_64-linux.tar.xz"
URL="https://github.com/bytecodealliance/wasmtime/releases/download/${WASMTIME_VERSION}/${TARBALL}"
for attempt in 1 2 3; do
curl -fsSL --retry 3 --retry-delay 5 "$URL" -o "/tmp/${TARBALL}" && break
[ "$attempt" -lt 3 ] && sleep 15 || exit 1
done
echo "${WASMTIME_SHA256} /tmp/${TARBALL}" | sha256sum --check --strict
tar -xJf "/tmp/${TARBALL}" -C /tmp
mkdir -p "$HOME/.wasmtime/bin"
mv "/tmp/wasmtime-${WASMTIME_VERSION}-x86_64-linux/wasmtime" "$HOME/.wasmtime/bin/"
echo "$HOME/.wasmtime/bin" >> "$GITHUB_PATH"
- name: Install wasm-opt
run: |
TARBALL="binaryen-${BINARYEN_VERSION}-x86_64-linux.tar.gz"
curl -fsSL "https://github.com/WebAssembly/binaryen/releases/download/${BINARYEN_VERSION}/${TARBALL}" -o "/tmp/${TARBALL}"
echo "${BINARYEN_SHA256} /tmp/${TARBALL}" | sha256sum --check --strict
tar -xzf "/tmp/${TARBALL}"
echo "$PWD/binaryen-${BINARYEN_VERSION}/bin" >> "$GITHUB_PATH"
- name: Run tests under stress preset (tight heap/stack limits)
run: zig build -Dpreset=stress test
gc-stress-test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: mlugg/setup-zig@v2
with:
version: 0.16.0
- name: Install wasmtime
run: |
set -euo pipefail
TARBALL="wasmtime-${WASMTIME_VERSION}-x86_64-linux.tar.xz"
URL="https://github.com/bytecodealliance/wasmtime/releases/download/${WASMTIME_VERSION}/${TARBALL}"
for attempt in 1 2 3; do
curl -fsSL --retry 3 --retry-delay 5 "$URL" -o "/tmp/${TARBALL}" && break
[ "$attempt" -lt 3 ] && sleep 15 || exit 1
done
echo "${WASMTIME_SHA256} /tmp/${TARBALL}" | sha256sum --check --strict
tar -xJf "/tmp/${TARBALL}" -C /tmp
mkdir -p "$HOME/.wasmtime/bin"
mv "/tmp/wasmtime-${WASMTIME_VERSION}-x86_64-linux/wasmtime" "$HOME/.wasmtime/bin/"
echo "$HOME/.wasmtime/bin" >> "$GITHUB_PATH"
- name: Install wasm-opt
run: |
TARBALL="binaryen-${BINARYEN_VERSION}-x86_64-linux.tar.gz"
curl -fsSL "https://github.com/WebAssembly/binaryen/releases/download/${BINARYEN_VERSION}/${TARBALL}" -o "/tmp/${TARBALL}"
echo "${BINARYEN_SHA256} /tmp/${TARBALL}" | sha256sum --check --strict
tar -xzf "/tmp/${TARBALL}"
echo "$PWD/binaryen-${BINARYEN_VERSION}/bin" >> "$GITHUB_PATH"
- name: Run GC stress tests (GC on every allocation)
run: zig build -Dpreset=dev -Dgc_stress=true test
heap-paranoia-test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: mlugg/setup-zig@v2
with:
version: 0.16.0
- name: Install wasmtime
run: |
set -euo pipefail
TARBALL="wasmtime-${WASMTIME_VERSION}-x86_64-linux.tar.xz"
URL="https://github.com/bytecodealliance/wasmtime/releases/download/${WASMTIME_VERSION}/${TARBALL}"
for attempt in 1 2 3; do
curl -fsSL --retry 3 --retry-delay 5 "$URL" -o "/tmp/${TARBALL}" && break
[ "$attempt" -lt 3 ] && sleep 15 || exit 1
done
echo "${WASMTIME_SHA256} /tmp/${TARBALL}" | sha256sum --check --strict
tar -xJf "/tmp/${TARBALL}" -C /tmp
mkdir -p "$HOME/.wasmtime/bin"
mv "/tmp/wasmtime-${WASMTIME_VERSION}-x86_64-linux/wasmtime" "$HOME/.wasmtime/bin/"
echo "$HOME/.wasmtime/bin" >> "$GITHUB_PATH"
- name: Install wasm-opt
run: |
TARBALL="binaryen-${BINARYEN_VERSION}-x86_64-linux.tar.gz"
curl -fsSL "https://github.com/WebAssembly/binaryen/releases/download/${BINARYEN_VERSION}/${TARBALL}" -o "/tmp/${TARBALL}"
echo "${BINARYEN_SHA256} /tmp/${TARBALL}" | sha256sum --check --strict
tar -xzf "/tmp/${TARBALL}"
echo "$PWD/binaryen-${BINARYEN_VERSION}/bin" >> "$GITHUB_PATH"
- name: Run tests with heap paranoia (assert no live regions overwritten)
run: zig build -Dpreset=dev -Dheap_paranoia=true test