comp.lang.ada
 help / color / mirror / Atom feed
From: robin.vowels@gmail.com
Subject: Re: Boeing 787 integer overflow
Date: Mon, 4 May 2015 01:45:57 -0700 (PDT)
Date: 2015-05-04T01:45:57-07:00	[thread overview]
Message-ID: <535fc0ec-ed85-4f21-8afa-0430e34be383@googlegroups.com> (raw)
In-Reply-To: <mi7aic$fg$1@dont-email.me>

On Monday, May 4, 2015 at 6:29:00 PM UTC+10, Georg Bauhaus wrote:
> On 04.05.15 01:54, r.nospam@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.

Apparently there is already an error handler.
Detecting overflow is typically very fast.
On some systems, detection is automatic by hardware
while on others, an instruction is executed following the
relevant arithmetic operation, to raise an interrupt should
overflow occur.

> So, if the bit size could be increased without affecting
> the system in other ways, this looks like a much cheaper
> solution to me.

Might not be possible.  Dedicated processors have limits on
the size of a word, or size of the arithmetic register(s).

Merely using more bits in a register [even if permitted
by hardware] is not the solution.  It merely defers it.

The solution is to fix the software, by handling the interrupt
with a different error handler from the general one.
An alternative might be to initialize the timer automatically
before every take-off.


  reply	other threads:[~2015-05-04  8:45 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-05-02 23:34 Boeing 787 integer overflow Robert Love
2015-05-03 11:23 ` Maciej Sobczak
2015-05-03 15:27   ` Georg Bauhaus
2015-05-03 16:03   ` Peter Chapin
2015-05-03 23:34     ` Dennis Lee Bieber
2015-05-04  0:00       ` robin.vowels
2015-05-04  0:38       ` Jeffrey R. Carter
2015-05-04  1:55         ` robin.vowels
2015-05-03 23:54     ` robin.vowels
2015-05-04  8:28       ` Georg Bauhaus
2015-05-04  8:45         ` robin.vowels [this message]
2015-05-04 11:26           ` G.B.
2015-05-04 12:17             ` Dmitry A. Kazakov
2015-05-04 12:53               ` G.B.
2015-05-04 13:28         ` Dennis Lee Bieber
2015-05-03 23:49   ` robin.vowels
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox