mirror of
https://github.com/php/php-src.git
synced 2025-08-16 05:58:45 +02:00

We destroy classes of dl()'ed modules in clean_module_classes(), during shutdown. Child classes of a module use structures of the parent class (such as inherited properties), which are destroyed earlier, so we have a use-after-free when destroying a child class. Here I destroy classes in reverse order, as it is done in zend_shutdown() for persistent classes. Fixes GH-17961 Fixes GH-15367
26 lines
434 B
PHP
26 lines
434 B
PHP
<?php
|
|
|
|
/**
|
|
* @generate-class-entries
|
|
* @undocumentable
|
|
*/
|
|
|
|
function dl_test_test1(): void {}
|
|
|
|
function dl_test_test2(string $str = ""): string {}
|
|
|
|
class DlTest {
|
|
public function test(string $str = ""): string {}
|
|
}
|
|
|
|
class DlTestSuperClass {
|
|
public int $a;
|
|
public function test(string $str = ""): string {}
|
|
}
|
|
|
|
class DlTestSubClass extends DlTestSuperClass {
|
|
}
|
|
|
|
/** @alias DlTestClassAlias */
|
|
class DlTestAliasedClass {
|
|
}
|