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-Thread: 103376,5bc4be576204aa20 X-Google-Attributes: gid103376,public X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!news3.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!local01.nntp.dca.giganews.com!nntp.comcast.com!news.comcast.com.POSTED!not-for-mail NNTP-Posting-Date: Sun, 13 Nov 2005 01:35:10 -0600 From: tmoran@acm.org Newsgroups: comp.lang.ada Subject: Re: Buffer overflow Article - CACM References: X-Newsreader: Tom's custom newsreader Message-ID: Date: Sun, 13 Nov 2005 01:35:10 -0600 NNTP-Posting-Host: 67.169.16.9 X-Trace: sv3-eijTl3x8RKWwNWNOOnhH56oUZsWa9iwS20AUu6UfdJ9kiUSij7ZZ/lH5W6lasKORLwY6VY7TBXX7hZP!Z73c2AMNumVliRjmZl/2eYPVPJ9QtadICAp8riIadIMKN9AkMJsC3EpY4iNRL87c1bKlXlpQWKY= X-Complaints-To: abuse@comcast.net X-DMCA-Complaints-To: dmca@comcast.net X-Abuse-and-DMCA-Info: Please be sure to forward a copy of ALL headers X-Abuse-and-DMCA-Info: Otherwise we will be unable to process your complaint properly X-Postfilter: 1.3.32 Xref: g2news1.google.com comp.lang.ada:6355 Date: 2005-11-13T01:35:10-06:00 List-Id: >In one paragraph, they criticize C as being vulnerable to such attacks >and then dismiss Pascal as being unable to address low-level issues. They also say "the performance cost of bounds checking (reported in [the 'Cyclone' variant of C]) involves up to an additional 100% overhead." I tried -- Lo, Hi, and A are procedure parameters, so their values -- and bounds are not known at compile time. for i in Lo .. Hi loop A(i) := 0; end loop; with Gnat 3.15p with bounds checking on or off, -O2, and got a 65% degradation, (Because the bounds are pushing the index out of a register?) In the real world, my impression is that 10-15% is a more common cost of all checking on vs all off. Even at 65%, if the 20% of the code that takes 80% of the time were hand checked and then compiled with checking suppressed, 65% would change to 13% or about 3 months of CPU age by Moore's law. >This kind of article appears every now and then. The authors of these >articles write as if it is necessary to improve C or invent new tools >when all they really have to do is discover Ada. Sometimes one does feel like an observer watching a primitive tribe do something the very hard way. #.# They also quite fail to mention the x86's Bound instruction (does anybody use it?) or descriptor architectures like the Burroughs machines of 40 years ago.