View Issue Details

IDProjectCategoryView StatusLast Update
0002180XdebugStep Debuggingpublic2023-07-14 09:14
ReporterErickSkrauch Assigned To 
PrioritynormalSeveritycrashReproducibilityalways
Status closedResolutionfixed 
PlatformARM64OSLinuxOS VersionArch Linux
Product Version3.2.1 
Target Version3.2devFixed in Version3.2.2 
Summary0002180: Crash on extended SplFixedArray
Description

I tried to debug the PHP-CS-Fixer. It uses Tokens class in its implementation which extends SplFixedArray. Debugger in PHPStorm hung on Collecting data and then the process crashed with SEGSEGV. I started trying to find the point at which the structure is created that breaks xdebug and found that it is the SplFixedArray::setSize(). Below I provide minimal code that reproduces the problem.

Steps To Reproduce

Try to debug this code:

<?php

class Foo extends SplFixedArray {}

$foo = new Foo();
$foo->setSize(7);

echo 123;

Additional Information

I was able to reproduce this problem on Linux PHP 8.1 (xdebug 3.1.6), Linux PHP 8.2 (xdebug 3.2.0), dockerized PHP 8.2 (xdebug 3.2.1) and on Mac PHP 8.1 (I don't remember version).

Tagscrash, PHPStorm, SIGSEGV, SPL, standard php library
Operating SystemArch Linux
PHP Version8.1.10-8.1.19

Activities

derick

2023-05-24 08:41

administrator   ~0006556

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

derick

2023-05-24 09:15

administrator   ~0006557

Thanks for the report! This is now fixed, for the next release: 3.2.2.