com php-src: Add test for bug #67215: ext/opcache/tests/bug67215.phpt

From: Date: Thu, 03 Jul 2014 05:48:59 +0000
Subject: com php-src: Add test for bug #67215: ext/opcache/tests/bug67215.phpt
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-79219@lists.php.net to get a copy of this message
Commit: 533b1df7325673bf8159263379579d2142f57877 Author: Xinchen Hui <laruence@php.net> Thu, 3 Jul 2014 13:38:38 +0800 Parents: e17bfb472efe34934583141b963b9f90b7635594 Branches: PHP-5.5 Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=533b1df7325673bf8159263379579d2142f57877 Log: Add test for bug #67215 bjori> writing a testcase making sure you get a fatal error and does not segfault after that... is difficult Bugs: https://bugs.php.net/67215 Changed paths: A ext/opcache/tests/bug67215.phpt Diff: diff --git a/ext/opcache/tests/bug67215.phpt b/ext/opcache/tests/bug67215.phpt new file mode 100644 index 0000000..e9919d1 --- /dev/null +++ b/ext/opcache/tests/bug67215.phpt @@ -0,0 +1,28 @@ +--TEST-- +Bug #67215 (php-cgi work with opcache, may be segmentation fault happen) +--INI-- +opcache.enable=1 +opcache.enable_cli=1 +opcache.file_update_protection=0 +--SKIPIF-- +<?php require_once('skipif.inc'); ?> +--FILE-- +<?php + +$file_c = __DIR__ . "/bug67215.c.php"; +$file_p = __DIR__ . "/bug67215.p.php"; +file_put_contents($file_c, "<?php require \"$file_p\"; class c extends p {} ?>"); +file_put_contents($file_p, '<?php class p { protected $var = ""; } ?>'); +require $file_c; +$a = new c(); +require $file_c; +?> +--CLEAN-- +<?php +$file_c = __DIR__ . "/bug67215.c.php"; +$file_p = __DIR__ . "/bug67215.p.php"; +unlink($file_c); +unlink($file_p); +?> +--EXPECTF-- +Fatal error: Cannot redeclare class c in %sbug67215.c.php on line %d

« previous php.cvs (#79219) next »