You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Functional tests crash randomly with a segmentation fault on PHP 8.2 #899
The functional tests crash randomly with a segmentation fault (exit code 139) on PHP 8.2, in CI and locally, e.g. in #898 while preparing DeprecatedClassAliasesTest.
Valgrind shows a use-after-free in serialize(): during an outer serialize() the garbage collector destroys an object whose destructor calls serialize() again. The nested call resizes and frees the internal reference table of the outer call, which still uses it.
The destructor is TYPO3\CMS\Extbase\Reflection\ReflectionService::__destruct(), it writes the class schemata to the cache (VariableFrontend::set() → serialize()). Reflection services of earlier test instances are part of reference cycles and are collected at a random point during later tests.
Proposal (workaround in the tests):
A PHPUnit extension disables the automatic garbage collection and calls gc_collect_cycles() after the set up of each test and after each test, so the destructors never run inside another serialize().
The underlying problem (cache write with serialize() in a destructor, nested serialize() during garbage collection) is to be reported to TYPO3 and PHP separately.
Activity