View Issue Details

IDProjectCategoryView StatusLast Update
0002180XdebugStep Debuggingpublic2023-07-14 09:14
ReporterErickSkrauch Assigned Toderick  
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.

Issue History

Date Modified Username Field Change
2023-05-15 15:10 ErickSkrauch New Issue
2023-05-15 15:10 ErickSkrauch Tag Attached: crash
2023-05-15 15:10 ErickSkrauch Tag Attached: PHPStorm
2023-05-15 15:10 ErickSkrauch Tag Attached: SIGSEGV
2023-05-15 15:10 ErickSkrauch Tag Attached: SPL
2023-05-15 15:10 ErickSkrauch Tag Attached: standard php library
2023-05-24 08:41 derick Summary SEGSEGV on extended SplFixedArray => Crash on extended SplFixedArray
2023-05-24 08:41 derick Note Added: 0006556
2023-05-24 08:41 derick Status new => confirmed
2023-05-24 08:41 derick Target Version => 3.2dev
2023-05-24 09:15 derick Assigned To => derick
2023-05-24 09:15 derick Status confirmed => closed
2023-05-24 09:15 derick Resolution open => fixed
2023-05-24 09:15 derick Fixed in Version => 3.2dev
2023-05-24 09:15 derick Note Added: 0006557
2023-07-14 09:14 derick Fixed in Version 3.2dev => 3.2.2