mirror of
https://github.com/php/php-src.git
synced 2025-08-15 21:48:51 +02:00

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.
16 lines
198 B
PHP
16 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===
|