lwip-devel
[Top][All Lists]
Advanced

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

[lwip-devel] [bug #53680] Bug in mem.c when LWIP_ALLOW_MEM_FREE_FROM_OTH


From: Dirk Ziegelmeier
Subject: [lwip-devel] [bug #53680] Bug in mem.c when LWIP_ALLOW_MEM_FREE_FROM_OTHER_CONTEXT is active
Date: Tue, 17 Apr 2018 14:36:43 -0400 (EDT)
User-agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:59.0) Gecko/20100101 Firefox/59.0

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

                 Summary: Bug in mem.c when
LWIP_ALLOW_MEM_FREE_FROM_OTHER_CONTEXT is active
                 Project: lwIP - A Lightweight TCP/IP stack
            Submitted by: dziegel
            Submitted on: Tue 17 Apr 2018 06:36:41 PM UTC
                Category: None
                Severity: 3 - Normal
              Item Group: None
                  Status: None
                 Privacy: Public
             Assigned to: None
             Open/Closed: Open
         Discussion Lock: Any
         Planned Release: None
            lwIP version: git head

    _______________________________________________________

Details:

Reported via EMail:

Hi,

I just tracked down a bug in mem.c that leads to sporadic memory
corruption when LWIP_ALLOW_MEM_FREE_FROM_OTHER_CONTEXT is active.

I think lfree needs to be declared volatile (static struct mem *
volatile lfree). Otherwise the compiler might use the old value of lfree
at the top of the for-loop in mem_malloc.

regards, Matthias
-- 
Matthias Pfaller




    _______________________________________________________

Reply to this item at:

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

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




reply via email to

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