This repository was archived by the owner on Mar 24, 2022. It is now read-only.
File tree Expand file tree Collapse file tree 3 files changed +10
-2
lines changed
lucet-runtime/lucet-runtime-internals/src Expand file tree Collapse file tree 3 files changed +10
-2
lines changed Original file line number Diff line number Diff line change @@ -10,7 +10,7 @@ cleanup() {
1010}
1111trap cleanup 1 2 3 6 15
1212
13- RUSTFMT_VERSION=1.4.8-nightly
13+ RUSTFMT_VERSION=1.4.9-stable
1414
1515if ! rustfmt --version | grep -q " rustfmt $RUSTFMT_VERSION " ; then
1616 echo " indent requires rustfmt $RUSTFMT_VERSION "
Original file line number Diff line number Diff 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;
Original file line number Diff line number Diff line change 1- nightly-2019-09-25
1+ 1.40.0
You can’t perform that action at this time.
0 commit comments