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
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.
(description)
Block user comment
Status: Assign to:
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

Add a Patch

Pull Requests

Add a Pull Request

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-2024 The PHP Group
All rights reserved.
Last updated: Thu Mar 28 10:01:26 2024 UTC