Skip to content

Interpreter: volatile ldobj appears to have incorrect semantics? #3865

Open
@alexrp

Description

Going by Ecma 335 III.4.13, it is my understanding that a sequence like

volatile.
ldobj MyType

should produce a volatile load. While one could argue that it's a store (the spec says "copy the value stored at address src to the stack"), interpreting it as a load seems more appropriate if one considers that the spec also says "if typeTok is not a generic parameter and either a reference type or a built-in value class, then the ldind instruction provides a shorthand for the ldobj instruction".

The relevant code:

category:correctness
theme:interpreter
skill-level:intermediate
cost:small

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Labels

    area-CodeGen-coreclrCLR JIT compiler in src/coreclr/src/jit and related components such as SuperPMIbughelp wanted[up-for-grabs] Good issue for external contributorsmemory modelissues associated with memory model

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions