Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SGX implementation is broken #359

Open
mzohreva opened this issue Oct 11, 2022 · 1 comment
Open

SGX implementation is broken #359

mzohreva opened this issue Oct 11, 2022 · 1 comment

Comments

@mzohreva
Copy link

When running cargo test --target x86_64-fortanix-unknown-sgx on an SGX-capable machine, I either get a segfault or a test hanging indefinitely, e.g.

$ git status 
HEAD detached at 0.12.1
$ cargo t --target x86_64-fortanix-unknown-sgx
warning: unused return value of `Box::<T>::from_raw` that must be used
   --> core/src/parking_lot.rs:251:17
    |
251 |                 Box::from_raw(new_table);
    |                 ^^^^^^^^^^^^^^^^^^^^^^^^^
    |
    = note: call `drop(from_raw(ptr))` if you intend to drop the `Box`
    = note: `#[warn(unused_must_use)]` on by default

warning: `parking_lot_core` (lib) generated 1 warning
    Finished test [unoptimized + debuginfo] target(s) in 0.03s
     Running unittests src/lib.rs (target/x86_64-fortanix-unknown-sgx/debug/deps/parking_lot-4edebee113afb83b)

running 86 tests
test condvar::tests::notify_all ... ok
test condvar::tests::notify_all_return ... ok
test condvar::tests::notify_one ... ok
test condvar::tests::notify_one_return_false ... ok
test condvar::tests::notify_one_return_true ... ok
test condvar::tests::smoke ... ok
test condvar::tests::test_condvar_requeue ... ok
test condvar::tests::test_debug_condvar ... ok
test condvar::tests::test_issue_129 ... FAILED
test condvar::tests::two_mutexes - should panic ... ok
test condvar::tests::two_mutexes_disjoint ... FAILED
test condvar::tests::wait_for ... FAILED
test condvar::tests::wait_until ... FAILED
test condvar::tests::wait_while_until_internal ... ok
test condvar::tests::wait_while_until_internal_does_not_wait_if_initially_false ... ok
test condvar::tests::wait_while_until_internal_times_out_before_false ... FAILED
test condvar::webkit_queue_test::new_test_without_timeout_5 ... ERROR: while running "ftxsgx-runner" "/tmp/parking_lot/target/x86_64-fortanix-unknown-sgx/debug/deps/parking_lot-4edebee113afb83b.sgxs" got signal: 11
error: test failed, to rerun pass `--lib`

Caused by:
  process didn't exit successfully: `ftxsgx-runner-cargo /tmp/parking_lot/target/x86_64-fortanix-unknown-sgx/debug/deps/parking_lot-4edebee113afb83b` (exit status: 1)

Testing 0.8.0 (first version where SGX implementation is included) gives similar result.
Some additional details:

$ rustc -V
rustc 1.66.0-nightly (81f391930 2022-10-09)

cc @jethrogb and @faern

@Amanieu
Copy link
Owner

Amanieu commented Oct 11, 2022

I don't have an SGX-capable machine to test this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants