From 533b1df7325673bf8159263379579d2142f57877 Mon Sep 17 00:00:00 2001 From: Xinchen Hui Date: Thu, 3 Jul 2014 13:38:38 +0800 Subject: [PATCH] Add test for bug #67215 bjori> writing a testcase making sure you get a fatal error and does not segfault after that... is difficult --- ext/opcache/tests/bug67215.phpt | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 ext/opcache/tests/bug67215.phpt diff --git a/ext/opcache/tests/bug67215.phpt b/ext/opcache/tests/bug67215.phpt new file mode 100644 index 0000000000..e9919d1001 --- /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-- + +--FILE-- +"); +file_put_contents($file_p, ''); +require $file_c; +$a = new c(); +require $file_c; +?> +--CLEAN-- + +--EXPECTF-- +Fatal error: Cannot redeclare class c in %sbug67215.c.php on line %d -- 2.40.0