php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #57336 using call_user_func when apd is enabled causes segfault
Submitted: 2006-11-01 20:59 UTC Modified: 2015-02-26 07:38 UTC
From: apinstein at mac dot com Assigned:
Status: Suspended Package: apd (PECL)
PHP Version: 5.1.6 OS: linux RHEL5
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 this is not your bug, you can add a comment by following this link.
If this is your bug, but you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: apinstein at mac dot com
New email:
PHP Version: OS:

 

 [2006-11-01 20:59 UTC] apinstein at mac dot com
Description:
------------
Use of call_user_func (or call_user_func_array) crashes if apd 
is enabled, when called function returns.

Reproduce code:
---------------
The following line crashes with apd enabled:

return call_user_func(array($this->peerName, 'doCount'), $this->criteria);

If I change the line to:

return eval("{$this->peerName}::doCount(\$this->criteria)");

It works.

-OR- 

If I disable the apd extension, it works.

Interestingly, it's not the CALL that causes the segfault. The called function executes. It is only when the called function RETURNS that the segfault occurs.

Expected result:
----------------
Should not crash...

Actual result:
--------------
segfault. this occurs on a production machine and I only have 
5.1.6 on the production machine, so I cannot give you a 
backtrace, sorry. Hopefully this can be easily reproduced.

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2015-02-26 07:38 UTC] krakjoe@php.net
-Status: Open +Status: Suspended
 [2015-02-26 07:38 UTC] krakjoe@php.net
APD hasn't had a release in 10 years, this means it's source code is way out of sync with modern PHP.

I'm going to mark this bug as suspended, the report can still be found if a maintainer for APD comes forward.

Sorry about the wait.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Fri Apr 26 03:01:32 2024 UTC