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=unavailable autolearn_force=no version=3.4.4 Path: eternal-september.org!reader01.eternal-september.org!reader02.eternal-september.org!news.eternal-september.org!news.eternal-september.org!feeder.eternal-september.org!gandalf.srv.welterde.de!news.jacob-sparre.dk!franka.jacob-sparre.dk!pnx.dk!.POSTED!not-for-mail From: "Randy Brukardt" Newsgroups: comp.lang.ada Subject: Re: Introductory Presentations, especially aimed at C++ programmers! Date: Fri, 9 Dec 2016 15:58:23 -0600 Organization: JSA Research & Innovation Message-ID: References: <1905815374.502825168.454102.laguest-archeia.com@nntp.aioe.org> NNTP-Posting-Host: rrsoftware.com X-Trace: franka.jacob-sparre.dk 1481320704 19062 24.196.82.226 (9 Dec 2016 21:58:24 GMT) X-Complaints-To: news@jacob-sparre.dk NNTP-Posting-Date: Fri, 9 Dec 2016 21:58:24 +0000 (UTC) X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2900.5931 X-RFC2646: Format=Flowed; Response X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.6157 Xref: news.eternal-september.org comp.lang.ada:32704 Date: 2016-12-09T15:58:23-06:00 List-Id: "Jeffrey R. Carter" wrote in message news:o2a6vq$q8s$1@dont-email.me... > On 12/07/2016 04:03 PM, Randy Brukardt wrote: >> >> To be fair, though, such things can happen in Ada, too. Case in point: >> something that happened to me today. >> >> A customer had what appears to be a permissions problem installing >> Janus/Ada, so before contacting us, they tried an uninstall. The >> uninstaller >> crashed. I asked them to send me the exact message, and it proved to be >> overflow error in Claw.Registry. Tracking that down showed that the >> buffer >> for reading a registry variable (so stuff could be removed from it) >> wasn't >> big enough. Of course, Ada detected the error and crashed, but that's >> only >> an iota better than what would have happened in C (the uninstaller didn't >> do >> its job either way). > > Well, no, that's not the same thing. You didn't overflow a buffer; you > tried to overflow a buffer, but Ada wouldn't let you. To be fair, the attempt to overflow the buffer came from a Windows API call, which wouldn't let you do that no matter what the language. A C program could still get in trouble by ignoring the failing API result, but that wouldn't be hard in Ada, either. The main difference here is the culture surrounding the languages, where in Ada a library ignoring failure would be a library no one would use; can't say that about C libraries. Randy.