|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #45750 php -r segfault on "throw Exception()" when extended exception class exists
Submitted: 2008-08-08 01:05 UTC Modified: 2008-08-08 02:36 UTC
From: pmjones88 at gmail dot com Assigned:
Status: Not a bug Package: Reproducible crash
PHP Version: 5.2.6 OS: Mac OS X 10.5.4
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: pmjones88 at gmail dot com
New email:
PHP Version: OS:


 [2008-08-08 01:05 UTC] pmjones88 at gmail dot com
At the PHP command line, when running code using -r, the presence of an extended Exception class will cause a segmentation fault when any Exception is thrown.

Reproduce code:
# no segfault
php -r "throw new Exception();"

# segfault
php -r "class Foo extends Exception {} throw new Exception();"

Expected result:
I expect to see no segfault exit.

Actual result:
A segfault exit.


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2008-08-08 01:35 UTC]
Thank you for this bug report. To properly diagnose the problem, we
need a backtrace to see what is happening behind the scenes. To
find out how to generate a backtrace, please read for *NIX and for Win32

Once you have generated a backtrace, please submit it to this bug
report and change the status back to "Open". Thank you for helping
us make PHP better.

Works for me with 5.2 and 5.3, please provide a backtrace using a newer snapshot. And please make sure you have no Zend Extensions enabled.
 [2008-08-08 02:27 UTC] pmjones88 at gmail dot com
I was in error.  I was using 5.2.5., not 5.2.6.  The segfault does not occur in 5.2.6.  Sorry for the noise, guys.
PHP Copyright © 2001-2023 The PHP Group
All rights reserved.
Last updated: Mon Dec 04 02:01:27 2023 UTC