php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #34201 runkit_method_copy() causes seg fault
Submitted: 2005-08-21 02:26 UTC Modified: 2005-08-21 12:23 UTC
From: Peter dot Albertsson at spray dot se Assigned:
Status: Not a bug Package: Unknown/Other Function
PHP Version: 5.0.4 OS: SuSE 9
Private report: No CVE-ID: None
 [2005-08-21 02:26 UTC] Peter dot Albertsson at spray dot se
Description:
------------
Running the example provided at http://www.php.net/manual/en/function.runkit-method-copy.php causes a segmentation fault.

The segmentation fault appears to occur after the script has been executed.

Taking the advice to turn off any Zend extensions helps. When I turn off Zend Optimizer 2.5.8 the error does not occur.

Reproduce code:
---------------
<?php
class Foo {
   function example() {
       return "foo!\n";
   }
}

class Bar {
   // initially, no methods
}

// copy the example() method from the Foo class to the Bar class, as baz()
runkit_method_copy('Bar', 'baz', 'Foo', 'example');

// output copied function
echo Bar::baz();
?> 

Expected result:
----------------
foo!


Actual result:
--------------
foo!
Segmentation fault

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2005-08-21 12:23 UTC] derick@php.net
Do not file bugs when you have Zend extensions (zend_extension=)
loaded. Examples are Zend Optimizer, Zend Debugger, Turck MM Cache,
APC, Xdebug and ionCube loader.  These extensions often modify engine
behavior which is not related to PHP itself.

.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sat May 18 11:01:34 2024 UTC