pmmp / PHP-Binaries

Compile scripts used to build PHP for PocketMine-MP on multiple platforms
117 stars 169 forks source link

Opcache crashes with 0xC0000005 in loop extends #189

Open DaisukeDaisuke opened 8 months ago

DaisukeDaisuke commented 8 months ago

the code below crashes the opcache I have. This code only crashes with binaries from this repository and cannot be reproduced with the binaries provided by the official (php.net). Anyway, it has no effect on pmmp, so I think you can safely ignore it

The following code:

main.php


<?php

use translator\NormalParameter;

spl_autoload_register(function($class){ var_dump(DIR."/".$class.".php"); if(!file_exists(DIR."/".$class.".php")){ return null; } require DIR."/".$class.".php"; });

echo "executed!\n";

new NormalParameter();

echo "not executed!";


> translator/NormalParameter.php
```php
<?php

namespace translator;

use translator\shift\Shift;
use translator\register\opValue;

class NormalParameter extends Parameter{
    public function __construct(private opValue $rd, private opValue $op1, private ?opValue $op2, private ?Shift $shift){

    }
}

translator/Parameter.php


<?php

namespace translator;

class Parameter extends \translator\NormalParameter{

}


A zip containing the code to reproduce this
[test.zip](https://github.com/php/php-src/files/14075014/test.zip)

Resulted in this output:

executed! string(64) "C:\Users\Owner\Downloads\php\test/translator\NormalParameter.php" string(58) "C:\Users\Owner\Downloads\php\test/translator\Parameter.php"

Process finished with exit code -1073741819 (0xC0000005)


But I expected this output instead:

executed! string(64) "C:\Users\Owner\Downloads\php\test/translator\NormalParameter.php" string(58) "C:\Users\Owner\Downloads\php\test/translator\Parameter.php"

Fatal error: Uncaught Error: Class "translator\NormalParameter" not found in C:\Users\Owner\Downloads\php\test\translator\Parameter.php:5 Stack trace:

0 C:\Users\Owner\Downloads\php\test\main.php(10): require()

1 C:\Users\Owner\Downloads\php\test\translator\NormalParameter.php(8): {closure}('translator\Para...')

2 C:\Users\Owner\Downloads\php\test\main.php(10): require('C:\Users\Owner\...')

3 C:\Users\Owner\Downloads\php\test\main.php(15): {closure}('translator\Norm...')

4 {main}

thrown in C:\Users\Owner\Downloads\php\test\translator\Parameter.php on line 5

Process finished with exit code 255

dktapps commented 8 months ago

I don't see any mention of opcache ...