lwip-devel
[Top][All Lists]
Advanced

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

[lwip-devel] [bug #50838] mem.c needs SYS_ARCH_PROTECTION around MEM_STA


From: preet
Subject: [lwip-devel] [bug #50838] mem.c needs SYS_ARCH_PROTECTION around MEM_STATS
Date: Thu, 20 Apr 2017 15:16:15 -0400 (EDT)
User-agent: Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/57.0.2987.133 Safari/537.36

URL:
  <http://savannah.nongnu.org/bugs/?50838>

                 Summary: mem.c needs SYS_ARCH_PROTECTION around MEM_STATS
                 Project: lwIP - A Lightweight TCP/IP stack
            Submitted by: preetpal
            Submitted on: Thu 20 Apr 2017 07:16:14 PM UTC
                Category: pbufs
                Severity: 3 - Normal
              Item Group: Faulty Behaviour
                  Status: None
                 Privacy: Public
             Assigned to: None
             Open/Closed: Open
         Discussion Lock: Any
         Planned Release: None
            lwIP version: 2.0.0

    _______________________________________________________

Details:

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

lwip_stats.mem.used, lwip_stats.mem.max

We made the fixes locally and proved that the code fix worked.
At mem.c: we need:

  SYS_ARCH_PROTECT(lev);
  MEM_STATS_INC_USED(used, element->size);
  SYS_ARCH_UNPROTECT(lev);

  SYS_ARCH_PROTECT(lev);
  MEM_STATS_DEC_USED(used, hmem->size);
  SYS_ARCH_UNPROTECT(lev);




    _______________________________________________________

Reply to this item at:

  <http://savannah.nongnu.org/bugs/?50838>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.nongnu.org/




reply via email to

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