View Issue Details

IDProjectCategoryView StatusLast Update
0001968XdebugUncategorizedpublic2021-08-10 08:12
Reportervicreal Assigned Toderick  
PrioritynormalSeveritymajorReproducibilityalways
Status resolvedResolutionunable to reproduce 
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
Description

eval() 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 Reproduce

eval('ttt();'); // Connection reset by peer => 502 Bad Gateway
echo 'OK';
exit(0);

Additional Information

Expected 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.

derick

2021-05-24 15:59

administrator   ~0005891

Could you provide a reproducing case please, as is asked for in the instructions at https://xdebug.org/reporting-bugs ?

derick

2021-08-07 10:07

administrator   ~0005966

I can't reproduce this, and requested feedback was not given. Please reopen a new report with the requested information in case this is still an issue for you.

Zobo

2021-08-10 08:12

reporter   ~0005973

In all likelihood this is a duplicate of 1993.

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
2021-05-24 15:59 derick Note Added: 0005891
2021-08-07 10:07 derick Status feedback => resolved
2021-08-07 10:07 derick Resolution open => unable to reproduce
2021-08-07 10:07 derick Note Added: 0005966
2021-08-10 08:12 Zobo Note Added: 0005973