buglwIP - A Lightweight TCP/IP stack - Bugs: bug #49762, [lwip-2.0.0] memp underflow and...

 
 

You are not allowed to post comments on this tracker with your current authentication level.

bug #49762: [lwip-2.0.0] memp underflow and overflow

Submitted by:  Thomas Nittel <thomas_nittel>
Submitted on:  Sat 03 Dec 2016 07:29:45 PM UTC  
 
Category: NoneSeverity: 3 - Normal
Item Group: Crash ErrorStatus: Fixed
Privacy: PublicAssigned to: None
Open/Closed: ClosedPlanned Release: 2.0.1
lwIP version: git head

Sat 03 Dec 2016 07:29:45 PM UTC, comment #2:

This item has been reassigned from the project lwIP - A Lightweight TCP/IP stack task tracker to your tracker.

The original report is still available at task #14261

Following are the information included in the original report:

[field #0] Item ID: 14261
[field #1] Group ID: 3159
[field #2] Open/Closed: Closed
[field #3] Severity: 3 - Normal
[field #4] Privacy: Public
[field #8] : Unknown task Field Display Type
[field #9] Category: None
[field #10] Submitted by: thomas_nittel
[field #11] Assigned to: None
[field #12] Submitted on: Fri 02 Dec 2016 10:55:02 PM GMT
[field #13] Summary: [lwip-2.0.0] memp underflow and overflow
[field #14] Original Submission: 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.
[field #15] Closed on: Sat 03 Dec 2016 07:29:45 PM GMT
[field #16] Item Group: None
[field #17] Status: Done
[field #18] Component Version: None
[field #19] Operating System: None
[field #20] Reproducibility: None
[field #21] Size (loc): None
[field #22] Fixed Release: None
[field #23] Planned Release: None
[field #24] Effort: 0.00
[field #28] Priority: 5 - Normal
[field #29] Should Start On: Fri 02 Dec 2016 12:00:00 AM GMT
[field #30] Should be Finished on: Fri 02 Dec 2016 12:00:00 AM GMT
[field #31] Percent Complete: 0%
[field #33] Release: None
[field #58] Custom Select Box #1: None
[field #59] Custom Select Box #2: None
[field #60] Custom Select Box #3: None
[field #61] Custom Select Box #4: None
[field #62] Custom Select Box #5: None
[field #63] Custom Select Box #6: None
[field #64] Custom Select Box #7: None
[field #65] Custom Select Box #8: None
[field #66] Custom Select Box #9: None
[field #67] Custom Select Box #10: None

Dirk Ziegelmeier <dziegel>
Project Member
Sat 03 Dec 2016 07:29:45 PM UTC, comment #1:

Already fixed in git head, commit b99b7577fca92e9ad9697b56eb647c0498e3f7ce

But anyway, thank you for reporting!!

Dirk Ziegelmeier <dziegel>
Project Member
Sat 03 Dec 2016 07:29:45 PM UTC, original submission:

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.

Thomas Nittel <thomas_nittel>

 

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by dziegel (Posted a comment)
  • -unavailable- added by thomas_nittel (Submitted the item)
  •  

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follow 5 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Sat 03 Dec 2016 07:30:41 PM UTCdziegelItem GroupNone=>Crash Error
      StatusNone=>Fixed
      Open/ClosedOpen=>Closed
      Planned ReleaseNone=>2.0.1
    Sat 03 Dec 2016 07:29:45 PM UTCdziegelReassign itemlwIP - A Lightweight TCP/IP stack, task #14261=>lwIP - A Lightweight TCP/IP stack, bug #49762

    Back to the top


    Powered by Savane 3.1-cleanup1