public inbox for passt-dev@passt.top
 help / color / mirror / code / Atom feed
From: Stefano Brivio <sbrivio@redhat.com>
To: passt-dev@passt.top
Subject: Re: [PATCH] tcp: Work around gcc 12 bogus warning in tcp_rtt_dst_check()
Date: Wed, 25 May 2022 13:31:59 +0200	[thread overview]
Message-ID: <20220525133159.35be89bc@elisabeth> (raw)
In-Reply-To: <Yoyg0XQjhGy6zuzP@yekko>

[-- Attachment #1: Type: text/plain, Size: 1275 bytes --]

On Tue, 24 May 2022 19:09:37 +1000
David Gibson <david(a)gibson.dropbear.id.au> wrote:

> On Fri, May 20, 2022 at 11:01:11AM +0200, Stefano Brivio wrote:
> > gcc 12.1.x (e.g. current OpenSUSE Tumbleweed, x86_64 only,
> > gcc-12-1.4.x86_64) reports:
> > 
> > tcp.c: In function ‘tcp_send_flag’:
> > tcp.c:1014:9: warning: writing 16 bytes into a region of size 0 [-Wstringop-overflow=]
> >  1014 |         memcpy(low_rtt_dst + hole++, &conn->a.a6, sizeof(conn->a.a6));
> >       |         ^
> > tcp.c:559:24: note: at offset -16 into destination object ‘low_rtt_dst’ of size 128
> >   559 | static struct in6_addr low_rtt_dst[LOW_RTT_TABLE_SIZE];
> >       |
> > 
> > but 'hole' can't be -1, because the low_rtt_dst table is guaranteed
> > to have a hole: if we happened to write to the last entry, we'll go
> > back to index 0 and clear that one.
> > 
> > Signed-off-by: Stefano Brivio <sbrivio(a)redhat.com>  
> 
> Reviewed-by: David Gibson <david(a)gibson.dropbear.id.au>

Thanks for the reviews! I pushed those two changes already on Friday,
as they were both rather simple and blocking continuous integration.

I guess it might make sense to set up Patchwork eventually, but it
feels a bit overkill for the moment...

-- 
Stefano


      reply	other threads:[~2022-05-25 11:31 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-05-20  9:01 [PATCH] tcp: Work around gcc 12 bogus warning in tcp_rtt_dst_check() Stefano Brivio
2022-05-24  9:09 ` David Gibson
2022-05-25 11:31   ` Stefano Brivio [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=20220525133159.35be89bc@elisabeth \
    --to=sbrivio@redhat.com \
    --cc=passt-dev@passt.top \
    /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.
Code repositories for project(s) associated with this public inbox

	https://passt.top/passt

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 IMAP folder(s).