php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #59056 bcompiler can't compile php build-in classes
Submitted: 2010-02-01 11:14 UTC Modified: 2010-02-01 15:06 UTC
From: bugs at bilke dot org Assigned:
Status: Wont fix Package: bcompiler (PECL)
PHP Version: 5.2.10 OS: Ubuntu 9.10
Private report: No CVE-ID: None
Have you experienced this issue?
Rate the importance of this bug to you:

 [2010-02-01 11:14 UTC] bugs at bilke dot org
Description:
------------
Using the bcompiler_compile.php script, shipped with the bcompiler documentation it's not possible to compile classes which extends php build-in classes.

The script execution will fail with a seg fault.

Reproduce code:
---------------
<?php
class MyClass extends Exception {

}
?>

Actual result:
--------------
WRITING TO MyClass.php.phb
PARSE: ./MyClass.php
ADDED CLASS: MyClass
Array
(
    [0] => MyClass
)
COMPILE Exception extends '' 
Segmentation fault
Exit 139

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2010-02-01 15:06 UTC] val@php.net
Problem is obviously with bcompiler_compile.php, but it's kind of outdated (see bug #17039 for details).

The handling of user classes that extend built-in classes doesn't seem to have any issues, tested with the following:

<?php
class MyClass extends Exception {

}

  $f = fopen('bug-17040.phb', "w");
  bcompiler_write_header($f);
  bcompiler_write_class($f, 'MyClass');
  bcompiler_write_footer($f);
  fclose($f);
?>
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Apr 25 16:01:28 2024 UTC