Bug #81021 [Opn->Csd]: Seg fault while calling closure from Reflection

From: Date: Sat, 08 May 2021 12:29:41 +0000
Subject: Bug #81021 [Opn->Csd]: Seg fault while calling closure from Reflection
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-233747@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=81021&edit=1 ID: 81021 User updated by: lukin dot andrej at gmail dot com Reported by: lukin dot andrej at gmail dot com Summary: Seg fault while calling closure from Reflection -Status: Open +Status: Closed Type: Bug Package: Reflection related Operating System: Mac OS 11.3.1 PHP Version: 8.0.6 Block user comment: N Private report: N New Comment: Reinstalling xdebug helped Previous Comments: ------------------------------------------------------------------------ [2021-05-08 12:29:08] lukin dot andrej at gmail dot com Reinstalling xdebug helped ------------------------------------------------------------------------ [2021-05-08 12:27:44] lukin dot andrej at gmail dot com It's happening only when xdebug extension is enabled zend_extension="xdebug.so" ------------------------------------------------------------------------ [2021-05-08 12:14:29] lukin dot andrej at gmail dot com Description: ------------ I'm receiving a seg. fault running the code below. The backtrace is not much informative for this call. (gdb) bt #0 0x00007fff207a5552 in ?? () #1 0x00007ffeefbfe530 in ?? () #2 0x00000001002b8d5c in ?? () #3 0x00007ffeefbfdc80 in ?? () #4 0x00007fff204d6797 in ?? () #5 0x000000000000002e in ?? () #6 0x0000000105f4ba50 in ?? () #7 0x0000000000000019 in ?? () #8 0x0000000105805680 in ?? () #9 0x0000000105f4ba50 in ?? () #10 0x0000000000000000 in ?? () Test script: --------------- class Test { private string $name; public function __construct(string $name) { $this->name = $name; } } $class = new ReflectionClass(Test::class); $instance = \Closure::fromCallable([$class, 'newInstanceWithoutConstructor']); $instance(); Actual result: -------------- (gdb) bt #0 0x00007fff207a5552 in ?? () #1 0x00007ffeefbfe530 in ?? () #2 0x00000001002b8d5c in ?? () #3 0x00007ffeefbfdc80 in ?? () #4 0x00007fff204d6797 in ?? () #5 0x000000000000002e in ?? () #6 0x0000000105f4ba50 in ?? () #7 0x0000000000000019 in ?? () #8 0x0000000105805680 in ?? () #9 0x0000000105f4ba50 in ?? () #10 0x0000000000000000 in ?? () ------------------------------------------------------------------------ -- Edit this bug report at https://bugs.php.net/bug.php?id=81021&edit=1

« previous php.bugs (#233747) next »