Skip to content

The reference makes guarantees about "stack memory" that do not reflect our op.sem #1489

Open
@RalfJung

Description

@RalfJung

https://doc.rust-lang.org/reference/variables.html says that "A local variable (or stack-local allocation) holds a value directly, allocated within the stack's memory." However, on the level of the Abstract Machine, there is no such thing as "the stack's memory". All allocated objects are placed at arbitrary locations in memory and there is no guarantee whatsoever that stack allocations are in "the stack" or Box allocations are on "the heap".

For instance, many local variables end up not having any actual memory allocated anywhere as they are entirely turned into registers.

The wording in the reference should be adjusted to avoid claims that cannot be held up by the Abstract Machine.

Thanks to @tautschnig for pointing this out.

Cc @rust-lang/opsem

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions