lkml.org 
[lkml]   [1999]   [Jun]   [16]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: egcs-1.1.2 ping bug also causes miscompilation of pcbit isdn drive
In <199906161515.LAA00610@pincoya.inf.utfsm.cl> Horst von Brand (vonbrand@inf.utfsm.cl) wrote:
> "Richard B. Johnson" <root@chaos.analogic.com> said:

> [...]

>> Wonderful. Now try that with local data on a push-up stack rather than
>> the usual push-down stack.

> Stacks usually grow downwards anyway...

Not always. Especially if there are no support in hardware :-)

>> There is a requirement that pointer math work, i.e., char[1] be addressed
>> at a higher offset value than char[0]. This has been interpreted to mean
>> a higher memory location and it's not nocessarily so.

> x + 1 < x. Wonderful.

No. x + 1 < x, but ((long) (x+1)) > ((long) x)... What's wrong here ?
>> Given a communications packet such as TCP/IP......
>>
>> struct {
>> HEADER hdr;
>> char user_data[0];
>> } IP;
>>
>> The assumption that this will always work is wrong (aside from the
>> fact that a zero-length array is not allowed either.

> This won't work if the machine places padding after header, but the packets
> have been designed so that this normally won't happen. Plus this kind of
> stuff is handled automagically by the system's headers, which needn't be
> portable anyway.

And here we have MAJOR problem: there are NO easy replacements for some
such things used in linux kernel. Yes, it's not portable but what's can be
done ? EVEN if kernel is broken just stating that "such code is not portable
and so it's not our problem" is NOT ENOUGH. Some workaround is needed. And
workaround without speed loss and supported on all supported platforms !




-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 13:52    [from the cache]
©2003-2014 Jasper Spaans. Advertise on this site