From: kernel test robot <lkp@intel.com>
To: Li Chen <me@linux.beauty>
Cc: oe-kbuild-all@lists.linux.dev
Subject: Re: [RFC PATCH 1/2] gcc-plugins: add cleanup_plugin for uninitialized cleanup detection
Date: Fri, 7 Nov 2025 15:39:04 +0800 [thread overview]
Message-ID: <202511071503.SwmZ6V4M-lkp@intel.com> (raw)
In-Reply-To: <20251105084733.3598704-6-me@linux.beauty>
Hi Li,
[This is a private test report for your RFC patch.]
kernel test robot noticed the following build errors:
[auto build test ERROR on kees/for-next/hardening]
[also build test ERROR on kees/for-next/pstore kees/for-next/kspp linus/master v6.18-rc4 next-20251107]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch#_base_tree_information]
url: https://github.com/intel-lab-lkp/linux/commits/Li-Chen/gcc-plugins-cleanup_plugin-detect-NULL-init/20251105-174800
base: https://git.kernel.org/pub/scm/linux/kernel/git/kees/linux.git for-next/hardening
patch link: https://lore.kernel.org/r/20251105084733.3598704-6-me%40linux.beauty
patch subject: [RFC PATCH 1/2] gcc-plugins: add cleanup_plugin for uninitialized cleanup detection
config: s390-randconfig-001-20251107 (https://download.01.org/0day-ci/archive/20251107/202511071503.SwmZ6V4M-lkp@intel.com/config)
compiler: s390-linux-gcc (GCC) 8.5.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20251107/202511071503.SwmZ6V4M-lkp@intel.com/reproduce)
If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202511071503.SwmZ6V4M-lkp@intel.com/
All errors (new ones prefixed by >>):
scripts/gcc-plugins/cleanup_plugin.c: In function 'void warn_if_uninitialized(tree)':
>> scripts/gcc-plugins/cleanup_plugin.c:70:45: error: 'struct diagnostic_context' has no member named 'warning_as_error_requested_p'; did you mean 'warning_as_error_requested'?
70 | saved_warning_as_error = global_dc->warning_as_error_requested_p();
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
| warning_as_error_requested
>> scripts/gcc-plugins/cleanup_plugin.c:71:20: error: 'struct diagnostic_context' has no member named 'set_warning_as_error_requested'; did you mean 'warning_as_error_requested'?
71 | global_dc->set_warning_as_error_requested(false);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| warning_as_error_requested
scripts/gcc-plugins/cleanup_plugin.c:77:20: error: 'struct diagnostic_context' has no member named 'set_warning_as_error_requested'; did you mean 'warning_as_error_requested'?
77 | global_dc->set_warning_as_error_requested(saved_warning_as_error);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| warning_as_error_requested
make[4]: *** [scripts/gcc-plugins/Makefile:54: scripts/gcc-plugins/cleanup_plugin.so] Error 1 shuffle=3970265060
make[4]: Target 'scripts/gcc-plugins/' not remade because of errors.
make[3]: *** [scripts/Makefile.build:556: scripts/gcc-plugins] Error 2 shuffle=3970265060
make[3]: Target 'scripts/' not remade because of errors.
make[2]: *** [Makefile:1263: scripts] Error 2 shuffle=3970265060
make[2]: Target 'prepare' not remade because of errors.
make[1]: *** [Makefile:248: __sub-make] Error 2 shuffle=3970265060
make[1]: Target 'prepare' not remade because of errors.
make: *** [Makefile:248: __sub-make] Error 2 shuffle=3970265060
make: Target 'prepare' not remade because of errors.
Kconfig warnings: (for reference only)
WARNING: unmet direct dependencies detected for OF_GPIO
Depends on [n]: GPIOLIB [=y] && OF [=y] && HAS_IOMEM [=n]
Selected by [m]:
- REGULATOR_RT5133 [=m] && REGULATOR [=y] && I2C [=m] && GPIOLIB [=y] && OF [=y]
vim +70 scripts/gcc-plugins/cleanup_plugin.c
56
57 static void warn_if_uninitialized(tree var)
58 {
59 location_t loc;
60 bool saved_warning_as_error;
61
62 if (has_declaration_initializer(var))
63 return;
64
65 loc = DECL_SOURCE_LOCATION(var);
66 if (loc == UNKNOWN_LOCATION)
67 return;
68
69 /* Temporarily disable treating warnings as errors for this specific warning */
> 70 saved_warning_as_error = global_dc->warning_as_error_requested_p();
> 71 global_dc->set_warning_as_error_requested(false);
72 warning_at(
73 loc, 0,
74 "%qD declared with cleanup attribute is not initialized at declaration",
75 var);
76 /* Restore the original setting */
77 global_dc->set_warning_as_error_requested(saved_warning_as_error);
78 }
79
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
next prev parent reply other threads:[~2025-11-07 7:39 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-11-05 8:46 [PATCH 0/3] dm-pcache: built-in support and metadata hardening Li Chen
2025-11-05 8:46 ` [PATCH 1/3] dm-pcache: allow built-in build and rename flush helper Li Chen
2025-11-05 8:46 ` [PATCH 2/3] dm-pcache: reuse meta_addr in pcache_meta_find_latest Li Chen
2025-11-05 8:46 ` [PATCH 3/3] dm-pcache: avoid leaking invalid metadata in pcache_meta_find_latest() Li Chen
2025-11-10 11:18 ` Dongsheng Yang
2025-11-10 12:32 ` Li Chen
2025-11-05 8:46 ` [RFC PATCH 0/2] Add cleanup_plugin for detecting problematic cleanup patterns Li Chen
2025-11-05 9:04 ` Li Chen
2025-11-05 9:49 ` Peter Zijlstra
2025-11-05 14:52 ` Li Chen
2025-11-05 8:46 ` [RFC PATCH 1/2] gcc-plugins: add cleanup_plugin for uninitialized cleanup detection Li Chen
2025-11-07 7:39 ` kernel test robot [this message]
2025-11-05 8:46 ` [RFC PATCH 2/2] gcc-plugins: cleanup_plugin: detect NULL init Li Chen
2025-11-05 12:41 ` [PATCH 0/3] dm-pcache: built-in support and metadata hardening Li Chen
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=202511071503.SwmZ6V4M-lkp@intel.com \
--to=lkp@intel.com \
--cc=me@linux.beauty \
--cc=oe-kbuild-all@lists.linux.dev \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.