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

Stack unwinding improvements #254

Open
wants to merge 37 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
37 commits
Select commit Hold shift + click to select a range
68df400
appears to be a start
awortman-fastly Jun 12, 2020
dfd8e25
temporarily disable panic_unwind in hostcall macro
acfoltzer Jul 22, 2019
6c0916d
WIP, get pieces in place for backstop CFI directives to work
awortman-fastly Jul 29, 2019
bf50796
add ld argumet to get eh_frame_hdr emitted
awortman-fastly Aug 7, 2019
e6d35dc
temporarily copy in Rust's system unwinder bindings, and win in ph2
acfoltzer Aug 7, 2019
2d2bb60
experimental checkin of CFA calculation expression
acfoltzer Aug 10, 2019
f5255b2
🎉 add CFI for all saved registers in the backstop
acfoltzer Aug 13, 2019
d5b2306
remove the attempt at a landing pad, and its associated code
acfoltzer Aug 13, 2019
75ab740
add nested hostcall unwinding test
acfoltzer Aug 13, 2019
1bd449d
add test that panics across guest with callee-saved variables
acfoltzer Aug 13, 2019
cc36826
update cranelift version and add callee-saved regs test
acfoltzer Aug 14, 2019
65beada
add (currently-ignored) callee-saved registers test
acfoltzer Aug 15, 2019
829124a
switch to the most recent working nightly, and fix for wasi-sdk 6
acfoltzer Sep 18, 2019
e7026d2
add `#[unwind(allowed)]` to hostcalls and enable relevant test
acfoltzer Sep 27, 2019
e96dd2d
add unwind attribute to spectest crate, install nightly in devenv
acfoltzer Sep 27, 2019
84d9394
wip: induce unwinding when resetting a faulted instance
acfoltzer Oct 1, 2019
c988266
add stub function so we can pad stack to ABI requirements
awortman-fastly Oct 3, 2019
91a777e
add a helper to push values onto a guest stack
awortman-fastly Oct 4, 2019
a6d2262
found some sharp bits
awortman-fastly Oct 4, 2019
2cbbd9f
only force an unwind if n>0 host frames are on a guest stack
awortman-fastly Oct 8, 2019
01b1ea3
test and support forced unwinding of guests stopped from stack overflows
awortman-fastly Oct 8, 2019
61e083c
improve forced unwinding in cases with termination and yield
acfoltzer Oct 10, 2019
8d98bc8
simplify unwinding implementation by using `Faulted` state
acfoltzer Oct 10, 2019
9b627e2
add rudimentary backtrace support, still needs to be cleaned up
acfoltzer Oct 11, 2019
7460113
address rebase conflicts in host tests
iximeow Jan 15, 2020
ff3a4d7
misimplemented some cranelift functions, fix that
iximeow Jan 16, 2020
4af7b7e
adjust cfi expressions to use the correct parent_ctx offset
iximeow Jan 18, 2020
ce5b86f
fix conflict from rebase
iximeow Jan 18, 2020
0d9db26
eh_frame writing needs to be upstream
iximeow Jun 19, 2020
6ddb7a3
forced unwinding of guests has had its assumptions challenged
iximeow Jun 19, 2020
a0aa813
roll back the last of lucetc eh_frame emission changes. this should a…
iximeow Jun 19, 2020
bb27ee7
rustfmt
iximeow Jun 19, 2020
6510c4c
tidy a little more
iximeow Jun 19, 2020
486ae6a
.eh_frame generation can happen in lucet now
iximeow Jun 23, 2020
4d68f0b
fix macos sysdeps
iximeow Jun 23, 2020
caa1152
get mutex-poisoning tests well-behaved for multiple region impls
iximeow Jun 23, 2020
d10bd0a
implement stack redzone for uffd
iximeow Jun 25, 2020
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
68 changes: 33 additions & 35 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions benchmarks/lucet-benchmarks/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
#![feature(unwind_attributes)]

mod compile;
mod context;
mod modules;
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.12-stable
RUSTFMT_VERSION=1.4.15-nightly

if ! rustfmt --version | grep -q "rustfmt $RUSTFMT_VERSION"; then
echo "indent requires rustfmt $RUSTFMT_VERSION"
Expand Down
2 changes: 1 addition & 1 deletion lucet-module/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ edition = "2018"

[dependencies]
anyhow = "1.0"
cranelift-entity = { path = "../wasmtime/cranelift/entity", version = "0.64.0" }
cranelift-entity = { path = "../wasmtime/cranelift/entity", version = "0.65.0" }
serde = { version = "1.0", features = ["derive"] }
serde_json = "1.0"
bincode = "1.1.4"
Expand Down
1 change: 1 addition & 0 deletions lucet-runtime/lucet-runtime-internals/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ lucet-module = { path = "../../lucet-module", version = "=0.7.0-dev" }
lucet-runtime-macros = { path = "../lucet-runtime-macros", version = "=0.7.0-dev" }

anyhow = "1.0"
backtrace = "0.3"
bitflags = "1.0"
bincode = "1.1.4"
byteorder = "1.3"
Expand Down
Loading