Two Lucet-related fixes to stack overflow handling.
Lucet uses stack probes rather than explicit stack limit checks as Wasmtime does. In bytecodealliance/lucet#616, I have discovered that I previously was not running some Lucet runtime tests with the new backend, so was missing some test failures due to missing pieces in the new backend. This PR adds (i) calls to probestack, when enabled, in the prologue of every function with a stack frame larger than one page (configurable via flags); and (ii) trap metadata for every instruction on x86-64 that can access the stack, hence be the first point at which a stack overflow is detected when the stack pointer is decremented.
This commit is contained in:
13
.github/workflows/main.yml
vendored
13
.github/workflows/main.yml
vendored
@@ -60,7 +60,10 @@ jobs:
|
||||
# nightly-only feature right now.
|
||||
- uses: ./.github/actions/install-rust
|
||||
with:
|
||||
toolchain: nightly
|
||||
# TODO (rust-lang/rust#79661): We are seeing an internal compiler error when
|
||||
# building with the latest (2020-12-06) nightly; pin on a slightly older
|
||||
# version for now.
|
||||
toolchain: nightly-2020-11-29
|
||||
- run: cargo doc --no-deps --all --exclude wasmtime-cli --exclude test-programs --exclude cranelift-codegen-meta
|
||||
- run: cargo doc --package cranelift-codegen-meta --document-private-items
|
||||
- uses: actions/upload-artifact@v1
|
||||
@@ -145,7 +148,7 @@ jobs:
|
||||
# flags to rustc.
|
||||
- uses: ./.github/actions/install-rust
|
||||
with:
|
||||
toolchain: nightly
|
||||
toolchain: nightly-2020-11-29
|
||||
- run: cargo install cargo-fuzz --vers "^0.8"
|
||||
- run: cargo fetch
|
||||
working-directory: ./fuzz
|
||||
@@ -202,7 +205,7 @@ jobs:
|
||||
rust: beta
|
||||
- build: nightly
|
||||
os: ubuntu-latest
|
||||
rust: nightly
|
||||
rust: nightly-2020-11-29
|
||||
- build: macos
|
||||
os: macos-latest
|
||||
rust: stable
|
||||
@@ -292,7 +295,7 @@ jobs:
|
||||
submodules: true
|
||||
- uses: ./.github/actions/install-rust
|
||||
with:
|
||||
toolchain: nightly
|
||||
toolchain: nightly-2020-11-29
|
||||
- uses: ./.github/actions/define-llvm-env
|
||||
|
||||
# Install wasm32 targets in order to build various tests throughout the
|
||||
@@ -303,7 +306,7 @@ jobs:
|
||||
# Run the x64 CI script.
|
||||
- run: ./ci/run-experimental-x64-ci.sh
|
||||
env:
|
||||
CARGO_VERSION: "+nightly"
|
||||
CARGO_VERSION: "+nightly-2020-11-29"
|
||||
RUST_BACKTRACE: 1
|
||||
|
||||
# Build and test the wasi-nn module.
|
||||
|
||||
Reference in New Issue
Block a user