Skip to content

Commit 816a955

Browse files
authored
Merge pull request #254 from nhynes/fix-sgx
Fix type error in SGX backtrace printing
2 parents e745627 + 10569cb commit 816a955

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

.github/workflows/main.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -183,7 +183,7 @@ jobs:
183183
runs-on: ubuntu-latest
184184
strategy:
185185
matrix:
186-
target: [wasm32-unknown-unknown, x86_64-fuchsia]
186+
target: [wasm32-unknown-unknown, wasm32-wasi, x86_64-fuchsia, x86_64-fortanix-unknown-sgx]
187187
steps:
188188
- uses: actions/checkout@master
189189
with:

src/print.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -198,8 +198,8 @@ impl BacktraceFrameFmt<'_, '_, '_> {
198198
// address here, which could be later mapped to correct function.
199199
#[cfg(all(feature = "std", target_env = "sgx"))]
200200
{
201-
frame_ip =
202-
usize::wrapping_sub(frame_ip, std::os::fortanix_sgx::mem::image_base() as _) as _;
201+
let image_base = std::os::fortanix_sgx::mem::image_base();
202+
frame_ip = usize::wrapping_sub(frame_ip as usize, image_base as _) as _;
203203
}
204204

205205
// Print the index of the frame as well as the optional instruction

0 commit comments

Comments
 (0)