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
View Add Comment Developer Edit
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please — but make sure to vote on the bug!
Your email address:
MUST BE VALID
Solve the problem:
26 - 5 = ?
Subscribe to this entry?

 
 [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-2022 The PHP Group
All rights reserved.
Last updated: Sat Jan 22 13:03:41 2022 UTC