[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[lwip-devel] [task #14261] [lwip-2.0.0] memp underflow and overflow
From: |
Thomas Nittel |
Subject: |
[lwip-devel] [task #14261] [lwip-2.0.0] memp underflow and overflow |
Date: |
Fri, 2 Dec 2016 22:55:03 +0000 (UTC) |
User-agent: |
Mozilla/5.0 (Windows NT 6.1; WOW64; rv:50.0) Gecko/20100101 Firefox/50.0 |
URL:
<http://savannah.nongnu.org/task/?14261>
Summary: [lwip-2.0.0] memp underflow and overflow
Project: lwIP - A Lightweight TCP/IP stack
Submitted by: thomas_nittel
Submitted on: Fri 02 Dec 2016 10:55:02 PM GMT
Category: None
Should Start On: Fri 02 Dec 2016 12:00:00 AM GMT
Should be Finished on: Fri 02 Dec 2016 12:00:00 AM GMT
Priority: 5 - Normal
Status: None
Privacy: Public
Percent Complete: 0%
Assigned to: None
Open/Closed: Open
Discussion Lock: Any
Planned Release: None
Effort: 0.00
_______________________________________________________
Details:
If I use the option MEMP_OVERFLOW_CHECK == 1 an Assertion/Error will be
thrown: "detected memp overflow in pool TCP_PCB" failed in mempc(135) and
"detected memp underflow in pool TCP_PCB" failed in memp.c(162). It originates
from memp.c(306) res. memp.c(307). For sometimes memp is assigned NULL in
memp.c(303). Consequently the following call of
memp_overflow_check_element_overflow() res.
memp_overflow_check_element_underflow() fails. In this case the else branch in
memp.c(337) is taken and the message "memp_malloc: out of memory in pool
TCP_PCB" is output. However, according to
http://lists.gnu.org/archive/html/lwip-users/2011-11/msg00042.html it is
normal that pcbs are run out.
Therefore memp_overflow_check_element_overflow() res.
memp_overflow_check_element_underflow() should only be called if memp != NULL.
After I had moved memp.c(311) "if (memp != NULL) {" to memp.c(304) the
Assertion/Error vanished. Maybe this is a solution for this problem.
_______________________________________________________
Reply to this item at:
<http://savannah.nongnu.org/task/?14261>
_______________________________________________
Message sent via/by Savannah
http://savannah.nongnu.org/
- [lwip-devel] [task #14261] [lwip-2.0.0] memp underflow and overflow,
Thomas Nittel <=