From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,bc1361a952ec75ca X-Google-Attributes: gid103376,public X-Google-Thread: 1014db,582dff0b3f065a52 X-Google-Attributes: gid1014db,public X-Google-Thread: 109fba,582dff0b3f065a52 X-Google-Attributes: gid109fba,public X-Google-ArrivalTime: 2001-08-16 10:32:08 PST Path: archiver1.google.com!newsfeed.google.com!newsfeed.stanford.edu!headwall.stanford.edu!news-out.nibble.net!hub1.nntpserver.com!newsfeed.direct.ca!look.ca!news1.tor.metronet.ca!nnrp1.tor.metronet.ca!not-for-mail Message-ID: <3B7C0397.3AD029C6@home.com> From: "Warren W. Gay VE3WWG" X-Mailer: Mozilla 4.75 [en] (Windows NT 5.0; U) X-Accept-Language: en MIME-Version: 1.0 Newsgroups: comp.lang.ada,comp.lang.c,comp.lang.c++ Subject: Re: How Ada could have prevented the Red Code distributed denial of service attack. References: <3b690498.1111845720@news.worldonline.nl> <9kbu15$9bj@augusta.math.psu.edu> <9kbvsr$a02@augusta.math.psu.edu> <3B69DB35.4412459E@home.com> <3B6F312F.DA4E178E@home.com> <23lok9.ioi.ln@10.0.0.2> <3B70AB15.35845A98@home.com> <3B721FF5.B7D854F6@home.com> <3B7BC847.61D7EF55@home.com> <3B7BCEC4.202A3FA@cfmu.eurocontrol.int> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Date: Thu, 16 Aug 2001 17:32:08 GMT NNTP-Posting-Host: 198.96.47.195 NNTP-Posting-Date: Thu, 16 Aug 2001 11:32:08 MDT Organization: MetroNet Communications Group Inc. Xref: archiver1.google.com comp.lang.ada:11999 comp.lang.c:74775 comp.lang.c++:83149 Date: 2001-08-16T17:32:08+00:00 List-Id: Ian Wild wrote: > "Warren W. Gay VE3WWG" wrote: > > David Thompson wrote: > > > Warren W. Gay VE3WWG wrote : > > > ... > > > > I wasn't talking abuse. On 5 different platforms, the sizeof "ab" could > > > > yeild the answers 3,4 or 8, depending upon the platforms chosen ;-) > > > > This is not a very good result for such a simple compiler request. > > > > > > > Not true. In any conforming implementation of either C or C++ > > > sizeof "ab" is 3. Perhaps you meant one of two other things: > > > > Maybe that's now true with the C99 standard. But it is definitely > > _not true_ of _many_ existing pre-C99 compilers! > > Just out of interest, can you name /any/ C compiler made > since, say, 1979, for which sizeof ("ab") isn't 3? BTW, not to start a flame war here, but the brackets in 'sizeof ("ab")' are legal, but unnecessary and offensive, just like 'return (value);' is offensive ;-) Re: sizeof "ab" returning 3 : I have personally run into this problem over the last decade or so (but likely >= 1990 in this case). I don't have access to the other platforms where I used to program C, but it may have been one of the following: SCO UNIX, Dec Alpha, or a Solaris platform. I don't recall the precise details, but Solaris or SCO would be the most likely. I don't recall the version of Solaris, but for SCO, it was the version prior to their "Open Server" platform. I did check it on HPUX-10.2 and HPUX-11 this morning, and they they did in fact faithfully report 3. Red Hat Linux also reported 3, so the problem may not be as widespread as it once was (or as I once thought ;-) But(!) I do know that I was burnt by this problem in the past, and have since vowed not to get burnt by this again. Maybe I'll just summarize by adding that "your milage may vary". As to whether it should or shouldn't do that, I really don't care. It may be nice to blame a non-conforming compiler, but in the end, it is your code that is likely to be adjusted ;-) -- Warren W. Gay VE3WWG http://members.home.net/ve3wwg