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

Commit 9239c97

Browse files
committed
switch rustc version back to stable; add note about callback safety
1 parent d3a1377 commit 9239c97

File tree

3 files changed

+10
-2
lines changed

3 files changed

+10
-2
lines changed

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)