Skip to content

Memory ordering in jvm_objectmonitor #58

@chacon01

Description

@chacon01

The release_store_thread function

inline static void release_store_thread(volatile pthread_t* dest,
        pthread_t val) {
    READ_MEM_BARRIER;
    *dest = val;
    WRITE_MEM_BARRIER;
}

does not provide release semantics. When this is inlined into jvmObjectMonitorExitEpilog, it permits the store to omonitor->_succ to be visible after the store to omonitor->_owner, which violates what is expected in the JVM code.

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