I'm using LWIP 1.4.1 from TivaWare 2.1.4.178. My firmware allows for five connections at a time. I have a client application that connects to the TM4C1294 board and transfers/receives a small amount of data. Doing some stress testing where I continually make multiple connections to the firmware and then drop the connections and repeat, I've noticed an issue where the active_pcb_list within LWIP eventually becomes corrupted with a self-referential "next" pointer. Example:
This results in an infinite loop in a function in LWIP's tcp.c code where it tries to walk the list of active PCB's. In an attempt to identify where and when the active PCB list is being corrupt, I've modified LWIP to look for any self referential "next" pointers anytime the list is modified. I set a breakpoint when this happens. I continually see it happening in the tcp_listen_input function in tcp_in.c right after TCP_REG_ACTIVE(npcb) occurs. Here's the call stack and the location in tcp_in.c when it first see's it corrupt:
I've spent a lot of time reviewing the code and making sure that LWIP functions are only called during the TM4C's ethernet interrupt. I'm wondering if anyone else has experienced this issue or something similar to it or had any ideas of what might be going on? ...Thanks in advance.

