Skip to main content

ArgMemKind

Enum ArgMemKind 

Source
pub enum ArgMemKind {
    NonPtr,
    MutPtr,
    ConstPtr,
    Opaque,
    OutPtr,
}
Expand description

The memory kind of one prototyped-external parameter, as seen by the RAM argmem model. An external can only touch memory we model through pointers we pass it (its own libc-internal state lives outside the lifted image), so each pointer parameter bounds a whole-object effect on the caller’s argument.

The variants are ordered so the analysis layer needs no C-type data of its own: it reads this per-input kind (kept in lockstep with the materialized register-interface inputs) plus the function-level variadic flag.

Variants§

§

NonPtr

A non-pointer scalar (integer/float): the external cannot reach any memory we model through it. No effect.

§

MutPtr

A mutable data pointer (char *, void *, struct S *): a whole-object read+write effect on the addressed object — the callee may both read the pre-call contents and clobber them (strcat’s dest, realloc). The read half means a frame-local landing goes ⊤ (freshness), so such a pointer is not memory-free-composable through an uninitialized local.

§

ConstPtr

A const-qualified data pointer (const char *): a whole-object read-only effect on the addressed object.

§

Opaque

A pointer the shallow whole-object model cannot bound: a function/callback pointer (re-enters our code — qsort’s comparator), or a pointer to another pointer / an unmodeled pointee (a transitive write escapes the addressed object). Its presence sends the whole external footprint to ⊤.

§

OutPtr

A write-only destination pointer (memset/memcpy dest): the callee never reads the pre-call contents, only clobbers them. A pure whole-object write, so a frame-local landing is contained (the memset(&local) fold). Minted only for symbols the extern_argmem write-only table vouches for (libc semantics guarantee the destination is never read before write).

Appended last on purpose: bincode encodes a fieldless enum by variant index, so keeping NonPtr/MutPtr/ConstPtr/Opaque at their old indices lets pre-OutPtr .harbinger snapshots still decode.

Trait Implementations§

Source§

impl Clone for ArgMemKind

Source§

fn clone(&self) -> ArgMemKind

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Copy for ArgMemKind

Source§

impl Debug for ArgMemKind

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<'de> Deserialize<'de> for ArgMemKind

Source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
Source§

impl Eq for ArgMemKind

Source§

impl PartialEq for ArgMemKind

Source§

fn eq(&self, other: &ArgMemKind) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl Serialize for ArgMemKind

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more
Source§

impl StructuralPartialEq for ArgMemKind

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.