ANSI C, hardware protection, out-of-bounds pointers

Joe English jeenglis at nunki.usc.edu
Sat Sep 16 09:50:36 AEST 1989


kdb at chinet.chi.il.us (Karl Botts) writes:
>>Even in such cases, it still wouldn't help with arrays of large objects,
>
>No argument again -- I would never do it myself.  It has been done,
>however.  Take a look at yyparse.c the way it handles the stack pointers (I
>think they are called "yyvs" and "yypvs" or something like that.)  
> [...]
>YACC parsers would fail under certain circumstances on such machines.  I'm
>out on a bit of a limb here, but I'd be interested if anybody has had such
>an experience?

Not likely;  YACC produces some hideous looking code, but
yyvs[-N] is guarranteed to never point below the actual
value stack because of the mathematical priciples by which
the parser is constructed.

Not that this is really relevant to C, but it's worth knowing...

--Joe English

  jeenglis at nunki.usc.edu 



More information about the Comp.std.c mailing list