|
From: | Leon Woestenberg |
Subject: | Re: [lwip-users] shouldn't happen? |
Date: | Wed, 30 Jun 2004 20:31:49 +0200 |
User-agent: | Mozilla Thunderbird 0.5 (Windows/20040207) |
Tim, Tim Newsham wrote:
I checked out the CVS src tree today, and am playing around with it. in etharp.c:etharp_output there are some lines: /* never reached; here for safety */ pbuf_free(q); return result; reading the code, I dont see why it should never happen. In fact, it is happening. Worse, its getting called by the TCP retransmit function and happening twice, decrementing the reference count to zero, and then asserting when it tries to pbuf_free the buffer after its ref count is zero. Is this a bug in the code? Is the current cvs tree unstable (should I be playing with a different version)?
I have investigated the etharp.c history: This bug was introduced from 1.59 to 1.60, which involved a major rewrite of the pbuf output flow. In fact, etharp_output should never free any pbufs to start with. Also, the "never reached" statement referred to the old code, it should have been removed. I have fixes to CVS HEAD. Regards, Leon.
[Prev in Thread] | Current Thread | [Next in Thread] |