Skip to content

Investigate unreachable being reached #86

@jethrogb

Description

@jethrogb

Enclave code:

use std::process::abort;
use std::thread;

fn main() {
    std::env::set_var("RUST_BACKTRACE", "1");
    thread::spawn(|| loop {}).join();
}

Modify runner so wait returns a bogus value, e.g.

diff --git a/enclave-runner/src/usercalls/mod.rs b/enclave-runner/src/usercalls/mod.rs
index 290ff73..5c10e68 100644
--- a/enclave-runner/src/usercalls/mod.rs
+++ b/enclave-runner/src/usercalls/mod.rs
@@ -778,6 +778,7 @@ impl RunningTcs {
 
     #[inline(always)]
     fn wait(&mut self, event_mask: u64, timeout: u64) -> IoResult<u64> {
+        let timeout = 1;
         let wait = match timeout {
             WAIT_NO => false,
             WAIT_INDEFINITE => true,

Observe SIGILL (ud2) in the enclave in Condvar/MPSC logic.

Metadata

Metadata

Assignees

Labels

bugstd/rustcRequires changes in Rust std/rustc

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions