Pinned env.rs and Unix/Windows env storage. Os is a lossless target OS string, never a host String approximation. All memory operations are effectful leaves and must preserve provenance, allocation kinds, and race checks.
@[reducible, inline]
Instances For
- variables : Array (ByteArray × Memory.Pointer P)
- environ : Memory.Pointer P
Instances For
@[instance_reducible]
@[instance_reducible]
Equations
Equations
- One or more equations did not get rendered due to their size.
Instances For
- family : ForeignItems.Family
- emptyOs : Os
- concatOs : Os → Os → Os
- asciiOs : String → Os
- isEmpty : Os → Bool
- containsEquals : Os → Bool
- nullPointer : Memory.Pointer P
- isNull : Memory.Pointer P → M S Bool
- readCString : Memory.Pointer P → M S ByteArray
- allocCString : ByteArray → Kind → M S (Memory.Pointer P)
- allocPointerCell : Kind → M S (Memory.Pointer P)
- allocPointerArray : Nat → Kind → M S (Memory.Pointer P)
- projectPointerElement : Memory.Pointer P → Nat → Nat → M S (Memory.Pointer P)
- readPointer : Memory.Pointer P → M S (Memory.Pointer P)
- writePointer : Memory.Pointer P → Memory.Pointer P → M S Unit
- offset : Memory.Pointer P → UInt64 → M S (Memory.Pointer P)
- deallocate : Memory.Pointer P → Kind → M S Unit
- readWideString : Memory.Pointer P → M S Os
- allocWideString : Os → Kind → M S (Memory.Pointer P)
Instances For
def
Miri.Interpreter.EnvVars.allocEnvironmentBlock
{P Os S : Type}
(h : Hooks P Os S)
(values : Array (Memory.Pointer P))
:
M S (Memory.Pointer P)
Equations
- One or more equations did not get rendered due to their size.
Instances For
def
Miri.Interpreter.EnvVars.allocVariable
{P Os S : Type}
(h : Hooks P Os S)
(name value : ByteArray)
:
M S (Memory.Pointer P)
Equations
- Miri.Interpreter.EnvVars.allocVariable h name value = h.allocCString (name ++ { data := #[61] } ++ value) Miri.Interpreter.EnvVars.Kind.machine
Instances For
def
Miri.Interpreter.EnvVars.getPointer
{P Os S : Type}
(h : Hooks P Os S)
(name : ByteArray)
:
M S (Option (Memory.Pointer P))
The environ cell read is required even when the lookup misses: it participates in data-race detection. The returned pointer aliases the actual name=value allocation.
Equations
- One or more equations did not get rendered due to their size.
Instances For
def
Miri.Interpreter.EnvVars.getEnv
{Os P S : Type}
[DecidableEq Os]
(h : Hooks P Os S)
(name : Os)
:
Equations
- One or more equations did not get rendered due to their size.
Instances For
def
Miri.Interpreter.EnvVars.getenv
{P Os S : Type}
(h : Hooks P Os S)
(name : Memory.Pointer P)
:
M S (Memory.Pointer P)
Equations
- One or more equations did not get rendered due to their size.
Instances For
def
Miri.Interpreter.EnvVars.setenv
{P Os S : Type}
(h : Hooks P Os S)
(namePointer valuePointer : Memory.Pointer P)
:
Equations
- One or more equations did not get rendered due to their size.
Instances For
def
Miri.Interpreter.EnvVars.unsetenv
{P Os S : Type}
(h : Hooks P Os S)
(namePointer : Memory.Pointer P)
:
Equations
- One or more equations did not get rendered due to their size.
Instances For
def
Miri.Interpreter.EnvVars.init
{Os P S : Type}
[DecidableEq Os]
(h : Hooks P Os S)
(communicate : Bool)
(forwarded : Array Os)
(environment overrides : Array (Os × Os))
:
Config environment is supplied evidence. No process environment is read implicitly, and explicit overrides win after forwarding.
Equations
- One or more equations did not get rendered due to their size.
Instances For
def
Miri.Interpreter.EnvVars.getEnvironmentVariableW
{Os P S : Type}
[DecidableEq Os]
(h : Hooks P Os S)
(name buffer : Memory.Pointer P)
(size : UInt32)
:
Equations
- One or more equations did not get rendered due to their size.
Instances For
def
Miri.Interpreter.EnvVars.getEnvironmentStringsW
{P Os S : Type}
(h : Hooks P Os S)
:
M S (Memory.Pointer P)
Equations
- One or more equations did not get rendered due to their size.
Instances For
def
Miri.Interpreter.EnvVars.freeEnvironmentStringsW
{P Os S : Type}
(h : Hooks P Os S)
(pointer : Memory.Pointer P)
:
Equations
Instances For
def
Miri.Interpreter.EnvVars.setEnvironmentVariableW
{Os P S : Type}
[DecidableEq Os]
(h : Hooks P Os S)
(namePointer valuePointer : Memory.Pointer P)
:
Equations
- One or more equations did not get rendered due to their size.
Instances For
- communicate : Bool
- family : ForeignItems.Family
- os : String
Authoritative thread manager check includes termination and ID validity.
Instances For
Equations
- Miri.Interpreter.EnvVars.getPid h = if h.communicate = true then h.hostPid else pure 1000
Instances For
Equations
- One or more equations did not get rendered due to their size.
Instances For
Equations
- Miri.Interpreter.EnvVars.currentTid h = do let __do_lift ← h.activeThread Miri.Interpreter.EnvVars.getTid h __do_lift
Instances For
Equations
- One or more equations did not get rendered due to their size.
Instances For
All environment-owned pointer roots, including the stable environ cell. Windows/Uninit store no provenance. GC must visit these without dereferencing.
Equations
- Miri.Interpreter.EnvVars.provenanceRoots Miri.Interpreter.EnvVars.State.uninit = #[]
- Miri.Interpreter.EnvVars.provenanceRoots (Miri.Interpreter.EnvVars.State.windows variables) = #[]
- Miri.Interpreter.EnvVars.provenanceRoots (Miri.Interpreter.EnvVars.State.unix vars) = #[vars.environ] ++ Array.map (fun (x : ByteArray × Miri.Memory.Pointer P) => x.snd) vars.variables