lwip-devel
[Top][All Lists]
Advanced

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

Re: [lwip-devel] Assertion fails for MEM_ALIGNMENT 2 since Bugfix #39683


From: address@hidden
Subject: Re: [lwip-devel] Assertion fails for MEM_ALIGNMENT 2 since Bugfix #39683
Date: Wed, 01 Apr 2015 13:36:34 +0200
User-agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:31.0) Gecko/20100101 Thunderbird/31.5.0

Michael Waeber wrote:
In our system we have MEM_ALIGNMENT set to 2 (ColdFire/M68K).

#39683: tcp_out.c tcp_enqueue_flags():
< LWIP_ASSERT("seg->tcphdr not aligned", ((mem_ptr_t)seg->tcphdr %
MEM_ALIGNMENT) == 0);
LWIP_ASSERT("seg->tcphdr not aligned", ((mem_ptr_t)seg->tcphdr % 4) == 0);
The assertion fails since the buffer is aligned on a 2 Byte boundary.
Why should it aligned to 4?

It does not have to be. The fix was corect for MEM_ALIGNMENT > 4, but broke things for < 4. I've reopened bug #39683. Thanks for reporting.

Simon



reply via email to

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