View Issue Details

IDProjectCategoryView StatusLast Update
0001896XdebugUncategorizedpublic2020-11-27 16:58
Reporterserbancatalin18 Assigned To 
PrioritynormalSeveritycrashReproducibilityalways
Status closedResolutionfixed 
Product Version3.0.0 
Target Version3.0devFixed in Version3.0.1 
Summary0001896: Segfault with closures that are not created from user code
Description

gdb trace attached

The following script gives Segmentation fault.
Removing xdebug or running php -n returns ok.

$a = new \ReflectionClass(\stdClass::class);
$b = \Closure::fromCallable([$a, 'newInstanceWithoutConstructor']);
$c = $b();

Steps To Reproduce

Create a php file with
$a = new \ReflectionClass(\stdClass::class);
$b = \Closure::fromCallable([$a, 'newInstanceWithoutConstructor']);
$c = $b();

Run from cli

Additional Information

php -v
PHP 7.3.9 (cli) (built: Sep 12 2019 10:23:43) ( NTS )
Copyright (c) 1997-2018 The PHP Group
Zend Engine v3.3.9, Copyright (c) 1998-2018 Zend Technologies
with Zend OPcache v7.3.9, Copyright (c) 1999-2018, by Zend Technologies
with Xdebug v3.0.0, Copyright (c) 2002-2020, by Derick Rethans

cat /proc/version
Linux version 5.4.39-linuxkit (root@buildkitsandbox) (gcc version 9.2.0 (Alpine 9.2.0)) #1 SMP Fri May 8 23:03:06 UTC 2020

TagsNo tags attached.
Operating System
PHP Version7.3.5-7.3.9

Activities

derick

2020-11-27 16:58

administrator   ~0005552

https://github.com/xdebug/xdebug/pull/696

Fixed in GIT (master and xdebug_3_0) for xdebug 3.0.1