Skip to content
This repository was archived by the owner on Mar 24, 2022. It is now read-only.

Commit 1889b11

Browse files
authored
Merge pull request #383 from bytecodealliance/acf/gardening
Switch back to stable, make local `make test` target cheaper
2 parents d3a1377 + 809ba7a commit 1889b11

File tree

5 files changed

+21
-7
lines changed

5 files changed

+21
-7
lines changed

.github/workflows/main.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ jobs:
1414
# This action builds the container and executes the test suite inside it.
1515
- uses: ./.github/actions/test
1616
with:
17-
target: test
17+
target: test-full
1818

1919
- name: Ensure testing did not change sources
2020
run: git diff --exit-code

Makefile

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,11 +21,10 @@ install-dev: build-dev
2121
@helpers/install.sh --unoptimized
2222

2323
.PHONY: test
24-
test: indent-check test-except-fuzz test-fuzz
24+
test: indent-check test-packages
2525

26-
.PHONY: test-except-fuzz
27-
test-except-fuzz:
28-
cargo build -p lucet-spectest # build but *not* run spectests to mitigate bitrot while spectests don't pass
26+
.PHONY: test-packages
27+
test-packages:
2928
cargo test --no-fail-fast \
3029
-p lucet-runtime-internals \
3130
-p lucet-runtime \
@@ -35,6 +34,13 @@ test-except-fuzz:
3534
-p lucet-wasi \
3635
-p lucet-wasi-fuzz \
3736
-p lucet-validate
37+
38+
.PHONY: test-full
39+
test-full: indent-check test-except-fuzz test-fuzz
40+
41+
.PHONY: test-except-fuzz
42+
test-except-fuzz: test-packages
43+
cargo build -p lucet-spectest # build but *not* run spectests to mitigate bitrot while spectests don't pass
3844
cargo test --benches -p lucet-benchmarks -- --test # run the benchmarks in debug mode
3945
helpers/lucet-toolchain-tests/signature.sh
4046

helpers/indent.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ cleanup() {
1010
}
1111
trap cleanup 1 2 3 6 15
1212

13-
RUSTFMT_VERSION=1.4.8-nightly
13+
RUSTFMT_VERSION=1.4.9-stable
1414

1515
if ! rustfmt --version | grep -q "rustfmt $RUSTFMT_VERSION"; then
1616
echo "indent requires rustfmt $RUSTFMT_VERSION"

lucet-runtime/lucet-runtime-internals/src/vmctx.rs

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -272,11 +272,19 @@ impl Vmctx {
272272
/// This is useful when a hostcall takes a function pointer as its argument, as WebAssembly uses
273273
/// table indices as its runtime representation of function pointers.
274274
///
275+
/// # Safety
276+
///
275277
/// We do not currently reflect function type information into the Rust type system, so callers
276278
/// of the returned function must take care to cast it to the correct type before calling. The
277279
/// correct type will include the `vmctx` argument, which the caller is responsible for passing
278280
/// from its own context.
279281
///
282+
/// There is currently no guarantee that guest functions will return before faulting, or
283+
/// terminating the instance in a subsequent hostcall. This means that any Rust resources that
284+
/// are held open when the guest function is called might be leaked if the guest function, for
285+
/// example, divides by zero. Work to make this safer is
286+
/// [ongoing](https://github.com/bytecodealliance/lucet/pull/254).
287+
///
280288
/// ```no_run
281289
/// use lucet_runtime_macros::lucet_hostcall;
282290
/// use lucet_runtime_internals::lucet_hostcall_terminate;

rust-toolchain

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
nightly-2019-09-25
1+
1.40.0

0 commit comments

Comments
 (0)