View Issue Details

IDProjectCategoryView StatusLast Update
0001968XdebugUncategorizedpublic2021-04-23 12:37
Reportervicreal Assigned Toderick  
PrioritynormalSeveritymajorReproducibilityalways
Status feedbackResolutionopen 
Platformphp-fpm 8.0.3OSDebianOS Version10.5
Product Version3.0.3 
Summary0001968: eval() with error code causes php to crash instead of throwing an exception
Descriptioneval() with error code causes php to crash instead of throwing an exception

Debian 10.5 (4.19.132-1 (2020-07-24) x86_64)
php-fpm 8.0.3
This program makes use of the Zend Scripting Language Engine:
Zend Engine v4.0.3, Copyright (c) Zend Technologies
    with Zend OPcache v8.0.3, Copyright (c), by Zend Technologies
    with Xdebug v3.0.3, Copyright (c) 2002-2021, by Derick Rethans

Steps To Reproduceeval('ttt();'); // Connection reset by peer => 502 Bad Gateway
echo 'OK';
exit(0);
Additional InformationExpected result: Throwing an exception with message "Call to undefined function ttt()".
Actual result: Connection reset by peer => 502 Bad Gateway.

Additional examples:
try {
    eval('ttt();');
    echo 'OK';
} catch (Error $e) {
    echo $e->getMessage(); // "Call to undefined function ttt()"
}
exit(0);

Actual result: "Call to undefined function ttt()".
Expected result: "Call to undefined function ttt()".

try {
   eval('ttt();');
   echo 'OK';
} catch (Error $e) {
   echo $e->getMessage();
   throw $e; // Connection reset by peer => 502 Bad Gateway
}
exit(0);

Actual result: Connection reset by peer => 502 Bad Gateway.
Expected result: Throwing an exception with message "Call to undefined function ttt()".

Conclusion: an exception is thrown, but if it is not caught, the php process crashes.
Tagscrash, eval, exception
Operating SystemDebian 10.5
PHP Version8.0.0-8.0.4

Activities

derick

2021-04-23 12:37

administrator   ~0005860

I've tried reproducing this, but I can not get it to fail or crash, or even generate memory warnings through valgrind.

It would be great if you could follow the instructions at https://xdebug.org/reporting-bugs (and especially the bit about "Crash Bugs") to see if you can come up with something that allows me to reproduce this.

Issue History

Date Modified Username Field Change
2021-04-22 11:07 vicreal New Issue
2021-04-22 11:07 vicreal Tag Attached: crash
2021-04-22 11:07 vicreal Tag Attached: eval
2021-04-22 11:07 vicreal Tag Attached: exception
2021-04-23 12:37 derick Assigned To => derick
2021-04-23 12:37 derick Status new => feedback
2021-04-23 12:37 derick Note Added: 0005860