mirror of
https://github.com/php/php-src.git
synced 2024-09-23 10:57:26 +00:00
f2e8851245
Not NULLing the static_variables pointer for shadow methods during static var shutdown would be a way to avoid this leak, but unless there's evidence that inherited private methods with static vars are actually a common use-case, I don't think we should keep this kind of fragile edge-case optimization. Fixes OSS-Fuzz #17875.
17 lines
198 B
PHP
17 lines
198 B
PHP
--TEST--
|
|
Inheritance of private method with static variable
|
|
--FILE--
|
|
<?php
|
|
|
|
class A {
|
|
private function m() {
|
|
static $x;
|
|
}
|
|
}
|
|
class B extends A {}
|
|
|
|
?>
|
|
===DONE===
|
|
--EXPECT--
|
|
===DONE===
|