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
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: Peter dot Albertsson at spray dot se
New email:
PHP Version: OS:

 

 [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

Pull Requests

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-2025 The PHP Group
All rights reserved.
Last updated: Sat Jul 12 05:01:33 2025 UTC