Package home | Report new bug | New search | Development Roadmap Status: Open | Feedback | All | Closed Since Version 0.1.7

Bug #12730 Generated Parser destructor *can* loop forever
Submitted: 2007-12-19 17:58 UTC
From: urkle Assigned: urkle
Status: Closed Package: PHP_ParserGenerator (version 0.1.5)
PHP Version: 5.2.4 OS: Fedora 8 x86_64
Roadmaps: (Not assigned)    
Subscription  


 [2007-12-19 17:58 UTC] urkle (Edward Rudd)
Description: ------------ The __destructor() method that is created from Lempar.php has the ability to loop forever if yyidx never gets updated (ie. Error VERY early on). Proposed fix. Initialize public $yyidx = -1 to fix (line 248 in Lempar.php)

Comments

 [2010-08-09 00:41 UTC] jespino (Jesús Espino)
-Status: Open +Status: Closed -Assigned To: +Assigned To: jespino
This bug has been fixed in SVN. If this was a documentation problem, the fix will appear on pear.php.net by the end of next Sunday (CET). If this was a problem with the pear.php.net website, the change should be live shortly. Otherwise, the fix will appear in the package's next release. Thank you for the report and for helping us make PEAR better. Applied the patch of Thue Kristensen in the bug #17381
 [2010-08-09 19:24 UTC] urkle (Edward Rudd)
The fix you applied seems really inefficient.. A better fix may be to do while (!empty($this->yystack)) { $this->yy_pop_parser_stack(); } As doing comparisons against Array() is rather expensive. .
 [2010-08-09 19:42 UTC] jespino (Jesús Espino)
-Status: Closed +Status: Open
I open again the bug to make sure the problem is solved in the better way. Edward Rudd has proposed another solution with more efficient code (but i have to confirm that solution not create new problems or not fix completly the actual problem).
 [2010-08-14 18:11 UTC] jespino (Jesús Espino)
-Status: Assigned +Status: Closed
This bug has been fixed in SVN. If this was a documentation problem, the fix will appear on pear.php.net by the end of next Sunday (CET). If this was a problem with the pear.php.net website, the change should be live shortly. Otherwise, the fix will appear in the package's next release. Thank you for the report and for helping us make PEAR better. I applied the Edward Rudd porposed solution. This is more eficient and we have to take care with the yyidx anyway.
 [2010-08-14 18:15 UTC] jespino (Jesús Espino)
-Assigned To: jespino +Assigned To: urkle