From: Stefan Liebler <stli@linux.ibm.com>
To: Adhemerval Zanella Netto <adhemerval.zanella@linaro.org>,
libc-alpha@sourceware.org
Subject: Re: [PATCH] Fix stringop-overflow warning in tst-strlcat2.
Date: Mon, 5 Feb 2024 15:15:36 +0100 [thread overview]
Message-ID: <1a1c8a1a-7d96-42cb-b16f-387ca6c810ea@linux.ibm.com> (raw)
In-Reply-To: <162bd443-2625-4179-8f34-cca94cacac38@linaro.org>
On 05.02.24 14:53, Adhemerval Zanella Netto wrote:
>
>
> On 16/01/24 05:44, Stefan Liebler wrote:
>> On s390x, I get warnings like this when do_one_test is inlined with SIZE_MAX:
>> In function ‘do_one_test’,
>> inlined from ‘do_overflow_tests’ at tst-strlcat2.c:184:2:
>> tst-strlcat2.c:49:18: error: ‘strnlen’ specified bound [18446744073709550866, 18446744073709551615] exceeds maximum object size 9223372036854775807 [-Werror=stringop-overflow=]
>> 49 | # define STRNLEN strnlen
>> | ^
>> tst-strlcat2.c:89:23: note: in expansion of macro ‘STRNLEN’
>> 89 | size_t dst_length = STRNLEN (dst, n);
>> | ^~~~~~~
>>
>> This patch just marks the do_one_test function as noinline as also done in test-strncat.c:
>> Fix stringop-overflow warning in test-strncat.
>> https://sourceware.org/git/?p=glibc.git;a=commit;h=51aeab9a363a0d000d0912aa3d6490463a26fba2
>
> LGTM, although I am not seeing this failure with gcc 13.2.1 on x86_64
> nor on s390x (building with -Os).
>
Thanks and committed.
Yes, you are right. The recent gcc's on s390x does not inline so much as
with older versions. If I remember correctly, starting with gcc 10,
inlining was reduced (for s390x).
prev parent reply other threads:[~2024-02-05 14:15 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-01-16 8:44 Stefan Liebler
2024-02-05 13:28 ` Stefan Liebler
2024-02-05 13:29 ` Stefan Liebler
2024-02-05 13:53 ` Adhemerval Zanella Netto
2024-02-05 14:15 ` Stefan Liebler [this message]
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=1a1c8a1a-7d96-42cb-b16f-387ca6c810ea@linux.ibm.com \
--to=stli@linux.ibm.com \
--cc=adhemerval.zanella@linaro.org \
--cc=libc-alpha@sourceware.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).