You are viewing a plain text version of this content. The canonical link for it is here.
Posted to c-dev@axis.apache.org by "Samisa Abeysinghe (JIRA)" <ji...@apache.org> on 2006/01/19 09:34:42 UTC
[jira] Closed: (AXIS2C-19) There is something wrong in the ops hash
map in service
[ http://issues.apache.org/jira/browse/AXIS2C-19?page=all ]
Samisa Abeysinghe closed AXIS2C-19:
-----------------------------------
Resolution: Fixed
The problem was in the for loop.
for(hi2 = axis2_hash_first(ops, &env); hi2; axis2_hash_next(&env, hi2))
axis2_hash_next(&env, hi2) should be hi2 = axis2_hash_next(&env, hi2)
> There is something wrong in the ops hash map in service
> -------------------------------------------------------
>
> Key: AXIS2C-19
> URL: http://issues.apache.org/jira/browse/AXIS2C-19
> Project: Axis2-C
> Type: Bug
> Components: core/description
> Reporter: Samisa Abeysinghe
> Priority: Critical
> Fix For: M0.3
>
> The following piece of code crashes unexpectedly: Note that ops count is one, but it tries to read a second op.
> for (hi = axis2_hash_first (svc_map, &env);
> NULL != hi; hi = axis2_hash_next (&env, hi))
> {
> axis2_hash_t *ops= NULL;
> axis2_hash_this(hi, NULL, NULL, &service);
> ops = AXIS2_SVC_GET_OPS(((axis2_svc_t *)service), &env);
> if(ops)
> {
> printf("ops count = %d\n", axis2_hash_count(ops));
> axis2_hash_index_t *hi2 = NULL;
> void *op = NULL;
> axis2_char_t *oname = NULL;
> int count = 0;
> for(hi2 = axis2_hash_first(ops, &env); hi2; axis2_hash_next(&env, hi2))
> {
> printf ("count = %d \n", count++);
> if (!hi2)
> break;
> axis2_hash_this(hi2, NULL, NULL, &op);
> if (op)
> {
> axis2_qname_t *qname = NULL;
> qname = AXIS2_OP_GET_QNAME((axis2_op_t *)op, &env);
> oname = AXIS2_QNAME_GET_LOCALPART(qname, &env);
> printf("op name = %s\n", oname);
> }
> }
> }
> else
> printf("ops count = zero\n");
> }
> Output & gdb trace:
> message receiver loaded successfully
> stat:1
> No files in this directory:/home/samisa/axis2/c/deploy/modules/
> fname:libecho.so
> dep_engine:size:1
> type:0
> file_name:libecho.so
> svcs_xml:/home/samisa/axis2/c/deploy/services/services.xml
> root_element_name:service
> name*:libecho.so
> svc_name:echo
> message receiver loaded successfully
> svc_name:echo
> svc_grp_name:echo
> respos listner init status:1
> svc_map count = 1
> ops count = 1
> count = 0
> op name = echo
> count = 1
> Program received signal SIGSEGV, Segmentation fault.
> [Switching to Thread -1208227360 (LWP 8228)]
> 0x00d1b3f4 in axis2_hash_this (hi=0x869e510, key=0x0, klen=0x0, val=0xbf9db290) at hash.c:166
> 166 *val = (void *) hi->this->val;
> (gdb) bt
> #0 0x00d1b3f4 in axis2_hash_this (hi=0x869e510, key=0x0, klen=0x0, val=0xbf9db290) at hash.c:166
> #1 0x08048bab in axis2_test_dep_engine_load () at test_deployment.c:70
> #2 0x08048eed in main () at test_deployment.c:218
> (gdb)
> Note that ops count is one, but it tries to read a second op.
>
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira