Phase 2: unsafe operations and trusted boundaries (RFC 0009)
- air: string literals (trusted line only), trusted obligation on functions, assume, borrow.index.unchecked - verifier: unsafe stage (E6001 outside_boundary / trusted_declares_unsafe); effect stage leaves unsafe to it, so trusted functions discharge it; assume establishes bounds facts - interp: T0009 for detected unsafe precondition violations - aji check --report unsafe: trusted functions with obligations, unsafe functions, unsafe operations with their boundary - feature unsafe published and supported; 10 conformance tests; 3000 mutants without a crash
This commit is contained in:
1 parent
c510a37cf9
commit
008654999e
24 files changed
+422
-18
No files matched your search
@@ -0,0 +1,19 @@
|
||||
; A safe function calls an unsafe one without a trusted boundary.
|
||||
; expect: reject E6001
|
||||
; phase: 2
|
||||
; spec: docs/spec/13-contracts-and-unsafe.md
|
||||
module test.unsafe_call_from_safe
|
||||
air 0
|
||||
lang 0.1
|
||||
features [arrays, effects, ownership, unsafe]
|
||||
|
||||
fn @f() -> void
|
||||
effects []
|
||||
entry:
|
||||
call @raw()
|
||||
ret
|
||||
|
||||
fn @raw() -> void
|
||||
effects [unsafe]
|
||||
entry:
|
||||
ret
|
||||
Reference in new issue
Block a user