Re: [PHP4BETA] TSRM problems... UMBRs everywhere:-((

From: Date: Thu, 23 Dec 1999 15:53:24 +0000
Subject: Re: [PHP4BETA] TSRM problems... UMBRs everywhere:-((
References: 1  Groups: php.version4 
Request: Send a blank email to php-version4+get-8448@lists.php.net to get a copy of this message
On Thu, 23 Dec 1999 zeev@zend.com wrote: > On Thu, 23 Dec 1999, Thies C. Arntzen wrote: > > > remember - global variables are usually zeroed when the program loads: > > > > #include <stdio.h> > > int not_reported; > > main() > > { > > int reported; > > printf("%d\n",not_reported); > > printf("%d\n",reported); > > } > > > > purify will not report not_reported 'cause the crt *will* initialize it to > > zero! > > I think it's a purify bug then. sorry, you're wrong: bss section ----------- This section contains zeroed bytes when your program begins running. It is used to hold unitialized variables or common storage. The length of each partial program's bss section is important, but because it starts out containing zeroed bytes there is no need to store explicit zero bytes in the object file. The bss section was invented to eliminate those explicit zeros from object files. every uninited global-variable *is* zeroed when the program starts - it's bad style but "generation" of programmes have built code with that in mind - i don't like it, but it's not a bug in purify! > > > agreed again. but what would be your strategy to find those problems? we > > could initialize all memory in DEBUG-node with 0xff to make debugging > > easier and to increase chances that we'll see some instability when those > > things happen. (to then pinpoint the bugs). > > We could do that... s/c/s/g ?? tc > > Zeev > > > -- > PHP 4.0 Beta Mailing List <http://www.php.net/version4/> > To unsubscribe, e-mail: php4beta-unsubscribe@lists.php.net > For additional commands, e-mail: php4beta-help@lists.php.net > To contact the list administrators, e-mail: php4beta-admin@lists.php.net > > Thies C. Arntzen "One Big-Mac, Small Fries and a Coke!" Digital Collections Phone +49 40 235350 Fax +49 40 23535180 Hammerbrookstr. 93 20097 Hamburg / Germany

« previous php.version4 (#8448) next »