extmod/modlwip: socket->incoming changed by async callbacks, must be volatile.
Otherwise for code like: while (socket->incoming == NULL) { LWIP_DELAY(100); } a compiler may cache it in a register and it will be an infinite loop.
This commit is contained in:
parent
0ec51441de
commit
4deb4936d5
|
@ -184,7 +184,7 @@ typedef struct _lwip_socket_obj_t {
|
|||
mp_obj_base_t base;
|
||||
|
||||
void *pcb;
|
||||
void *incoming;
|
||||
void *volatile incoming;
|
||||
byte peer[4];
|
||||
mp_uint_t peer_port;
|
||||
mp_uint_t timeout;
|
||||
|
|
Loading…
Reference in New Issue