php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #29040 Double arrow ($this->a->b), foreach and debug_backtrace() conflict
Submitted: 2004-07-07 03:03 UTC Modified: 2004-07-27 01:00 UTC
Votes:2
Avg. Score:2.0 ± 1.0
Reproduced:0 of 0 (0.0%)
From: php at koteroff dot ru Assigned:
Status: No Feedback Package: Reproducible crash
PHP Version: 5.0.0RC3 OS: Windows XP
Private report: No CVE-ID: None
Have you experienced this issue?
Rate the importance of this bug to you:

 [2004-07-07 03:03 UTC] php at koteroff dot ru
Description:
------------
I have spent about 3 hours (!) trying to localize this crash and write simple script to reproduce it - but vainly. :-(

So, I write something that I have. The following code:

function reloadPlugins() {  
  #$s =& $this->smarty;
  $this->smarty->plugins_dir1 = array(1,2,3);
  foreach ($this->smarty->plugins_dir1 as $dir) {}
  debug_backtrace();
  return;
  // ..
}

reproducibly crashes PHP (General Protection Fault). 

* If I simply uncomment the first line (no more changes!), crash dissapears, all works. 

* When I use
  $s = $this->smarty;
  foreach ($s->plugins_dir1 ...)
it also works. 

* When I substitute Smarty with my own stub class (empty), it also works. 

* When I completely delete empty forech, all work fine. 

* And, of course, if I delete debug_backtrace() call, it works.

* PHP5 RC2 also works.

I don't know what is it, and I don't know how to catch it. But it exists. Sorry. 


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2004-07-07 09:14 UTC] derick@php.net
This is all pretty useles as there is no way we can try to even attempt looking into this now. If you have the possibility, run this on linux and generate a backtrace.
 [2004-07-27 01:00 UTC] php-bugs at lists dot php dot net
No feedback was provided for this bug for over a week, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to "Open".
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sun May 12 19:01:30 2024 UTC