James B:
> That's strange.
> Which kernel version did you try to compile?
> I have just upgraded to gcc 12.2.0 as well and if this gcc has problems
> building kernels (new and old), I'll be stuck as well ...

My current development base version is v5.10.
I tried aufs5.10, and failed compiling tools/lib/subcmd/subcmd-util.h.
There is a commit in v5.17-rc5,

----------------------------------------
commit 52a9dab6d892763b2a8334a568bd4e2c1a6fde66
Author: Kees Cook <keesc...@chromium.org>
Date:   Sun Feb 13 10:24:43 2022 -0800

    libsubcmd: Fix use-after-free for realloc(..., 0)

    GCC 12 correctly reports a potential use-after-free condition in the
    xrealloc helper. Fix the warning by avoiding an implicit "free(ptr)"
    when size == 0:

    In file included from help.c:12:
    In function 'xrealloc',
        inlined from 'add_cmdname' at help.c:24:2: subcmd-util.h:56:23: error: p
ointer may be used after 'realloc' [-Werror=use-after-free]
       56 |                 ret = realloc(ptr, size);
          |                       ^~~~~~~~~~~~~~~~~~
:::


J. R. Okajima

Reply via email to