Skip to content

Atomic operations on intptr_t (__intcap_t) generate invalid code #224

@davidchisnall

Description

@davidchisnall
_Atomic(uintptr_t) uintptr;
...
uintptr++

Generates the following code sequence on CHERIoT:

8000740c: 0601955b      ct.cincoffset   ca0, cgp, 0x60
80007410: 0085255b      ct.csetbounds   ca0, ca0, 0x8
80007414: 01854283      ct.clbu t0, 0x18(ca0)

I'm not sure why it's trying to load a byte from out of the bounds of the object, or why it's trying to load a byte at all.

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