Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.unix.programmer > #1148

Re: C Code "sanity checking" tools

From Rainer Weikusat <rweikusat@mssgmbh.com>
Newsgroups comp.unix.programmer
Subject Re: C Code "sanity checking" tools
Date 2011-08-14 19:46 +0100
Message-ID <874o1j3k78.fsf@sapphire.mobileactivedefense.com> (permalink)
References (6 earlier) <877h6mpeb2.fsf@sapphire.mobileactivedefense.com> <rubrum-7BFB4F.19242109082011@news.albasani.net> <87aabhty3q.fsf@sapphire.mobileactivedefense.com> <87r54tto76.fsf@sapphire.mobileactivedefense.com> <lnvcu052wd.fsf@nuthaus.mib.org>

Show all headers | View raw


Keith Thompson <kst-u@mib.org> writes:
> Rainer Weikusat <rweikusat@mssgmbh.com> writes:
>> Rainer Weikusat <rweikusat@mssgmbh.com> writes:
>>
>> [...]
>>
>>>>> >>>> http://www.di.unito.it/~damiani/ariane5rep.html
>>
>> [...]
>>
>>> But that's a rather tangential point: A 16-bit
>>> variable overflowed. A runtime check for this caused the CPU to be
>>> halted.
>>
>> Nevertheless, I'd like to clarify my original statement after
>> rereading (the relevant parts of) the text: Using a particular
>> programming language does not protect against "cannot happen"-coding
>> and the Ada-code involved here had needed explicit overflow checks,
>> combined with a sensible strategy for dealing with overflows, in
>> exactly the same way as code which had been written in C had also
>> needed them.
> [...]
>
> Yes, adding additional explicit overflow checks to the Ariane
> 4 code might have prevented the Ariane 5 failure.  It would also
> have cost additional CPU time, code space, and perhaps other scarce
> resources, to implement those checks.  The omission of the checks
> was the result of a deliberate decision,

Indeed. The deliberate descision was - how new and uncommon - to
ignore the problem of possibly 'invalid' external inputs because the
Ada runtime already provided what the specification mandated, namely,
halt the CPU in case of any error. Given that rockets of this type
aren't exactly manufactured in great quantities, are you sure that
this hypothetic additional per-rocket cost was anywhere near the
amount of money needed to build and start this really expensive
firecracker? Especially considering that the work had to be done
anyway, after the 'el cheapo'-approache proved to be unworkable in a
fairly spectacular way?

And how's that related to the "C isn't safe while Ada ..." assertion I
was addressing?

Back to comp.unix.programmer | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

C Code "sanity checking" tools Martin Crouch <spamspamspam@spaml.com> - 2011-08-08 12:00 +0100
  Re: C Code "sanity checking" tools Richard Kettlewell <rjk@greenend.org.uk> - 2011-08-08 12:09 +0100
    Re: C Code "sanity checking" tools Fritz Wuehler <fritz@spamexpire-201108.rodent.frell.theremailer.net> - 2011-08-09 08:50 +0200
      Re: C Code "sanity checking" tools Måns Rullgård <mans@mansr.com> - 2011-08-09 10:55 +0100
        Re: C Code "sanity checking" tools Ben Bacarisse <ben.usenet@bsb.me.uk> - 2011-08-09 14:15 +0100
        Re: C Code "sanity checking" tools Nomen Nescio <nobody@dizum.com> - 2011-08-10 01:58 +0200
        Re: C Code "sanity checking" tools Nomen Nescio <nobody@dizum.com> - 2011-08-10 12:29 +0200
      Re: C Code "sanity checking" tools Rainer Weikusat <rweikusat@mssgmbh.com> - 2011-08-09 14:17 +0100
        Re: C Code "sanity checking" tools Keith Thompson <kst-u@mib.org> - 2011-08-09 09:17 -0700
          Re: C Code "sanity checking" tools Rainer Weikusat <rweikusat@mssgmbh.com> - 2011-08-09 17:36 +0100
            Re: C Code "sanity checking" tools Keith Thompson <kst-u@mib.org> - 2011-08-09 12:19 -0700
              Re: C Code "sanity checking" tools Rainer Weikusat <rweikusat@mssgmbh.com> - 2011-08-09 20:36 +0100
                Re: C Code "sanity checking" tools Michael Press <rubrum@pacbell.net> - 2011-08-09 19:24 -0700
                Re: C Code "sanity checking" tools Rainer Weikusat <rweikusat@mssgmbh.com> - 2011-08-10 10:27 +0100
                Re: C Code "sanity checking" tools Rainer Weikusat <rweikusat@mssgmbh.com> - 2011-08-10 14:01 +0100
                Re: C Code "sanity checking" tools "io_x" <a@b.c.invalid> - 2011-08-13 09:42 +0200
                Re: C Code "sanity checking" tools Keith Thompson <kst-u@mib.org> - 2011-08-13 16:04 -0700
                Re: C Code "sanity checking" tools Rainer Weikusat <rweikusat@mssgmbh.com> - 2011-08-14 19:46 +0100
  Re: C Code "sanity checking" tools Ian Collins <ian-news@hotmail.com> - 2011-08-08 23:12 +1200
    Re: C Code "sanity checking" tools Ben Bacarisse <ben.usenet@bsb.me.uk> - 2011-08-08 15:35 +0100
      Re: C Code "sanity checking" tools Martin Crouch <spamspamspam@spaml.com> - 2011-08-08 16:05 +0100
        Re: C Code "sanity checking" tools Ben Bacarisse <ben.usenet@bsb.me.uk> - 2011-08-08 22:57 +0100
          Re: C Code "sanity checking" tools Måns Rullgård <mans@mansr.com> - 2011-08-08 23:32 +0100
      Re: C Code "sanity checking" tools Ian Collins <ian-news@hotmail.com> - 2011-08-09 08:03 +1200
        Re: C Code "sanity checking" tools Ben Bacarisse <ben.usenet@bsb.me.uk> - 2011-08-08 22:51 +0100
          Re: C Code "sanity checking" tools Ian Collins <ian-news@hotmail.com> - 2011-08-09 10:01 +1200
    Re: C Code "sanity checking" tools jt@toerring.de (Jens Thoms Toerring) - 2011-08-08 22:06 +0000
      Re: C Code "sanity checking" tools Ian Collins <ian-news@hotmail.com> - 2011-08-09 10:18 +1200
        Re: C Code "sanity checking" tools jt@toerring.de (Jens Thoms Toerring) - 2011-08-08 23:25 +0000
  Re: C Code "sanity checking" tools Nobody <nobody@nowhere.com> - 2011-08-08 14:01 +0100
    Re: C Code "sanity checking" tools Måns Rullgård <mans@mansr.com> - 2011-08-08 14:47 +0100
      Re: C Code "sanity checking" tools Martin Crouch <spamspamspam@spaml.com> - 2011-08-08 16:08 +0100
        Re: C Code "sanity checking" tools Marc <marc.glisse@gmail.com> - 2011-08-08 15:39 +0000
      Re: C Code "sanity checking" tools William Ahern <william@wilbur.25thandClement.com> - 2011-08-08 10:20 -0700
      Re: C Code "sanity checking" tools Nobody <nobody@nowhere.com> - 2011-08-09 00:59 +0100
  Re: C Code "sanity checking" tools mathog <dmathog@gmail.com> - 2011-08-08 08:48 -0700

csiph-web