Path: utzoo!attcan!uunet!seismo!sundc!pitstop!sun!decwrl!labrea!rutgers!uwvax!tank!mimsy!chris From: chris@mimsy.UUCP (Chris Torek) Newsgroups: comp.lang.c Subject: Re: Run-time Checks for C Message-ID: <14644@mimsy.UUCP> Date: 20 Nov 88 05:17:45 GMT References: <10113@umn-cs.CS.UMN.EDU> <189@umigw.MIAMI.EDU> Organization: U of Maryland, Dept. of Computer Science, Coll. Pk., MD 20742 Lines: 27 >In article <10113@umn-cs.CS.UMN.EDU> raghavan@umn-cs.cs.umn.edu (Vijay >Raghavan) writes: >>(I mean I'm not sure that sufficient information can always be passed >> to the compiler for it to generate code for meaningful run-time checks.) >> Comments? In article <189@umigw.MIAMI.EDU> steve@umigw.MIAMI.EDU (steve emmerson) suggests: >In general, a pointer to garbage can easily masquerade as valid. While this is true, if the compiler is careful, and does not provide a way to get directly at the machine%, the compiler and runtime system can ensure that the program cannot generate a pointer to garbage. In fact, it is possible to apply to C systems most of the run-time checks common in, e.g., Pascal systems. There are several companies selling such systems. Look around at a Usenix or /usr/group vendor show, for instance. ----- % This means no assembly escapes, and requires checking all pointer/ integer and pointer/pointer conversions and/or all pointer references. In addition to a fairly hefty efficiency price-tag, this does, of course, make the implementation virtually useless for writing device drivers for conventional hardware. ----- -- In-Real-Life: Chris Torek, Univ of MD Comp Sci Dept (+1 301 454 7163) Domain: chris@mimsy.umd.edu Path: uunet!mimsy!chris