php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #50703 Call parent::__construct in MySQL with call_user_func* segfault php
Submitted: 2010-01-08 23:19 UTC Modified: 2010-01-09 01:48 UTC
From: gmblar+php at gmail dot com Assigned:
Status: Closed Package: MySQLi related
PHP Version: 5.3.1 OS: *
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: gmblar+php at gmail dot com
New email:
PHP Version: OS:

 

 [2010-01-08 23:19 UTC] gmblar+php at gmail dot com
Description:
------------
Call parent::__construct in MySQL with call_user_func* segfault php

Reproduce code:
---------------
<?php

class Database_MySQLi extends MySQLi {

    public function __construct() {
        $arguments = func_get_args();
        call_user_func_array(array('parent', '__construct'), $arguments);
    }

}

$database = new Database_MySQLi('localhost', 'username', 'password');

?>

Expected result:
----------------
No Segmentation fault

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

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2010-01-09 00:36 UTC] bjori@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 an endless recursion to the Database_MySQLi constructor.
 [2010-01-09 01:48 UTC] bjori@php.net
This bug has been fixed in SVN.

Snapshots of the sources are packaged every three hours; this change
will be in the next snapshot. You can grab the snapshot at
http://snaps.php.net/.
 
Thank you for the report, and for helping us make PHP better.

This actually was a bug in 5.3.1, which is fixed in 5.3.3-dev.

Please try the latest 5.3 RC: http://qa.php.net/
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Fri Mar 29 15:01:28 2024 UTC