[Top][All Lists]

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

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

From: Matthias Pfaller
Subject: [lwip-devel] Bug in core/mem.c
Date: Tue, 17 Apr 2018 14:00:11 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.8.0


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

Attachment: smime.p7s
Description: S/MIME Cryptographic Signature

reply via email to

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