Skip to content
This repository has been archived by the owner on Dec 16, 2019. It is now read-only.

Commit

Permalink
add test for #495
Browse files Browse the repository at this point in the history
  • Loading branch information
krakjoe committed Oct 7, 2015
1 parent 60d043e commit 479329a
Showing 1 changed file with 30 additions and 0 deletions.
30 changes: 30 additions & 0 deletions tests/constant-ast-copy.phpt
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
--TEST--
Test constant AST copy bug #495
--DESCRIPTION--
AST in op array literals caused corrupted heaps because it wasn't copied properly.
--FILE--
<?php
class Test
{
private static function getClassPropertyNames(
string $classname,
$view = \ReflectionProperty::IS_PUBLIC | \ReflectionProperty::IS_PROTECTED) {
}
}

$t = new class extends \Thread {
public function run() {
throw new \Exception();
}
};

$t->start() && $t->join();
?>
--EXPECTF--
Fatal error: Uncaught Exception in %s:12
Stack trace:
#0 [internal function]: class@anonymous->run()
#1 {main}
thrown in %s on line 12


0 comments on commit 479329a

Please sign in to comment.