From: Siddhesh Poyarekar <siddhesh@gotplt.org>
To: Adhemerval Zanella Netto <adhemerval.zanella@linaro.org>,
Carlos O'Donell <carlos@redhat.com>,
libc-alpha@sourceware.org, Frederic Berat <fberat@redhat.com>
Subject: Re: [PATCH 2/3] string: Fix bug-strncat1 with fortify enabled
Date: Mon, 24 Jul 2023 10:36:13 -0400 [thread overview]
Message-ID: <08ae61b3-d736-3d77-8807-f00fc1205d6a@gotplt.org> (raw)
In-Reply-To: <183e5249-febd-0a36-d704-d6cb38e99bd2@linaro.org>
On 2023-07-24 10:26, Adhemerval Zanella Netto wrote:
>
>
> On 24/07/23 11:24, Siddhesh Poyarekar wrote:
>> On 2023-07-24 08:36, Carlos O'Donell via Libc-alpha wrote:
>>> On 7/21/23 08:18, Adhemerval Zanella via Libc-alpha wrote:
>>>> If fortify is enabled, the truncated output warning is issued by
>>>> the wrapper itself:
>>>>
>>>> bug-strncat1.c: In function ‘main’:
>>>> bug-strncat1.c:14:3: error: ‘__builtin___strncat_chk’ output truncated
>>>> copying 1 byte from a string of length 2 [-Werror=stringop-truncation]
>>>> 14 | strncat (d, "\5\6", 1);
>>>> | ^
>>>>
>>>
>>> I find it suspect that this triggers on line 14, but given that the whole
>>> test is intended to test truncated output, we should disable this warning
>>> for the whole file.
>>>
>>> LGTM.
>>>
>>> Reviewed-by: Carlos O'Donell <carlos@redhat.com>
>>
>> In that case, wouldn't it be better to patch the Makefile instead?
>
> My understanding of using libc-diag.h is a having an explicit mark with
> additional comment so we can safely remove the suppression if/when we
> move the minimum supported compiler.
>
OK fair enough.
Thanks,
Sid
next prev parent reply other threads:[~2023-07-24 14:36 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-07-21 12:18 [PATCH 0/3] Fix some issues with tests when fortify is enabled Adhemerval Zanella
2023-07-21 12:18 ` [PATCH 1/3] posix: Fix test-errno build with fortify enable Adhemerval Zanella
2023-07-24 12:16 ` Carlos O'Donell
2023-07-24 13:03 ` Adhemerval Zanella Netto
2023-07-21 12:18 ` [PATCH 2/3] string: Fix bug-strncat1 with fortify enabled Adhemerval Zanella
2023-07-24 12:36 ` Carlos O'Donell
2023-07-24 14:24 ` Siddhesh Poyarekar
2023-07-24 14:26 ` Adhemerval Zanella Netto
2023-07-24 14:36 ` Siddhesh Poyarekar [this message]
2023-07-21 12:18 ` [PATCH 3/3] string: Fix tester " Adhemerval Zanella
2023-07-24 12:38 ` Carlos O'Donell
2023-07-24 12:39 ` [PATCH 0/3] Fix some issues with tests when fortify is enabled Carlos O'Donell
2023-07-24 18:42 ` Adhemerval Zanella Netto
2023-07-24 18:45 ` Andreas K. Huettel
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=08ae61b3-d736-3d77-8807-f00fc1205d6a@gotplt.org \
--to=siddhesh@gotplt.org \
--cc=adhemerval.zanella@linaro.org \
--cc=carlos@redhat.com \
--cc=fberat@redhat.com \
--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).