View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0001534XdebugUsage problems (Wrong Results)public2018-03-07 20:162018-03-15 11:11
Assigned Toderick 
PlatformOSOS Version
Product Version2.6.0 
Target Version2.6.1Fixed 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


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
Attached Files? file icon segfault.php [^] (232 bytes) 2018-03-07 20:16

- Relationships

-  Notes
derick (administrator)
2018-03-15 11:11

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

- 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

Copyright © 2000 - 2018 MantisBT Team
Powered by Mantis Bugtracker