php.net |  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 Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
If you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: pmjones88 at gmail dot com
New email:
PHP Version: OS:

 

 [2008-08-08 01:05 UTC] pmjones88 at gmail dot com
Description:
------------
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.

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2008-08-08 01:35 UTC] johannes@php.net
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
http://bugs.php.net/bugs-generating-backtrace.php for *NIX and
http://bugs.php.net/bugs-generating-backtrace-win32.php 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-2024 The PHP Group
All rights reserved.
Last updated: Sat Oct 12 12:01:27 2024 UTC