Debian Bug report logs - #1104745
gcc-15 ICE compiling linux kernel 6.14.5 with CONFIG_RANDSTRUCT

Package: src:linux; Maintainer for src:linux is Debian Kernel Team <[email protected]>;

Reported by: Ingo Saitz <[email protected]>

Date: Mon, 5 May 2025 15:51:02 UTC

Severity: normal

Tags: moreinfo

Reply or subscribe to this bug.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to [email protected], Debian GCC Maintainers <[email protected]>:
Bug#1104745; Package gcc-15. (Mon, 05 May 2025 15:51:02 GMT) (full text, mbox, link).


Acknowledgement sent to Ingo Saitz <[email protected]>:
New Bug report received and forwarded. Copy sent to Debian GCC Maintainers <[email protected]>. (Mon, 05 May 2025 15:51:05 GMT) (full text, mbox, link).


Message #5 received at [email protected] (full text, mbox, reply):

From: Ingo Saitz <[email protected]>
To: Debian Bug Tracking System <[email protected]>
Subject: gcc-15 ICE compiling linux kernel 6.14.5 with CONFIG_RANDSTRUCT
Date: Mon, 05 May 2025 17:40:57 +0200
[Message part 1 (text/plain, inline)]
Package: gcc-15
Version: 15.1.0-3
Severity: normal

Dear Maintainer,

When compiling the linux kernel (tested on 6.15-rc5 and 6.14.5 from
kernel.org) with CONFIG_RANDSTRUCT enabled, gcc-15 throws an ICE:

