Mantis Bugtracker
  

Viewing Issue Advanced Details Jump to Notes ] View Simple ] Issue History ] Print ]
ID Category Severity Reproducibility Date Submitted Last Update
0003210 [Quercus] minor always 12-30-08 09:01 01-04-09 16:54
Reporter ferg View Status public  
Assigned To ferg
Priority urgent Resolution fixed Platform
Status closed   OS
Projection none   OS Version
ETA none Fixed in Version 4.0.0 Product Version 4.0.0
  Product Build
Summary 0003210: array reference issue
Description (rep by koreth)

Code is something like the following, where $stack gets modified by the yystack assignment.

class A {
  public $yystack = array("a", "b");
  public $yyindex = 0;

  function bar()
  {
    $x =& $this->yystack;
  }

  function foo()
  {
    $stack = $this->yystack;

    $x = new C;
    $this->yystack[$this->yyindex++] = $x;

    return $stack;
  }
}
Steps To Reproduce
Additional Information
Attached Files

- Relationships

- Notes
(0003686)
ferg
12-30-08 09:25

php/04a8
 
(0003694)
ferg
01-04-09 16:53

php/34a9 for the specific code.

The general case is not solvable in Quercus, because PHP's references are implemented by reference count, which Quercus does not do. So there are situations where PHP will create a reference and remove it, and Quercus will create a reference, but not be able to remove the reference.

Since array copies behave differently for references vs array values, this difference between Apache PHP and Quercus will need to be resolved on a case-by-case basis.
 

- Issue History
Date Modified Username Field Change
12-30-08 09:01 ferg New Issue
12-30-08 09:25 ferg Note Added: 0003686
12-30-08 09:25 ferg Assigned To  => ferg
12-30-08 09:25 ferg Status new => closed
12-30-08 09:25 ferg Resolution open => fixed
12-30-08 09:25 ferg Fixed in Version  => 4.0.0
12-30-08 12:50 nam Assigned To ferg =>
12-30-08 12:50 nam Status closed => new
12-30-08 12:56 koreth Issue Monitored: koreth
01-04-09 14:44 ferg Priority normal => urgent
01-04-09 16:53 ferg Note Added: 0003694
01-04-09 16:54 ferg Assigned To  => ferg
01-04-09 16:54 ferg Status new => closed


Mantis 1.0.0rc3[^]
Copyright © 2000 - 2005 Mantis Group
33 total queries executed.
28 unique queries executed.
Powered by Mantis Bugtracker