View Issue Details

IDProjectCategoryView StatusLast Update
0001534XdebugUsage problems (Wrong Results)public2019-06-28 11:14
ReporterstherrienAssigned Toderick 
PrioritynormalSeverityblockReproducibilityalways
Status confirmedResolutionopen 
Product Version2.6.0 
Target Version2.8.0devFixed in Version 
Summary0001534: Segfault when exception thrown in a closure bound to class scope
DescriptionWhen an exception is thrown in a closure and that closure is bound to another object (bindTo()), the process fails with a segfault instead of the exception being thrown, but only if xdebug.collect_params > 0
Steps To Reproduce$ php -d xdebug.collect_params=1 segfault.php
Segmentation fault



Disabling xdebug.collect_params=0 throws the exception as expected.

$ php -d xdebug.collect_params=0 segfault.php

PHP Fatal error: Uncaught Exception: Exception thrown successfully in /home/steve/segfault.php:13
Stack trace:
#0 /home/steve/segfault.php(7): Closure->{closure}()
#1 /home/steve/segfault.php(14): bug->on(Object(Closure))
0000002 {main}
  thrown in /home/steve/segfault.php on line 13


The exception also is successfully thrown if line 6 (->bindTo($this)) is commented out.
Additional InformationPHP 7.2.3 (cli) (built: Mar 2 2018 12:41:10) ( NTS )
Copyright (c) 1997-2018 The PHP Group
Zend Engine v3.2.0, Copyright (c) 1998-2018 Zend Technologies
    with Xdebug v2.6.0, Copyright (c) 2002-2018, by Derick Rethans

(remi)

Replicated in an clean VM using the default settings and config.
TagsNo tags attached.
Operating SystemCentOS Linux 7.4
PHP Version7.2.0-7.2.4

Activities

stherrien

2018-03-07 20:16

reporter  

segfault.php (232 bytes)

derick

2018-03-15 11:11

administrator   ~0004618

This is very likely the same issue as 0001535, just a different symptom.

Xenos

2019-05-15 16:32

reporter   ~0005023

This is the same cause than 0001665 see pull request https://github.com/xdebug/xdebug/pull/473

Issue History

Date Modified Username Field Change
2018-03-07 20:16 stherrien New Issue
2018-03-07 20:16 stherrien File Added: segfault.php
2018-03-15 11:11 derick Note Added: 0004618
2018-03-15 11:11 derick Target Version => 2.6.1
2018-03-15 11:11 derick Assigned To => derick
2018-03-15 11:11 derick Status new => confirmed
2019-05-15 16:32 Xenos Note Added: 0005023
2019-06-28 11:14 derick Severity crash => block
2019-06-28 11:14 derick Target Version 2.6.1 => 2.8.0dev