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
-- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php