[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [lwip-users] Bug in inet_chksum_pseudo() produces bad checksum(Parad
From: |
Jonathan Larmour |
Subject: |
Re: [lwip-users] Bug in inet_chksum_pseudo() produces bad checksum(Paradigm C++) |
Date: |
Mon, 27 Aug 2007 03:05:42 +0100 |
User-agent: |
Mozilla Thunderbird 1.0.8-1.1.fc3.4.legacy (X11/20060515) |
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