public inbox for libc-alpha@sourceware.org
 help / color / mirror / Atom feed
From: Stefan Liebler <stli@linux.ibm.com>
To: libc-alpha@sourceware.org
Subject: Re: Fix ifunc-impl-list.c build for s390
Date: Tue, 28 Feb 2023 13:44:25 +0100	[thread overview]
Message-ID: <6bd28e12-8a84-26bc-c036-37deeb569dd4@linux.ibm.com> (raw)
In-Reply-To: <9e8a1491-e778-674c-5d4f-71f473e2aa53@linux.ibm.com>

On 17.02.23 14:46, Stefan Liebler via Libc-alpha wrote:
>> Note: s390x-linux-gnu-O3 started failing with a different error
>> earlier; that problem may still need to be fixed after this fix is in.
>>
>> https://sourceware.org/pipermail/libc-testresults/2023q1/010829.html
>>
> I will have a look. Independently I've recognized a fail on x86_64/s390x
> with -O3 starting with commit 32c7acd46401530fdbd4e98508c9baaa705f8b53
> "Replace rawmemchr (s, '\0') with strchr":
> In function ‘nis_local_host’,
>     inlined from ‘nis_local_host’ at nis_local_names.c:147:1:
> nis_local_names.c:171:11: error: ‘strncpy’ output may be truncated
> copying between 0 and 1023 bytes from a string of length 1024
> [-Werror=stringop-truncation]
>   171 |           strncpy (cp, nis_local_directory (), NIS_MAXNAMELEN -
> len -1);
> 
> But so far I had no further time to look into it.
Hi Joseph,
I've posted a patch to fix the earlier error with -O3.
The same error is also observable with x86_64 -O3, but s390x is the only
architecture in the build-many-script which also builds with -O3 as gcc
tends to inline more than on other architectures.

Please have a look here:
[PATCH] nis: Fix stringop-truncation warning with -O3 in nis_local_host.
https://sourceware.org/pipermail/libc-alpha/2023-February/145923.html

      reply	other threads:[~2023-02-28 12:44 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-02-16 21:39 Joseph Myers
2023-02-17 13:46 ` Stefan Liebler
2023-02-28 12:44   ` 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=6bd28e12-8a84-26bc-c036-37deeb569dd4@linux.ibm.com \
    --to=stli@linux.ibm.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).