Use of lambda (create_function return) functions causes WSService to allocate 1.6 gigs of ram
---------------------------------------------------------------------------------------------
Key: WSFPHP-403
URL:
https://wso2.org/jira/browse/WSFPHP-403 Project: WSO2 WSF/PHP
Issue Type: Bug
Components: WSService
Affects Versions: 2.0.0
Environment: * Apache/2.2.8 (Ubuntu) PHP/5.2.9-0.dotdeb.2 with Suhosin-Patch
* with XCache v1.2.1, Copyright (c) 2005-2007, by mOo
* suhosin patch 0.9.7
* wso2-wsf-php-src-2.0.0 (compiled from source on ubuntu fresh from the tarball)
WSF Info:
Directive Local Value Master Value
wsf.attachment_cache_dir /tmp /tmp
wsf.enable_attachment_caching 1 1
wsf.home no value no value
wsf.log_level 4 4
wsf.log_path /tmp /tmp
wsf.rm_db_dir /tmp /tmp
Reporter: Aaron Stewart
Priority: High
Hey all,
I'm trying to wrap WSService in a drupal module for use in creating a soap endpoint available to applications. Ultimately I'm hoping this will extend the services module, but right now I'm running into an interesting scenario.
When I invoke the service as follows, it works fine:
function testme($foo) {
error_log('o hai');
}
$server = new WSService('operations' => array('testme' => 'testme'));
However, when I return the function name as defined by create_function, eg (code abridged fro readability):
function _wsf_soap_call_wrapper($method, $args) {
error_log("Got $method");
}
$arglist = array('foo');
$method = 'myfoo';
$function_name = create_function(implode(',', $arglist), 'return _wsf_soap_call_wrapper(\'' . $method . '\', func_get_args());');
$server = new WSService('operations' => array('testme' => $function_name));
I get this error:
Fatal error: Allowed memory size of 188743680 bytes exhausted (tried to allocate 1680204321 bytes) in /home/acs/develop/wsf_server/wsf_server.module on line 58
I'm wondering if there's an issue with the way that WSService is fetching the internal php function table.
The code above should do fine to reproduce the bug.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
https://wso2.org/jira/secure/Administrators.jspa-
For more information on JIRA, see:
http://www.atlassian.com/software/jira
_______________________________________________
Wsf-c-dev mailing list
Wsf-c-dev@...
https://wso2.org/cgi-bin/mailman/listinfo/wsf-c-dev