lwIP - A Lightweight TCP/IP stack - Bugs: bug #50838, mem.c needs SYS_ARCH_PROTECTION...
You are not allowed to post comments on this tracker with your current authentication level.
bug #50838: mem.c needs SYS_ARCH_PROTECTION around MEM_STATS
Submitter: | preet <preetpal> | ||
Submitted: | Thu 20 Apr 2017 07:16:14 PM UTC | ||
Category: | pbufs | Severity: | 3 - Normal |
Item Group: | Faulty Behaviour | Status: | Fixed |
Privacy: | Public | Assigned to: | goldsimon |
Open/Closed: | Closed | Planned Release: | None |
lwIP version: | 2.0.0 |
Jump to the original submission
Wed 08 Nov 2017 04:41:13 PM UTC, comment #6: |
Billy Bednar <bb1> |
Mon 24 Apr 2017 10:24:15 AM UTC, comment #5: Daniel, you're right. I've reverted the commit and pushed a better fix (that will hopefully work for everyone now :-)
|
Simon Goldschmidt <goldsimon> |
Fri 21 Apr 2017 08:49:47 PM UTC, comment #4: I just had a look at the code in mem.c which uses these macros and I noticed that these increments/decrements are already protected by a mutex -- at least if MEM_LIBC_MALLOC is 0.
|
Daniel Elstner <danielk> |
Fri 21 Apr 2017 08:03:53 PM UTC, comment #3: Seems like this fix broke stats counting. STATS_INC_USED is defined as thus:
The commit replaces this with:
Which is clearly not the same thing, and explains why my memory usage is shown as zero.
|
Daniel Elstner <danielk> |
Thu 20 Apr 2017 07:48:09 PM UTC, comment #2: |
Simon Goldschmidt <goldsimon> |
Thu 20 Apr 2017 07:47:46 PM UTC, comment #1: Fixed in stats.h, thanks for reporting. |
Simon Goldschmidt <goldsimon> |
Thu 20 Apr 2017 07:16:14 PM UTC, original submission:
After running regression tests against LWIP, it was noticed that the Memory stats seemed to roll-over. The tests should have had the numbers in the range of 0-20K, but instead it was close to the overflow value of uint16_t
|
preet <preetpal> |
No files currently attached
Depends on the following items: None found
Items that depend on this one: None found
There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.
Follow 4 latest changes.
Date | Changed by | Updated Field | Previous Value | => | Replaced by |
---|---|---|---|---|---|
2017-04-20 | goldsimon | Status | None | Fixed | |
Assigned to | None | goldsimon | |||
Open/Closed | Open | Closed | |||
2017-04-20 | preetpal | Carbon-Copy | - | Added preetpal |
Powered by Savane 3.13-4448.
Corresponding source code
After updating to 2.0.3 I noticed that my peek memory usage was reading 0. It looks like the original fix for this issue, which was reverted and replaced by this, was cherry picked into 2.0.3.