[llvm-bugs] [Bug 50091] New: __builtin_dump_struct crashed on struct with bitfields

via llvm-bugs llvm-bugs at lists.llvm.org
Fri Apr 23 02:15:30 PDT 2021


https://bugs.llvm.org/show_bug.cgi?id=50091

            Bug ID: 50091
           Summary: __builtin_dump_struct crashed on struct with bitfields
           Product: clang
           Version: 11.0
          Hardware: PC
                OS: Windows NT
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: C
          Assignee: unassignedclangbugs at nondot.org
          Reporter: ijkxyz at msn.com
                CC: blitzrakete at gmail.com, dgregor at apple.com,
                    erik.pilkington at gmail.com, llvm-bugs at lists.llvm.org,
                    richard-llvm at metafoo.co.uk

Created attachment 24795
  --> https://bugs.llvm.org/attachment.cgi?id=24795&action=edit
clang created preprocessed source file and script

The following code makes clang crash. It happened on clang8, clang11 and
clang12.

typedef union {
        struct {
                int a : 2;
                int b : 2;
        };
        int asInt;
} MyBitFields;

MyBitFields r;

int main() {
        __builtin_dump_struct(&r, &printf);
        return 0;
}

-- 
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20210423/e612d4c3/attachment-0001.html>


More information about the llvm-bugs mailing list