Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 942303 - sys-kernel/gentoo-kernel-bin-6.6.57 does not compile with CFLAGS="-Og"
Summary: sys-kernel/gentoo-kernel-bin-6.6.57 does not compile with CFLAGS="-Og"
Status: IN_PROGRESS
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal
Assignee: Distribution Kernel Project
URL:
Whiteboard: 6.6-66
Keywords: InVCS
Depends on:
Blocks:
 
Reported: 2024-10-26 21:04 UTC by Christopher Byrne
Modified: 2024-10-27 13:40 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
build.log (build.log,52.70 KB, text/x-log)
2024-10-26 21:04 UTC, Christopher Byrne
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Christopher Byrne 2024-10-26 21:04:46 UTC
Created attachment 906940 [details]
build.log

When -Og is in CFLAGS, the compile fails

btf_dump.c: In function ‘btf_dump_emit_bit_padding’:
btf_dump.c:903:42: error: ‘new_off’ may be used uninitialized [-Werror=maybe-uninitialized]
  903 |         if (new_off > cur_off && new_off <= next_off) {
      |                                  ~~~~~~~~^~~~~~~~~~~
btf_dump.c:870:13: note: ‘new_off’ was declared here
  870 |         int new_off, pad_bits, bits, i;
      |             ^~~~~~~
btf_dump.c:917:25: error: ‘pad_type’ may be used uninitialized [-Werror=maybe-uninitialized]
  917 |                         btf_dump_printf(d, "\n%s%s: %d;", pfx(lvl), pad_type,
      |                         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  918 |                                         in_bitfield ? new_off - cur_off : 0);
      |                                         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
btf_dump.c:871:21: note: ‘pad_type’ was declared here
  871 |         const char *pad_type;
      |                     ^~~~~~~~
btf_dump.c:930:20: error: ‘pad_bits’ may be used uninitialized [-Werror=maybe-uninitialized]
  930 |                 if (bits == pad_bits) {
      |                    ^
btf_dump.c:870:22: note: ‘pad_bits’ was declared here
  870 |         int new_off, pad_bits, bits, i;
      |                      ^~~~~~~~


If -Og is disabled it compiles. Patches have been submitted to upstream to fix: https://lore.kernel.org/lkml/ZxlrAiA2t00YMjRz@x1/T/
Comment 2 Mike Pagano gentoo-dev 2024-10-26 22:48:22 UTC
Queued for the next genpatches 6.6 patchset.

Is this needed for other versions ?
Comment 3 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2024-10-27 01:17:15 UTC
We may need them for 6.10+6.11 too but I haven't checked
Comment 4 Mike Pagano gentoo-dev 2024-10-27 13:40:36 UTC
Queued for 6.11.X