lwip-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[lwip-devel] lwIP 2.0.2 Crash on tcp_out.c line 1148 (TCP_SEQ_LT) EXC_BA


From: jah6q
Subject: [lwip-devel] lwIP 2.0.2 Crash on tcp_out.c line 1148 (TCP_SEQ_LT) EXC_BAD_ACCESS
Date: Thu, 14 Sep 2017 21:45:18 -0700 (MST)

Hello, I've been running into a bug (tested both 2.0.0 and 2.0.2), while
running my unit tests, after a while the stack will crash during the
following comparison (here's my driver code for reference:
https://pastebin.com/8mNrX72V): 

if (TCP_SEQ_LT(lwip_ntohl(seg->tcphdr->seqno),
lwip_ntohl(useg->tcphdr->seqno))) 

Here's the stack trace: 

* thread #2, stop reason = EXC_BAD_ACCESS (code=1, address=0x18) 
    frame #0: 0x000000010020a742
selftest`::tcp_output(pcb=0x0000611000015300) at tcp_out.c:1148 [opt] 
   1145        /* In the case of fast retransmit, the packet should not go
to the tail 
   1146         * of the unacked queue, but rather somewhere before it. We
need to check for 
   1147         * this case. -STJ Jul 27, 2004 */ 
-> 1148        if (TCP_SEQ_LT(lwip_ntohl(seg->tcphdr->seqno),
lwip_ntohl(useg->tcphdr->seqno))) { 
   1149          /* add segment to before tail of unacked list, keeping the
list sorted */ 
   1150          struct tcp_seg **cur_seg = &(pcb->unacked); 
   1151          while (*cur_seg && 
(lldb) bt 
* thread #2, stop reason = EXC_BAD_ACCESS (code=1, address=0x18) 
  * frame #0: 0x000000010020a742
selftest`::tcp_output(pcb=0x0000611000015300) at tcp_out.c:1148 [opt] 
    frame #1: 0x00000001002051eb selftest`::tcp_fasttmr() at tcp.c:1263
[opt] 
    frame #2: 0x0000000100205169 selftest`::tcp_tmr() at tcp.c:159 [opt] 
    frame #3: 0x00000001001f7095
selftest`ZeroTier::lwIP::lwip_loop(this=0x000060200000f6f0,
tap=0x000061900001db80) at lwIP.cpp:285 

I will post a log with the stack's TCP debug logging enabled later.

Any assistance would be greatly appreciated! 

 - Joseph



--
Sent from: http://lwip.100.n7.nabble.com/lwip-devel-f11621.html



reply via email to

[Prev in Thread] Current Thread [Next in Thread]