Open DaisukeDaisuke opened 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
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
translator/Parameter.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:
Fatal error: Uncaught Error: Class "translator\NormalParameter" not found in C:\Users\Owner\Downloads\php\test\translator\Parameter.php:5 Stack trace:
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 ...
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:
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!";
namespace translator;
class Parameter extends \translator\NormalParameter{
}
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)
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