Attention needed from Owners Override
Adam Perry has uploaded the change for review![Open in Gerrit]()
Adam Perry would like Owners Override to review this change.
Commit message
[fuchsia_runtime] Scope thread_self access.
This fixes a rare edge case where the Unowned could be
observed after the calling thread had exited because Unowned implements
Send and was returned with the 'static lifetime. Making any syscalls on
that handle would return bad handle errors and run afoul of bad handle
policy if we manage to turn it on.
Forces callers to use a lifetime from their own stack, analogous to
Rust's thread-local APIs. This guarantees that callers will be unable to
observe the Unowned after the handle it references is closed. Callers
who need a 'static handle reference can duplicate the handle, as this
change updates some existing callers to do.
Change-Id: Iebf5781feda7d6f8a5f9c550c4f704ba6bbd37e7
Change information
Files:
- M sdk/lib/scheduler/rust/src/lib.rs
- M sdk/lib/scheduler/rust/tests/src/main.rs
- M sdk/rust/zx/src/futex.rs
- M sdk/rust/zx/src/process.rs
- M sdk/rust/zx/src/thread.rs
- M src/devices/bin/driver-host/src/driver_host.rs
- M src/diagnostics/validator/logs/sink/puppet/rust/src/main.rs
- M src/lib/diagnostics/inspect/contrib/rust/src/self_profile.rs
- M src/lib/diagnostics/log/bench/src/common.rs
- M src/lib/diagnostics/log/rust/src/fuchsia/sink.rs
- M src/lib/fuchsia-runtime/src/lib.rs
- M src/performance/memory/heapdump/instrumentation/src/profiler.rs
- M src/starnix/kernel/logging/logging.rs
- M src/starnix/kernel/task/current_task.rs
- M src/starnix/kernel/task/scheduler/manager.rs
- M src/starnix/kernel/task/syscalls.rs
- M src/starnix/lib/starnix_sync/src/interruptible_event.rs
- M src/sys/component_manager/tests/crash_introspect/report_then_panic_on_start.rs
- M src/zircon/bin/role_manager/tests/integration/src/main.rs
Change size: M
Delta: 19 files changed, 79 insertions(+), 55 deletions(-)
Open in GerritRelated details
Attention is currently required from:
Gerrit-MessageType: newchange
Gerrit-Project: fuchsia
Gerrit-Branch: main
Gerrit-Change-Id: Iebf5781feda7d6f8a5f9c550c4f704ba6bbd37e7
Gerrit-Change-Number: 1312625
Gerrit-PatchSet: 2
You received this message because you are subscribed to the Google Groups "owners-override" group.
To unsubscribe from this group and stop receiving emails from it, send an email to
.