php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #63523 Calling nonexistent method via __call or __callStatic causes segmentation fault
Submitted: 2012-11-14 21:29 UTC Modified: 2012-11-14 23:58 UTC
From: lolbummer at gmail dot com Assigned:
Status: Not a bug Package: Reproducible crash
PHP Version: 5.4.8 OS: Mac OS X 10.8.2
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: lolbummer at gmail dot com
New email:
PHP Version: OS:

 

 [2012-11-14 21:29 UTC] lolbummer at gmail dot com
Description:
------------
When calling a nonexistent method from __call or __callStatic, PHP crashes with 
the message "Segmentation Fault: 11"

Replicable in both PHP 5.3.18 and 5.4.8.

Test script:
---------------
class SegFault{
    public function __call($m, $a){
        $this->hjkl();
    }
}

$obj = new SegFault();
$obj->asdf();

--OR--

class SegFault{
    public static function __callStatic($m, $a){
        self::hjkl();
    }
}

SegFault::asdf();

Expected result:
----------------
I'd imagine a memory exhaustion error or the likes.

Actual result:
--------------
Segmentation fault: 11

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2012-11-14 23:58 UTC] felipe@php.net
Thank you for taking the time to write to us, but this is not
a bug. Please double-check the documentation available at
http://www.php.net/manual/ and the instructions on how to report
a bug at http://bugs.php.net/how-to-report.php

This is a known problem caused by a call stack overflow.
 [2012-11-14 23:58 UTC] felipe@php.net
-Status: Open +Status: Not a bug
 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Sat Jul 05 01:01:35 2025 UTC