From 86d602f7340d812c27328d2fa54c0b64d8bc79c9 Mon Sep 17 00:00:00 2001 From: zhanghongyu Date: Fri, 11 Nov 2022 17:38:11 +0800 Subject: [PATCH] tcp_netpoll: add assert into tcp_pollsetup when pollinfo invalid In order to expose similar problems quickly in the future Signed-off-by: zhanghongyu --- net/tcp/tcp_netpoll.c | 1 + 1 file changed, 1 insertion(+) diff --git a/net/tcp/tcp_netpoll.c b/net/tcp/tcp_netpoll.c index 642a7e84be4..446d5452a10 100644 --- a/net/tcp/tcp_netpoll.c +++ b/net/tcp/tcp_netpoll.c @@ -226,6 +226,7 @@ int tcp_pollsetup(FAR struct socket *psock, FAR struct pollfd *fds) { if (++info >= &conn->pollinfo[CONFIG_NET_TCP_NPOLLWAITERS]) { + DEBUGPANIC(); ret = -ENOMEM; goto errout_with_lock; }