Skip to content

Variables annotated with _Atomic display incorrectly in watch window. #554

@thynnmas

Description

@thynnmas

Hi.

Encountere this issue with the following struct, containing C11 atomics:

typedef struct mqueue {
   volatile _Atomic u64 allocated;
   volatile _Atomic u64 posted;
   volatile _Atomic u64 read;
   volatile atomic_ullong freed;
   volatile u64 test;
   
   u64 mask, msz;
   void *base;
} mqueue;
Image

It appears the type is seen as just volatile, and the size of the type is interpreted as zero, resulting in the entire type being put into a padding field.

Compiled with:

clang version 20.1.7
Target: x86_64-pc-windows-msvc
Thread model: posix

Metadata

Metadata

Assignees

No one assigned

    Labels

    BugA report of unintended or broken behavior.DebuggerPertains to the debugger.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions