File tree Expand file tree Collapse file tree 1 file changed +55
-0
lines changed Expand file tree Collapse file tree 1 file changed +55
-0
lines changed Original file line number Diff line number Diff line change
1
+ --TEST--
2
+ Bug #74596 (SIGSEGV with opcache.revalidate_path enabled)
3
+ --INI--
4
+ opcache.enable=1
5
+ opcache.enable_cli=1
6
+ opcache.file_update_protection=0
7
+ opcache.validate_timestamps=0
8
+ opcache.file_cache_only=0
9
+ opcache.revalidate_path=1
10
+ --SKIPIF--
11
+ <?php require_once ('skipif.inc ' ); ?>
12
+ --FILE--
13
+ <?php
14
+
15
+ file_put_contents (__DIR__ . "/bug74596_1.php " , <<<CODE
16
+ <?php
17
+ class A {
18
+ public function __construct() {
19
+ \$a = true;
20
+ if ( \$a) {
21
+ echo 1 + 2;
22
+ } else {
23
+ echo 2 + 3;
24
+ }
25
+ }
26
+ }
27
+ ?>
28
+ CODE
29
+ );
30
+
31
+ file_put_contents (__DIR__ . "/bug74596_2.php " , "ok \n" );
32
+
33
+ class ufilter extends php_user_filter
34
+ {
35
+ function filter ($ in , $ out , &$ consumed , $ closing )
36
+ {
37
+ include_once __DIR__ . "/bug74596_1.php " ;
38
+ while ($ bucket = stream_bucket_make_writeable ($ in )) {
39
+ stream_bucket_append ($ out , $ bucket );
40
+ }
41
+ return PSFS_PASS_ON ;
42
+ }
43
+ }
44
+
45
+ stream_filter_register ("ufilter " , "ufilter " );
46
+
47
+ include "php://filter/read=ufilter/resource= " . __DIR__ . "/bug74596_2.php " ;
48
+ ?>
49
+ --CLEAN--
50
+ <?php
51
+ unlink (__DIR__ . "/bug74596_1.php " );
52
+ unlink (__DIR__ . "/bug74596_2.php " );
53
+ ?>
54
+ --EXPECT--
55
+ ok
You can’t perform that action at this time.
0 commit comments