[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[lwip-devel] [bug #57344] IS_SOCK_ADDR_ALIGNED(name) in sockets.c is 4-b
From: |
Simon Goldschmidt |
Subject: |
[lwip-devel] [bug #57344] IS_SOCK_ADDR_ALIGNED(name) in sockets.c is 4-byte aligned, not aligned to MEM_ALIGNMENT |
Date: |
Mon, 2 Dec 2019 14:54:40 -0500 (EST) |
User-agent: |
Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/78.0.3904.108 Safari/537.36 |
Update of bug #57344 (project lwip):
Status: None => Fixed
Assigned to: None => goldsimon
Open/Closed: Open => Closed
_______________________________________________________
Follow-up Comment #1:
Hmm, ok, on 16 bit architectures you have a problem here. I'm afraid our 16
bit support is not that well tested nowadays, where most platforms are 32
bit.
OTOH, I'm not sure MEM_ALIGNMENT is correct here: even platforms with
MEM_ALIGNMENT of 8 may automatically align this to 4 since the biggest member
is an u32_t.
I've changed it to:
#define IS_SOCK_ADDR_ALIGNED(name) ((((mem_ptr_t)(name)) % LWIP_MIN(4,
MEM_ALIGNMENT)) == 0)
_______________________________________________________
Reply to this item at:
<https://savannah.nongnu.org/bugs/?57344>
_______________________________________________
Message sent via Savannah
https://savannah.nongnu.org/