Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:7061 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 92332 invoked by uid 1010); 13 Jan 2004 21:01:24 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 92298 invoked from network); 13 Jan 2004 21:01:24 -0000 Received: from unknown (HELO mail.zend.com) (192.117.235.230) by pb1.pair.com with SMTP; 13 Jan 2004 21:01:24 -0000 Received: (qmail 6469 invoked from network); 13 Jan 2004 21:01:21 -0000 Received: from guardian.zend.office (HELO andi-laptop.zend.com) (10.1.1.4) by int.zend.com with SMTP; 13 Jan 2004 21:01:21 -0000 Message-ID: <5.1.0.14.2.20040113225823.04cd6ec0@127.0.0.1> X-Sender: andi@127.0.0.1 X-Mailer: QUALCOMM Windows Eudora Version 5.1 Date: Tue, 13 Jan 2004 23:01:18 +0200 To: Sterling Hughes ,internals@lists.php.net In-Reply-To: <20040113200330.GE23361@bumblebury.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii"; format=flowed Subject: Re: [PHP-DEV] fix for bug #26696 From: andi@zend.com (Andi Gutmans) References: <20040113200330.GE23361@bumblebury.com> Are you sure this is OK? It seems strange that string offsets don't need any unlocking. It might mean we have a problem someplace else and that you're fixing the cause and not the source of the problem (although I haven't had time to dig deep). In general, consider the following code: $a = "Foo"; switch ($a[0]) { case 'b': break; case 'c': break; case 'F': break; } Are you sure this doesn't leak now? I don't have time to look at it now, but if you are absolutely convinced the patch makes sense I'll try and step through it with a debugger as soon as I have some free time. BTW, thanks for taking a look at it. Andi At 03:03 PM 1/13/2004 -0500, Sterling Hughes wrote: >Hey, > >I've attached a fix for an engine level crash in switch() when it is >used with string offsets. This eliminates a double-free and valgrind >reports that no new leaks have been introduced. > >-Sterling > >-- >PHP Internals - PHP Runtime Development Mailing List >To unsubscribe, visit: http://www.php.net/unsub.php