[Bug 1198882] Re: __toString() which stores $this reference triggers segfault

Алексей rip84 at bk.ru
Tue Jul 9 12:59:25 UTC 2013


** Description changed:

- Bug described on https://bugs.php.net/bug.php?id=60701 not fixes in current version. 
- Code as 
+  ProblemType: Package
+  DistroRelease: Ubuntu 12.04
+  Package: php5
+ Code as
  <?php
  
  class A {
-         public $a;
-         public function __toString()
-         {
-                 $this->a = $this;
-                 return 'waa?';
-         }
+         public $a;
+         public function __toString()
+         {
+                 $this->a = $this;
+                 return 'waa?';
+         }
  }
  
  $a = new A;
  echo trim($a);
  echo trim($a->a);
  
  ?>
  crashes in CLI, and run as php mod in apache

** Description changed:

-  ProblemType: Package
-  DistroRelease: Ubuntu 12.04
-  Package: php5
+ DISTRIB_DESCRIPTION="Ubuntu 12.04.2 LTS"
+ php --version
+ PHP 5.3.10-1ubuntu3.6 with Suhosin-Patch 
+ 
  Code as
  <?php
  
  class A {
          public $a;
          public function __toString()
          {
                  $this->a = $this;
                  return 'waa?';
          }
  }
  
  $a = new A;
  echo trim($a);
  echo trim($a->a);
  
  ?>
  crashes in CLI, and run as php mod in apache

-- 
You received this bug notification because you are a member of Ubuntu
Server Team, which is subscribed to php5 in Ubuntu.
https://bugs.launchpad.net/bugs/1198882

Title:
  __toString() which stores $this reference triggers segfault

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/php5/+bug/1198882/+subscriptions



More information about the Ubuntu-server-bugs mailing list