[Top][All Lists]

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

Re: [lwip-devel] Bug in core/mem.c

From: Dirk Ziegelmeier
Subject: Re: [lwip-devel] Bug in core/mem.c
Date: Tue, 17 Apr 2018 20:37:05 +0200

Now there is :-)



Dirk Ziegelmeier * address@hidden * http://www.ziegelmeier.net

On Tue, Apr 17, 2018 at 7:17 PM, Jason White <address@hidden> wrote:
Is there a bug filed for this?

-----Original Message-----
From: lwip-devel <lwip-devel-bounces+jasonw=wrcaddress@hidden> On Behalf Of Matthias Pfaller
Sent: Tuesday, April 17, 2018 8:00 AM
To: address@hidden
Subject: [lwip-devel] Bug in core/mem.c


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                          Software Entwicklung
marco Systemanalyse und Entwicklung GmbH  Tel   +49 8131 5161 41
Hans-Böckler-Str. 2, D 85221 Dachau       Fax   +49 8131 5161 66
http://www.marco.de/                      Email address@hidden
Geschäftsführer Martin Reuter             HRB 171775 Amtsgericht München

lwip-devel mailing list

reply via email to

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