Re: [Lit.] Buffer overruns

From: karl malbrain (karl_m_at_acm.org)
Date: 12/17/04


Date: Thu, 16 Dec 2004 15:03:27 -0800


"Mok-Kong Shen" <mok-kong.shen@t-online.de> wrote in message
news:cpt2he$r7l$05$1@news.t-online.com...
>
>
> karl malbrain wrote:
>
> > "Mok-Kong Shen" <mok-kong.shen@t-online.de> wrote:
>
> >>
> >>Douglas A. Gwyn wrote:
> >>
> >>
> >>>Mok-Kong Shen wrote:
> >>>
> >>>
> >>>>That essentially amounts to 'Have the programmer do the program
> >>>>correctly' in my understanding.
> >>>
> >>>
> >>>Yes, wouldn't that be an improvement.
> >>
> >>But that's a general requirement (a goal of software projects)
> >>that is 'independent' of languages. Any languages (also
> >>the logic formalisms) could be used wrongly, if one is not
> >>careful enough. The issue, as many pointed out, is that
> >>measures for reducing the probability of errors of 'average'
> >>programmers (as far as practically feasible) seem to be
> >>generally advantageous in all programming work, since it is
> >>often hard to obtain really good expert programmers and be
> >>absolutely sure that Murphy's law would never apply.
> >
> >
> > That's why you developed a layered system using C at the base level.
You
> > build layers on that which improve the productivity (and safety) of
> > "average" programmers. karl m
>
> Couldn't one with the same argument also develop a layered system
> using assembler at the base level? (I hope that you see my point.)

But we don't need to since we have C, which is the next level up. Ada is a
possible replacement, but it's an open question. It's way too complicated
for what I need on my bottom layer, for example. I suppose I could have
implemented using assembler, but thankfully I didn't need to.

At the base of my bottom layer I essentially run:

do opcode = opset(env); env->status = (env->fcn[opcode])(env);
while( env->status == OK );

I know exactly what assembly code this generates with C, and I can "prove"
its safety relative to array bounds, etc. I'd hate to lose this under Ada,
or some other "safety" language. karl m



Relevant Pages

  • Re: [Lit.] Buffer overruns
    ... > karl malbrain wrote: ... >> That's why you developed a layered system using C at the base level. ... implemented using assembler, but thankfully I didn't need to. ...
    (sci.crypt)
  • Re: [Lit.] Buffer overruns
    ... > Couldn't one with the same argument also develop a layered system ... > using assembler at the base level? ... programming *is* legitimately done in assembly language. ...
    (sci.crypt)
  • Re: [Lit.] Buffer overruns
    ... > Couldn't one with the same argument also develop a layered system ... > using assembler at the base level? ... programming *is* legitimately done in assembly language. ...
    (comp.security.unix)
  • Re: [Lit.] Buffer overruns
    ... >>using assembler at the base level? ... > implemented using assembler, but thankfully I didn't need to. ... language is related to one's native language or another ... programmers should have less learning effort for ADA. ...
    (sci.crypt)
  • Re: [Lit.] Buffer overruns
    ... >>using assembler at the base level? ... > implemented using assembler, but thankfully I didn't need to. ... language is related to one's native language or another ... programmers should have less learning effort for ADA. ...
    (comp.security.unix)