lwip-users
[Top][All Lists]
Advanced

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

Re: [lwip-users] mem alignment issue when updating to Rev 1.4.1


From: Sergio R. Caprile
Subject: Re: [lwip-users] mem alignment issue when updating to Rev 1.4.1
Date: Wed, 27 Aug 2014 10:45:50 -0300
User-agent: Mozilla/5.0 (Windows NT 5.1; rv:24.0) Gecko/20100101 Thunderbird/24.6.0

Well, I'm not trying to get paid for helping here ;^)
I noticed
    ((((mem_ptr_t)name) % 4) == 0))
in both macros, so sockets.c is actually expecting the 'name' pointer to
be aligned to 32-bit boundaries.
I don't see why and I'm not familiar with lwIP's socket interface, but
this to me seems to be an alignment dependency issue in lwIP. Simon?
For your specific problem, if you could somehow force the const struct
sockaddr *name (that you are allocating and passing to lwip_bind() and
lwip_connect()) to be aligned to 32-bits, that should solve your
problems. How it is allocated is beyong my knowledge.
Regards, and donate your payment to the lwIP foundation ;^)




reply via email to

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