|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2018-06-28 04:39 UTC] laruence@php.net
[2018-06-28 04:39 UTC] laruence@php.net
-Status: Open
+Status: Closed
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Thu Oct 30 22:00:01 2025 UTC |
Description: ------------ PHP crashes with core dump when throwing exception in error handler. The bug reproduces with PHP starting from version 7.1, but not before. Checked under different Linux versions Came into it when using PHP introspection functions on class with incorrect constants declaration. Don't know if the bug relates to this specific mistake or not. Test script: --------------- class SomeConstants {const SOME_CONSTANT = SOME_NONSENSE;} function handleError() {throw new ErrorException();} set_error_handler('handleError'); set_exception_handler('handleError'); $r = new \ReflectionClass(SomeConstants::class); $r->getConstants(); Expected result: ---------------- Fatal error: Uncaught exception 'ErrorException' in /code/1.php:10 Stack trace: #0 [internal function]: handleError(Object(ErrorException)) #1 {main} thrown in /code/1.php on line 10 Actual result: -------------- Segmentation fault (core dumped)