arch/x86/kernel/cpu/proc.c:174:14: internal compiler error: in comptypes_check_enum_int, at c/c-typeck.cc:1516
  174 | const struct seq_operations cpuinfo_op = {
      |              ^~~~~~~~~~~~~~

I have attached a minmal config for 6.14.5 (make allnoconfig and then
enable CONFIG_RANDSTRUCT_PERFORMANCE) that exibits this behaviour plus
the full dump produced by gcc-15 -freport-bug. I build the kernel with

    make CC="gcc-15 -freport-bug" HOSTCC=gcc-15 V=1

Also CONFIG_RANDSTRUCT_FULL produces the same dump, the only
difference being the option
"-fplugin-arg-randomize_layout_plugin-performance-mode" left out.

The same config build on gcc-14 (Debian 14.2.0-19) 14.2.0 without ICE.

Thanks
    Ingo

-- System Information:
Distributor ID:	Devuan
Description:	Devuan GNU/Linux 6 (excalibur/ceres)
Release:	6
Codename:	excalibur ceres
Architecture: x86_64

Kernel: Linux 6.14.2-spatz20250410 (SMP w/4 CPU threads; PREEMPT)
Kernel taint flags: TAINT_FIRMWARE_WORKAROUND, TAINT_OOT_MODULE, TAINT_RANDSTRUCT
Locale: LANG=en_GB.UTF-8, LC_CTYPE=en_GB.UTF-8 (charmap=UTF-8), LANGUAGE=en_US:en
Shell: /bin/sh linked to /usr/bin/dash
Init: sysvinit (via /sbin/init)

Versions of packages gcc-15 depends on:
ii  binutils                 2.44-3
ii  cpp-15                   15.1.0-3
ii  gcc-15-base              15.1.0-3
ii  gcc-15-x86-64-linux-gnu  15.1.0-3

Versions of packages gcc-15 recommends:
ii  libc6-dev  2.41-7

Versions of packages gcc-15 suggests:
pn  gcc-15-doc       <none>
pn  gcc-15-locales   <none>
pn  gcc-15-multilib  <none>

-- no debconf information
[config (text/plain, attachment)]
[arch_x86_kernel_cpu_proc.out (text/plain, attachment)]

Information forwarded to [email protected], Debian GCC Maintainers <[email protected]>:
Bug#1104745; Package gcc-15. (Fri, 09 May 2025 07:24:01 GMT) (full text, mbox, link).


Acknowledgement sent to Ingo Saitz <[email protected]>:
Extra info received and forwarded to list. Copy sent to Debian GCC Maintainers <[email protected]>. (Fri, 09 May 2025 07:24:03 GMT) (full text, mbox, link).


Message #10 received at [email protected] (full text, mbox, reply):

From: Ingo Saitz <[email protected]>
To: [email protected]
Subject: Re: Bug#1104745: Acknowledgement (gcc-15 ICE compiling linux kernel 6.14.5 with CONFIG_RANDSTRUCT)
Date: Fri, 9 May 2025 09:13:37 +0200
[Message part 1 (text/plain, inline)]
I can build the Linux 6.14.5 kernel with CONFIG_RANDSTRUCT_PERFORMANCE
successfully using upstream gcc 15.1.0, so the bug seems to be
introduced by some of Debians patches (or pulls from upstream
development). See attached build.log and minimal config.

    Ingo
-- 
const_cast<long double>(Λ)
[build.log (application/octet-stream, attachment)]
[config (text/plain, attachment)]

Information forwarded to [email protected], Debian GCC Maintainers <[email protected]>:
Bug#1104745; Package gcc-15. (Mon, 12 May 2025 12:27:02 GMT) (full text, mbox, link).


Acknowledgement sent to Matthias Klose <[email protected]>:
Extra info received and forwarded to list. Copy sent to Debian GCC Maintainers <[email protected]>. (Mon, 12 May 2025 12:27:02 GMT) (full text, mbox, link).


Message #15 received at [email protected] (full text, mbox, reply):

From: Matthias Klose <[email protected]>
To: [email protected], Ingo Saitz <[email protected]>
Subject: Re: Bug#1104745: Acknowledgement (gcc-15 ICE compiling linux kernel 6.14.5 with CONFIG_RANDSTRUCT)
Date: Mon, 12 May 2025 14:25:24 +0200
Control: tags -1 + moreinfo

from the attached preprocessed source ...

please can you report the issue, where you got this plugin from?

// gcc version 15.1.0 (Debian 15.1.0-3)
//
// *** WARNING *** there are active plugins, do not report this as a bug 
unless you can reproduce it without enabling any plugins.
// Event                            | Plugins
// PLUGIN_FINISH_TYPE               | randomize_layout_plugin
// PLUGIN_FINISH_DECL               | randomize_layout_plugin
// PLUGIN_ATTRIBUTES                | randomize_layout_plugin
// PLUGIN_ALL_IPA_PASSES_START      | randomize_layout_plugin
// arch/x86/kernel/cpu/proc.c:174:14: internal compiler error: in 
comptypes_check_enum_int, at c/c-typeck.cc:1516
//   174 | const struct seq_operations cpuinfo_op = {
//       |              ^~~~~~~~~~~~~~
// 0x1cf8479 internal_error(char const*, ...)
// 	../../src/gcc/diagnostic-global-context.cc:517
// 0x1cf85eb fancy_abort(char const*, int, char const*)
// 	../../src/gcc/diagnostic.cc:1749
// 0x750e68 comptypes_check_enum_int(tree_node*, tree_node*, bool*)
// 	../../src/gcc/c/c-typeck.cc:1516
// 0x750e68 comptypes_check_enum_int(tree_node*, tree_node*, bool*)
// 	../../src/gcc/c/c-typeck.cc:1510
// 0x24161fd diagnose_mismatched_decls
// 	../../src/gcc/c/c-decl.cc:2170
// 0x24148ff duplicate_decls
// 	../../src/gcc/c/c-decl.cc:3169
// 0x1d93668 pushdecl(tree_node*)
// 	../../src/gcc/c/c-decl.cc:3376
// 0x1df85c4 start_decl(c_declarator*, c_declspecs*, bool, tree_node*, 
bool, unsigned long*)
// 	../../src/gcc/c/c-decl.cc:5773
// 0x2409a09 c_parser_declaration_or_fndef
// 	../../src/gcc/c/c-parser.cc:2846
// 0x2408fbc c_parser_external_declaration
// 	../../src/gcc/c/c-parser.cc:2105
// 0x2405314 c_parser_translation_unit
// 	../../src/gcc/c/c-parser.cc:1959
// 0x2405314 c_parse_file()
// 	../../src/gcc/c/c-parser.cc:29790
// 0x240237d c_common_parse_file()
// 	../../src/gcc/c-family/c-opts.cc:1379




