From: contact@jbartunek.de
To: Laurent Vivier <lvivier@redhat.com>
Cc: passt-dev@passt.top
Subject: Re: passt crashes a) hides error b) assert tripped
Date: Mon, 09 Nov 2026 20:01:31 +0000 [thread overview]
Message-ID: <d3face8ebc1f421478e3ee086728259d@jbartunek.de> (raw)
In-Reply-To: <0667ba95-3ecf-4cb5-837b-6d8f59f13074@redhat.com>
Hi Laurent,
Thanks for getting back to me so quickly!
On 2026-11-09 08:12, Laurent Vivier wrote:
>
> In fact the assertion should be:
>
> assert((size_t)cnt <= ARRAY_SIZE(iov_msg) - j);
>
> Could you try to update it and move it after the "if (cnt < 0)
> die("Missing entries in iov_msg");"?
Sure I used
```
diff --git a/tcp_vu.c b/tcp_vu.c
index 868a35b..cee9cf6 100644
--- a/tcp_vu.c
+++ b/tcp_vu.c
@@ -291,9 +291,9 @@ static ssize_t tcp_vu_sock_recv(const struct ctx *c,
struct vu_virtq *vq,
cnt = iov_tail_clone(&iov_msg[j], ARRAY_SIZE(iov_msg) -
j,
&data);
- assert(cnt < ARRAY_SIZE(iov_msg) - j);
if (cnt < 0)
die("Missing entries in iov_msg");
+ assert((size_t)cnt <= ARRAY_SIZE(iov_msg) - (size_t)j);
j += cnt;
}
```
on top of `2026_10_02.cba3570` (note the additional cast for j).
I tried it again with my setup: 0 crashes, it just works (TM), large
download all. Thank you so much!
All the best,
John
prev parent reply other threads:[~2026-11-09 20:01 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-08 21:31 contact
2026-11-09 8:12 ` Laurent Vivier
2026-11-09 20:01 ` contact [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=d3face8ebc1f421478e3ee086728259d@jbartunek.de \
--to=contact@jbartunek.de \
--cc=lvivier@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).