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!.POSTED!not-for-mail From: "Jeffrey R. Carter" Newsgroups: comp.lang.ada Subject: Re: Introductory Presentations, especially aimed at C++ programmers! Date: Wed, 7 Dec 2016 16:47:23 -0700 Organization: Also freenews.netfront.net; news.tornevall.net; news.eternal-september.org Message-ID: References: <1905815374.502825168.454102.laguest-archeia.com@nntp.aioe.org> Mime-Version: 1.0 Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit Injection-Date: Wed, 7 Dec 2016 23:46:04 -0000 (UTC) Injection-Info: mx02.eternal-september.org; posting-host="7f64ac2ab5921fd56e996d682850858d"; logging-data="26908"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/DknfHUD1KDRYUERtbNlmQNMVcH0U/8Qo=" User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.5.1 In-Reply-To: Cancel-Lock: sha1:ZihCQDNvWLWuvS1aivn0xhxCGKA= Xref: news.eternal-september.org comp.lang.ada:32669 Date: 2016-12-07T16:47:23-07:00 List-Id: 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 my mind, that's exponentially better than what you get in C. Nobody was able to take control of your computer because your program crashed. And exponentially better than being prevented from overflowing a buffer is being able to figure out how to do declare B : Buffer (1 .. Just_The_Right_Size); which is usually possible. -- Jeff Carter "In the frozen land of Nador they were forced to eat Robin's minstrels, and there was much rejoicing." Monty Python & the Holy Grail 70