Added tag(s) moreinfo. Request was from Matthias Klose <[email protected]> to [email protected]. (Mon, 12 May 2025 12:27:02 GMT) (full text, mbox, link).


Information forwarded to [email protected], Debian GCC Maintainers <[email protected]>:
Bug#1104745; Package gcc-15. (Mon, 12 May 2025 16:24:01 GMT) (full text, mbox, link).


Acknowledgement sent to Ingo Saitz <[email protected]>:
Extra info received and forwarded to list. Copy sent to Debian GCC Maintainers <[email protected]>. (Mon, 12 May 2025 16:24:01 GMT) (full text, mbox, link).


Message #22 received at [email protected] (full text, mbox, reply):

From: Ingo Saitz <[email protected]>
To: Matthias Klose <[email protected]>
Cc: [email protected]
Subject: Re: Bug#1104745: Acknowledgement (gcc-15 ICE compiling linux kernel 6.14.5 with CONFIG_RANDSTRUCT)
Date: Mon, 12 May 2025 18:21:08 +0200
On Mon, May 12, 2025 at 02:25:24PM +0200, Matthias Klose wrote:
> Control: tags -1 + moreinfo
> 
> from the attached preprocessed source ...
> 
> please can you report the issue, where you got this plugin from?

The plugin is part of the linux kernel compilation process to randomize
structure layout. This plugin was from vanilla 6.14.5 linux kernel sources,
in scripts/gcc-plugins/randomize_layout_plugin.c . It gets build and used
automatically when CONFIG_RANDSTRUCT_PERFORMANCE (or _FULL) is enabled.

    Ingo
-- 
const_cast<long double>(Λ)



Information forwarded to [email protected], Debian GCC Maintainers <[email protected]>:
Bug#1104745; Package gcc-15. (Tue, 13 May 2025 08:36:01 GMT) (full text, mbox, link).


Acknowledgement sent to Matthias Klose <[email protected]>:
Extra info received and forwarded to list. Copy sent to Debian GCC Maintainers <[email protected]>. (Tue, 13 May 2025 08:36:01 GMT) (full text, mbox, link).


Message #27 received at [email protected] (full text, mbox, reply):

From: Matthias Klose <[email protected]>
To: Ingo Saitz <[email protected]>
Cc: [email protected]
Subject: Re: Bug#1104745: Acknowledgement (gcc-15 ICE compiling linux kernel 6.14.5 with CONFIG_RANDSTRUCT)
Date: Tue, 13 May 2025 10:33:09 +0200
Control: reassign -1 src:linux

On 12.05.25 18:21, Ingo Saitz wrote:
> On Mon, May 12, 2025 at 02:25:24PM +0200, Matthias Klose wrote:
>> Control: tags -1 + moreinfo
>>
>> from the attached preprocessed source ...
>>
>> please can you report the issue, where you got this plugin from?
> 
> The plugin is part of the linux kernel compilation process to randomize
> structure layout. This plugin was from vanilla 6.14.5 linux kernel sources,
> in scripts/gcc-plugins/randomize_layout_plugin.c . It gets build and used
> automatically when CONFIG_RANDSTRUCT_PERFORMANCE (or _FULL) is enabled.
> 
>      Ingo

according to GCC upstream developers, this should be forwarded upstream 
for linux.




Bug reassigned from package 'gcc-15' to 'src:linux'. Request was from Matthias Klose <[email protected]> to [email protected]. (Tue, 13 May 2025 08:36:01 GMT) (full text, mbox, link).


No longer marked as found in versions gcc-15/15.1.0-3. Request was from Matthias Klose <[email protected]> to [email protected]. (Tue, 13 May 2025 08:36:01 GMT) (full text, mbox, link).


Send a report that this bug log contains spam.


Debian bug tracking system administrator <[email protected]>. Last modified: Tue May 13 13:44:14 2025; Machine Name: bembo

Debian Bug tracking system

Debbugs is free software and licensed under the terms of the GNU General Public License version 2. The current version can be obtained from https://bugs.debian.org/debbugs-source/.

Copyright © 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson, 2005-2017 Don Armstrong, and many other contributors.