[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[lwip-devel] [bug #49762] [lwip-2.0.0] memp underflow and overflow
From: |
Dirk Ziegelmeier |
Subject: |
[lwip-devel] [bug #49762] [lwip-2.0.0] memp underflow and overflow |
Date: |
Sat, 3 Dec 2016 19:29:46 +0000 (UTC) |
User-agent: |
Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:49.0) Gecko/20100101 Firefox/49.0 |
URL:
<http://savannah.nongnu.org/bugs/?49762>
Summary: [lwip-2.0.0] memp underflow and overflow
Project: lwIP - A Lightweight TCP/IP stack
Submitted by: thomas_nittel
Submitted on: Sat 03 Dec 2016 07:29:45 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/bugs/?49762>
_______________________________________________
Message sent via/by Savannah
http://savannah.nongnu.org/
- [lwip-devel] [bug #49762] [lwip-2.0.0] memp underflow and overflow,
Dirk Ziegelmeier <=