All of lore.kernel.org
 help / color / mirror / Atom feed
From: Yonghong Song <yonghong.song@linux.dev>
To: Alexei Starovoitov <alexei.starovoitov@gmail.com>
Cc: bpf <bpf@vger.kernel.org>, Alexei Starovoitov <ast@kernel.org>,
	Andrii Nakryiko <andrii@kernel.org>,
	Daniel Borkmann <daniel@iogearbox.net>,
	Kernel Team <kernel-team@fb.com>,
	Martin KaFai Lau <martin.lau@kernel.org>
Subject: Re: [PATCH bpf-next] selftests/bpf: Fix RELEASE build failure with gcc14
Date: Tue, 17 Jun 2025 15:09:42 -0700	[thread overview]
Message-ID: <88cdbd9d-e0cf-443d-b3a2-28aa7e5d896c@linux.dev> (raw)
In-Reply-To: <CAADnVQKiTOst_qaN2azvg9JXqQPJ8SqE7LMPTWve6Omo=ZhLNw@mail.gmail.com>



On 6/17/25 10:24 AM, Alexei Starovoitov wrote:
> On Mon, Jun 16, 2025 at 9:50 PM Yonghong Song <yonghong.song@linux.dev> wrote:
>> With gcc14, when building with RELEASE=1, I hit four below compilation
>> failure:
>>
>> Error 1:
>>    In file included from test_loader.c:6:
>>    test_loader.c: In function ‘run_subtest’: test_progs.h:194:17:
>>        error: ‘retval’ may be used uninitialized in this function
>>     [-Werror=maybe-uninitialized]
>>      194 |                 fprintf(stdout, ##format);           \
>>          |                 ^~~~~~~
>>    test_loader.c:958:13: note: ‘retval’ was declared here
>>      958 |         int retval, err, i;
>>          |             ^~~~~~
>>
>>    The uninitialized var 'retval' actaully could cause incorrect result.
> actually
>
>> Error 2:
>>    In function ‘test_fd_array_cnt’:
>>    prog_tests/fd_array.c:71:14: error: ‘btf_id’ may be used uninitialized in this
>>        function [-Werror=maybe-uninitialized]
>>       71 |         fd = bpf_btf_get_fd_by_id(id);
>>          |              ^~~~~~~~~~~~~~~~~~~~~~~~
>>    prog_tests/fd_array.c:302:15: note: ‘btf_id’ was declared here
>>      302 |         __u32 btf_id;
>>          |               ^~~~~~
>>
>>    Changing ASSERT_GE to ASSERT_EQ can fix the compilation error. Otherwise,
>>    there is no functionality change.
>>
>> Error 3:
>>    prog_tests/tailcalls.c: In function ‘test_tailcall_hierarchy_count’:
>>    prog_tests/tailcalls.c:1402:23: error: ‘fentry_data_fd’ may be used uninitialized
>>        in this function [-Werror=maybe-uninitialized]
>>       1402 |                 err = bpf_map_lookup_elem(fentry_data_fd, &i, &val);
>>            |                       ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>>
>>    The code is correct. The change intends to slient gcc errors.
> to silence.
>
> Fixed the typos while applying.
> Pls use spell check.

Sorry about typo's. Will pay attention to spell check for later patches.


  reply	other threads:[~2025-06-17 22:09 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-06-17  4:49 [PATCH bpf-next] selftests/bpf: Fix RELEASE build failure with gcc14 Yonghong Song
2025-06-17 17:24 ` Alexei Starovoitov
2025-06-17 22:09   ` Yonghong Song [this message]
2025-06-17 18:15 ` patchwork-bot+netdevbpf

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=88cdbd9d-e0cf-443d-b3a2-28aa7e5d896c@linux.dev \
    --to=yonghong.song@linux.dev \
    --cc=alexei.starovoitov@gmail.com \
    --cc=andrii@kernel.org \
    --cc=ast@kernel.org \
    --cc=bpf@vger.kernel.org \
    --cc=daniel@iogearbox.net \
    --cc=kernel-team@fb.com \
    --cc=martin.lau@kernel.org \
    /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.