|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #76536 PHP crashes with core dump when throwing exception in error handler
Submitted: 2018-06-27 09:36 UTC Modified: -
From: diacomltd at mail dot ru Assigned:
Status: Closed Package: Reproducible crash
PHP Version: 7.2.7 OS: Linux (different vesions)
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
Block user comment
Status: Assign to:
Bug Type:
From: diacomltd at mail dot ru
New email:
PHP Version: OS:


 [2018-06-27 09:36 UTC] diacomltd at mail dot ru
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();}


$r = new \ReflectionClass(SomeConstants::class);

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)


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2018-06-28 04:39 UTC]
Automatic comment on behalf of
Log: Fixed bug #76536 (PHP crashes with core dump when throwing exception in error handler). (Laruence)
 [2018-06-28 04:39 UTC]
-Status: Open +Status: Closed
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Wed Feb 28 14:01:28 2024 UTC