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=-0.3 required=5.0 tests=BAYES_00,FREEMAIL_FROM, REPLYTO_WITHOUT_TO_CC autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 107f24,582dff0b3f065a52 X-Google-Attributes: gid107f24,public X-Google-Thread: 109fba,582dff0b3f065a52 X-Google-Attributes: gid109fba,public X-Google-Thread: 1014db,582dff0b3f065a52 X-Google-Attributes: gid1014db,public X-Google-Thread: 103376,bc1361a952ec75ca X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2001-08-02 10:30:18 PST Path: archiver1.google.com!newsfeed.google.com!newsfeed.stanford.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!newsfeed.mathworks.com!wn3feed!worldnet.att.net!135.173.83.71!wnfilter1!worldnet-localpost!bgtnsc05-news.ops.worldnet.att.net.POSTED!not-for-mail Message-ID: <3B697DEF.5C7C0440@yahoo.com> From: CBFalconer Reply-To: cbfalconer@worldnet.att.net Organization: Ched Research X-Mailer: Mozilla 4.75 [en] (Win98; U) X-Accept-Language: en MIME-Version: 1.0 Newsgroups: comp.lang.ada,comp.lang.c,comp.lang.c++,comp.lang.functional Subject: Re: How Ada could have prevented the Red Code distributed denial of service attack. References: <3B6555ED.9B0B0420@sneakemail.com> <87n15lxzzv.fsf@deneb.enyo.de> <3B672322.B5EA1B66@home.com> <5ee5b646.0108010949.5abab7fe@posting.google.com> <%CX97.14134$ar1.47393@www.newsranger.com> <3b690549.1112022840@news.worldonline.nl> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Date: Thu, 02 Aug 2001 17:30:17 GMT NNTP-Posting-Host: 12.90.167.126 X-Complaints-To: abuse@worldnet.att.net X-Trace: bgtnsc05-news.ops.worldnet.att.net 996773417 12.90.167.126 (Thu, 02 Aug 2001 17:30:17 GMT) NNTP-Posting-Date: Thu, 02 Aug 2001 17:30:17 GMT Xref: archiver1.google.com comp.lang.ada:11107 comp.lang.c:71692 comp.lang.c++:79394 comp.lang.functional:7202 Date: 2001-08-02T17:30:17+00:00 List-Id: Richard Bos wrote: > > Dale Stanbrough wrote: > > > Would you be happy if the C language went back to not > > enforcing/type checking parameters to functions? > > No. Because checking parameter passing can be done, and takes time only, > at compile-time. Checking array bounds has an impact on the performance > of the program itself. > Oh, btw, there _are_ bounds-checking compilers for C. They get used > where the extra safety is deemed important enough to justify the loss of > speed. elsethread (I think) I recently made a recommendation about type definitions, which could impose strong type checking in C at the cost of a single new reserved word (I suggested deftype, if you want to do a google search on c.l.c). Such a feature would go far to removing out-of-bounds errors by insisting that an array be indexed by a declared index type. Everything would be done at compile time. Without a specific cast (error prone) assignments to the type would have to be of the type itself. If the type can specify a subrange things would be even better, but that immediately implies range-checking code, so is probably not C compatible. -- Chuck F (cbfalconer@yahoo.com) (cbfalconer@XXXXworldnet.att.net) (Remove "XXXX" from reply address. yahoo works unmodified) mailto:uce@ftc.gov (for spambots to harvest)