[Bug gdb/34279] New: build failure on fedora rawhide x86-64 under clang: static_assert (sizeof (compat_x32_siginfo_t) == GDB_SI_SIZE);

fche at redhat dot com via Gdb-prs <[email protected]>
Newsgroups gmane.comp.gdb.bugs.discuss
Message-ID <[email protected]/bugzilla/>
https://sourceware.org/bugzilla/show_bug.cgi?id=34279

            Bug ID: 34279
           Summary: build failure on fedora rawhide x86-64 under clang:
                    static_assert (sizeof (compat_x32_siginfo_t) ==
                    GDB_SI_SIZE);
           Product: gdb
           Version: unknown
            Status: NEW
          Severity: normal
          Priority: P2
         Component: gdb
          Assignee: unassigned at sourceware dot org
          Reporter: fche at redhat dot com
  Target Milestone: ---

make[2]: Leaving directory
'/home/buildbot/buildbot/binutils-gdb-clang-fedrawhide-x86_64/build/gdb'
nat/amd64-linux-siginfo.c:610:16: error: static assertion failed due to
requirement 'sizeof(compat_x32_siginfo_t) == 128'
  610 | static_assert (sizeof (compat_x32_siginfo_t) == GDB_SI_SIZE);
      |                ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
nat/amd64-linux-siginfo.c:610:46: note: expression evaluates to '136 == 128'
  610 | static_assert (sizeof (compat_x32_siginfo_t) == GDB_SI_SIZE);
      |                ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~
1 error generated.

https://builder.sourceware.org/buildbot/#/builders/84/builds/5157/steps/3/logs/stdio


According to an ai speculation of the build logs, this may be likely due to
changes of clang versions:

The error was triggered by a compiler upgrade on the Fedora Rawhide buildbot
worker:
* **[Build
5155](https://builder.sourceware.org/testrun/432002d3102e15ef7f49e3f6e7cb0fc1bfb52180)**
(Completed successfully at 03:45 UTC) compiled with
`clang-22.1.6-6.fc45.x86_64`.
* **[Build
5156](https://builder.sourceware.org/testrun/6077e7a4f3cd813d13152111d4c227bf4a18c44d)**
(Started at 06:56 UTC) compiled with `clang-22.1.7-1.fc45.x86_64`.

The upgrade to **Clang 22.1.7** changed how the alignment attribute
`__attribute__ ((__aligned__ (4)))` is processed within aliases or structures,
resulting in different padding inside `compat_x32_siginfo_t` and increasing its
computed size from `128` bytes to `136` bytes.

-- 
You are receiving this mail because:
You are on the CC list for the bug.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.