Re: new/different problem in shutdown

From: Date: Sun, 08 Jul 2001 12:55:36 +0000
Subject: Re: new/different problem in shutdown
References: 1 2 3 4 5 6 7  Groups: php.dev 
Request: Send a blank email to php-dev+get-59208@lists.php.net to get a copy of this message
On Fri, Jul 06, 2001 at 07:13:09PM +0300, Andi Gutmans wrote: > I haven't checked it but something like the following might > give you a > problem. > > Andi > > <? > function any($fh) > { > exit(); // exit in a function is noo good... > } > > $fp = fopen("/tmp/1","r"); > $fp && any($fp); > ?> my patch fixes this as well. (just checked) after looking at the pzval_lock etc i would suggest moving the zend_hash_destroy(&EG(symbol_table)); after the while (EG(garbage_ptr)--) loop in shutdown_executor. am i still missing something? tc > > > At 05:35 PM 7/6/2001 +0200, Thies C. Arntzen wrote: > >On Fri, Jul 06, 2001 at 05:39:18PM +0300, Andi Gutmans wrote: > >> At 04:31 PM 7/6/2001 +0200, Thies C. Arntzen wrote: > >> >On Fri, Jul 06, 2001 at 05:12:07PM +0300, Andi Gutmans wrote: > >> >> Thies, > >> >> > >> >> I have thought about your problem. Your patch fixed your test case > >but > >> >it > >> >> won't fix all test cases. It is pretty much impossible to make sure on > >> >> bailout (including exit() and errors) that all of the reference > >counts of > >> >> the variables will go down to 0 even if we clean the call stack. This > >is > >> >> due to necessary internal locking of variables in Zend. > >> > > >> > i don't understand why we cant go thru the call-stack and > >> > del-ref all the arguments? we're shutting down anyhow - > >> > right? > >> > > >> > also i'm *not talking* about bail at all - bail dosn't work > >> > anyhow - and there's no good way to fix it IMHO. but what > >> > needs to work is calling exit() from a function if there are > >> > resources somewhere on the stack. > >> > >> Because as I mentioned there might be locked variables which aren't in > >the > >> call stack. This is what I could think of right now but there might be > >> other problems too. > > > > could you send me a php-snippet that shows this problem - i'd > > like to "dig". > > re, > > tc >

« previous php.dev (#59208) next »