mirror of
https://github.com/microsoft/regorus.git
synced 2026-08-05 02:16:11 +00:00
feat: Detect incorrect multi-threaded use from c based ffi (#499)
Add runtime detection for shared handle misuse wrap the FFI engine handle with parking_lot::RwLock when the new contention_checks feature is enabled, surfacing a clear “handle is already in use” error instead of allowing undefined behavior keep the feature optional so no_std builds or environments that supply their own synchronization can opt out caution users that this guards the handle itself but does not make the engine’s operations globally thread-safe on its own Signed-off-by: Anand Krishnamoorthi <anakrish@microsoft.com>
This commit is contained in:
committed by
GitHub
parent
ad8c543fb5
commit
688e6128d4
1
.github/workflows/test-ffi.yml
vendored
1
.github/workflows/test-ffi.yml
vendored
@@ -24,4 +24,5 @@ jobs:
|
||||
cargo fetch
|
||||
cargo build -r --frozen
|
||||
cargo clippy --all-targets --no-deps -- -Dwarnings
|
||||
cargo test --features contention_checks --frozen
|
||||
working-directory: ./bindings/ffi
|
||||
|
||||
Reference in New Issue
Block a user