php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #68273 Crash when throwing exception inside autoload
Submitted: 2014-10-21 01:04 UTC Modified: 2015-08-27 20:17 UTC
From: jesusthefrog at gmail dot com Assigned: nikic (profile)
Status: Closed Package: Reproducible crash
PHP Version: 5.4.34 OS: Linux 3.2.0-4-686-pae/Solaris 10
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: jesusthefrog at gmail dot com
New email:
PHP Version: OS:

 

 [2014-10-21 01:04 UTC] jesusthefrog at gmail dot com
Description:
------------
If a static function call on an as-yet-undefined class is made and the result is passed directly into a method on a different object (not $this) and the registered autoload function then throws an exception, a segfault results.

Test script:
---------------
http://pastebin.com/W6vHq4qt

Expected result:
----------------
An exception.

Actual result:
--------------
PHP 5.4.34 (cli) (built: Oct 20 2014 20:38:26)

Starting program: /usr/local/bin/php crash.php
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/i386-linux-gnu/libthread_db.so.1".

Program received signal SIGSEGV, Segmentation fault.
0x0830341f in gc_zval_possible_root (zv=zv@entry=0xb7c15ce4)
    at /var/tmp/php-5.4.34/Zend/zend_gc.c:143
143                     GC_ZOBJ_CHECK_POSSIBLE_ROOT(zv);

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2015-08-27 20:17 UTC] nikic@php.net
-Status: Open +Status: Closed -Assigned To: +Assigned To: nikic
 [2015-08-27 20:17 UTC] nikic@php.net
Looks like this was fixed in PHP 5.5: https://3v4l.org/AuFoT
 
PHP Copyright © 2001-2026 The PHP Group
All rights reserved.
Last updated: Wed Oct 07 12:00:02 2026 UTC