[Top][All Lists]

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

RE: [lwip-users] Bug in mem_realloc (patch included)

From: Nitin AGARWAL
Subject: RE: [lwip-users] Bug in mem_realloc (patch included)
Date: Tue, 9 Oct 2007 10:39:29 +0530

Hi Simon,

Could you send me the updated mem.c file (with updated if/else condition).

Thanks & Regards,

-----Original Message-----
From: address@hidden
[mailto:address@hidden On Behalf Of
Sent: Tuesday, October 09, 2007 12:09 AM
To: Mailing list for lwIP users
Subject: Re: [lwip-users] Bug in mem_realloc (patch included)

Hi PH,
> Just spent a couple of hours figuring out what the heck my system was 
> doing. Turned out there's a bug in the mem_realloc(). The bug appears 
> at least in the CVS head version and seems to be have been introduced 
> when the plug_holes() call was removed from me_realloc().
> Problem appers if you realloc the last used mem block in the heap.
> Todays code just creates a new struct mem for the empty unused block 
> that represents the unused heap. The problem is that the lfree 
> variable that should point to the last unused block (in this case the 
> block we
> move) isn't updated. As a result lfree points to an invalid mem block.
Thanks for the bug report. The 'else' below in mem_realloc was missing an
lfree update also.
That file has been hard work for some people already ;-)
> Should I submit a bug report too?
It's the normal way to do with a bug report like yours, yes (to prevent it
from being lost on the mailing list).
But since I already fixed it in CVS HEAD, there's no need to do that now.

Thanks again,

lwip-users mailing list

reply via email to

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