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
symfony-app dev: first boot segfaults in DeepClone::getHydrator (non-object receiver dispatched to RedisClusterNodeProxy::__call) #290
With the fix for #287/#288 applied (branch repro/reflection-param-defaults, cc15d276), examples/symfony-app in APP_ENV=dev still dies on its first boot with SIGSEGV (exit 139, nothing on stderr). It boots fine when var/ already exists from an earlier run. prod is unaffected.
Symfony\Component\Cache\Traits\RedisClusterNodeProxy::__call <- reads [x9-8], x9 = 0x7e66000000000000 (a tagged word, not an object)
__mir_vdisp_917
Symfony\Polyfill\DeepClone\DeepClone::getHydrator
DeepClone::reconstruct
DeepClone::deepclone_from_array
Symfony\Component\VarExporter\DeepCloner::clone / deepClone
FrameworkBundle\DependencyInjection\Compiler\ContainerBuilderDebugDumpPass::process
Compiler::compile -> ContainerBuilder::compile -> App\Kernel::initializeContainer -> Kernel::boot
getHydrator() takes the internal-class branch ($classReflector->isInternal() is true for prelude classes): foreach ($classReflector->getProperties() as $p) { $propertySetters[$p->name] = $p->setValue(...); }. A virtual dispatch on a non-object receiver lands in an unrelated class's __call.
Related
ReflectionProperty::setValue() on a property of a prelude class (Exception::$message, ::$code) throws "Cannot write property" #289: ReflectionProperty::setValue() on properties of prelude classes (Exception::$message) throws Cannot write property (the same hydration path). A small program that feeds Symfony\Polyfill\DeepClone\DeepClone::deepclone_to_array/deepclone_from_array an object graph holding new RuntimeException(), new ArrayObject([1]) and new DateTimeImmutable() fails with Uncaught ReflectionException: Cannot write property ts; Zend round-trips it.
Prelude Exception reports different properties than Zend (traceNames, traceLines, ...), ArrayObject and SplObjectStorage are not reflectable (Class "ArrayObject" does not exist via ReflectionClass).
Not reduced yet
No self-contained repro yet (the crash needs the polyfill and the container); the recipe above is deterministic. A first step would be to find which class getHydrator() is asked for at the crash (break in DeepClone::getHydrator, print the $class argument) and reproduce it with that class only.
Activity