Skip to content
This repository was archived by the owner on Mar 24, 2022. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
# This action builds the container and executes the test suite inside it.
- uses: ./.github/actions/test
with:
target: test
target: test-full

- name: Ensure testing did not change sources
run: git diff --exit-code
Expand Down
14 changes: 10 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,10 @@ install-dev: build-dev
@helpers/install.sh --unoptimized

.PHONY: test
test: indent-check test-except-fuzz test-fuzz
test: indent-check test-packages

.PHONY: test-except-fuzz
test-except-fuzz:
cargo build -p lucet-spectest # build but *not* run spectests to mitigate bitrot while spectests don't pass
.PHONY: test-packages
test-packages:
cargo test --no-fail-fast \
-p lucet-runtime-internals \
-p lucet-runtime \
Expand All @@ -35,6 +34,13 @@ test-except-fuzz:
-p lucet-wasi \
-p lucet-wasi-fuzz \
-p lucet-validate

.PHONY: test-full
test-full: indent-check test-except-fuzz test-fuzz

.PHONY: test-except-fuzz
test-except-fuzz: test-packages
cargo build -p lucet-spectest # build but *not* run spectests to mitigate bitrot while spectests don't pass
cargo test --benches -p lucet-benchmarks -- --test # run the benchmarks in debug mode
helpers/lucet-toolchain-tests/signature.sh

Expand Down
2 changes: 1 addition & 1 deletion helpers/indent.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ cleanup() {
}
trap cleanup 1 2 3 6 15

RUSTFMT_VERSION=1.4.8-nightly
RUSTFMT_VERSION=1.4.9-stable

if ! rustfmt --version | grep -q "rustfmt $RUSTFMT_VERSION"; then
echo "indent requires rustfmt $RUSTFMT_VERSION"
Expand Down
8 changes: 8 additions & 0 deletions lucet-runtime/lucet-runtime-internals/src/vmctx.rs
Original file line number Diff line number Diff line change
Expand Up @@ -272,11 +272,19 @@ impl Vmctx {
/// This is useful when a hostcall takes a function pointer as its argument, as WebAssembly uses
/// table indices as its runtime representation of function pointers.
///
/// # Safety
///
/// We do not currently reflect function type information into the Rust type system, so callers
/// of the returned function must take care to cast it to the correct type before calling. The
/// correct type will include the `vmctx` argument, which the caller is responsible for passing
/// from its own context.
///
/// There is currently no guarantee that guest functions will return before faulting, or
/// terminating the instance in a subsequent hostcall. This means that any Rust resources that
/// are held open when the guest function is called might be leaked if the guest function, for
/// example, divides by zero. Work to make this safer is
/// [ongoing](https://github.com/bytecodealliance/lucet/pull/254).
///
/// ```no_run
/// use lucet_runtime_macros::lucet_hostcall;
/// use lucet_runtime_internals::lucet_hostcall_terminate;
Expand Down
2 changes: 1 addition & 1 deletion rust-toolchain
Original file line number Diff line number Diff line change
@@ -1 +1 @@
nightly-2019-09-25
1.40.0