pmmp/PHP-Binaries

Opcache crashes with 0xC0000005 in loop extends

Opened this issue · 1 comments

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

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

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

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