Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Opcache crashes with 0xC0000005 in loop extends #189

Open
DaisukeDaisuke opened this issue Jan 28, 2024 · 1 comment
Open

Opcache crashes with 0xC0000005 in loop extends #189

DaisukeDaisuke opened this issue Jan 28, 2024 · 1 comment

Comments

@DaisukeDaisuke
Copy link
Contributor

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
@dktapps
Copy link
Member

dktapps commented Jan 28, 2024

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants