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, REPLYTO_WITHOUT_TO_CC autolearn=no autolearn_force=no version=3.4.4 Path: eternal-september.org!reader01.eternal-september.org!reader02.eternal-september.org!news.eternal-september.org!mx02.eternal-september.org!.POSTED!not-for-mail From: Georg Bauhaus Newsgroups: comp.lang.ada Subject: Re: Boeing 787 integer overflow Date: Mon, 04 May 2015 10:28:59 +0200 Organization: A noiseless patient Spider Message-ID: References: <201505021834588468-rblove@airmailnet> <9f20f713-d65c-471d-ab7c-d314a14fdcd0@googlegroups.com> <3e8a4ac6-b0cd-445d-8e9c-82ce8f7f9fee@googlegroups.com> Reply-To: nonlegitur@futureapps.de Mime-Version: 1.0 Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit Injection-Date: Mon, 4 May 2015 08:27:56 +0000 (UTC) Injection-Info: mx02.eternal-september.org; posting-host="b96887e80893c84a90c3007226ca0d1c"; logging-data="496"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/KsUkASm/uBdBNbm4HvI43cyON5hfLI8g=" User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.9; rv:31.0) Gecko/20100101 Thunderbird/31.6.0 In-Reply-To: <3e8a4ac6-b0cd-445d-8e9c-82ce8f7f9fee@googlegroups.com> Cancel-Lock: sha1:j9Px7ibaJKcRDfGEtOt7EmsHTmk= Xref: news.eternal-september.org comp.lang.ada:25721 Date: 2015-05-04T10:28:59+02:00 List-Id: On 04.05.15 01:54, robin.vowels@gmail.com wrote: >> A software fix might be nice, such as increasing the counter to 64 bits to >> >push the overflow time out to something ridiculous, > That isn't the solution. > The solution is to have an appropriate error handler. If the variable has system-wide effects, I think error handling would require a little more than a few lines of code for overflow. Also provided that detecting overflow can be made fast enough in the first place. So, if the bit size could be increased without affecting the system in other ways, this looks like a much cheaper solution to me.