|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
[2009-12-06 18:57 UTC] msteele at beringmedia dot com
Description:
------------
Extending built-in classes or implementing classes causes segfault when compiled with bcompiler_compile.php
Reproduce code:
---------------
Extend issue:
<?php
class Blargh extends Exception {
public function bla() {
echo "hello\bn";
}
}
?>
Interface issue:
<?php
class Blargh implements Countable {
public function count() {}
}
?>
Interface issue:
<?php
interface Blargh {
public function blah();
}
class Boo implements Blargh {
public function blah() {}
}
?>
Expected result:
----------------
All test cases should produce working bytecode
Actual result:
--------------
The compiler script does segmentation fault
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Sat Nov 01 14:00:01 2025 UTC |
bug reproduced on FreeBSD 8.1, PHP 5.3.6, bcompiler 0.9.3 # cat comp.php <?php function compileFile($input, $output) { $f = fopen($output, 'w'); bcompiler_write_header($f); bcompiler_write_file($f, $input); bcompiler_write_footer($f); fclose($f); } compileFile($argv[1], $argv[2]); ?> # cat fuck.php <?php class QQQ { function __construct() { $this->i(); } function i() {} }; class QQQ1 extends QQQ { function q($addrs, $listenport) { if (is_string($addrs)) { echo('.'); $addrs = explode(',', $addrs); echo('?'); } echo('!'); } }; class QQQ2 extends QQQ1 { function i() { $this->q('test', 'whatever'); } }; $m = new QQQ2; ?> # php fuck.php .?! # php comp.php fuck.php fuck.bin # php fuck.bin .?Segmentation fault (core dumped)