Path: utzoo!attcan!utgpu!jarvis.csri.toronto.edu!mailrus!cs.utexas.edu!tut.cis.ohio-state.edu!att!chinet!kdb From: kdb@chinet.chi.il.us (Karl Botts) Newsgroups: comp.std.c Subject: Re: ANSI C, hardware protection, out-of-bounds pointers Message-ID: <9584@chinet.chi.il.us> Date: 15 Sep 89 02:53:02 GMT References: <427@maytag.waterloo.edu> <1989Sep5.175411.25203@utzoo.uucp> <9520@chinet.chi.il.us> <10997@smoke.BRL.MIL> Reply-To: kdb@chinet.chi.il.us (Karl Botts) Organization: Chinet - Public Access Unix Lines: 17 >Even in such cases, it still wouldn't help with arrays of large objects, >because first-1 would point many bytes below the start of the allocated >data block. No argument. I think I said something about the size of the objects in my original message. >Just don't use first-1. It's not that hard to avoid. 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.) I don't have a machine where meerly mentioning, as opposed to dereferencing, an OOB pointer will cause an exception, but such machines exist and I suspect 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?