David Empson wrote:
Dave - you should look for any other places in the LWIP code where a
similar test is being done. I suspect the bug will only happen in the
case where an explicit shift-right-16 is done on a 32-bit expression,
and there is an implied test for zero, i.e. something like "if (expr >>
16)" or "while (expr >> 16)".
Kieran had already fixed the reported ones in inet.c and I just did a few
more. It does make you think that if you can't trust the compiler, you
just won't know what code works or doesn't work in anything you build.
A run of this command:
egrep -r '(if|while).*>> 16' .
only shows instances in inet.c and inet6.c, the latter of which seems
unlikely to need addressing (I imagine Paradigm C++ will be fixed before
IPv6 support moves out of the experimental stage).
Jifl
--
eCosCentric Limited http://www.eCosCentric.com/ The eCos experts
Barnwell House, Barnwell Drive, Cambridge, UK. Tel: +44 1223 245571
Registered in England and Wales: Reg No 4422071.
------["The best things in life aren't things."]------ Opinions==mine
_______________________________________________
lwip-users mailing list
[email protected]
http://lists.nongnu.org/mailman/listinfo/lwip-users