[wsf-c-dev] [jira] Resolved: (WSFRUBY-48) Segmentation fault reported in "wsf_util.c" at line 630

Dimuthu Gamage (JIRA) jira at wso2.org
Sun Jul 20 20:14:52 PDT 2008


     [ https://wso2.org/jira/browse/WSFRUBY-48?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Dimuthu Gamage resolved WSFRUBY-48.
-----------------------------------

      Assignee: Dimuthu Gamage  (was: Chintana Wilamuna)
    Resolution: Fixed

Applied the patch. Except I change the sizeof the log file to only 1024 and not to 4096 which I believe very rare in a file system.

> Segmentation fault reported in "wsf_util.c" at line 630
> -------------------------------------------------------
>
>                 Key: WSFRUBY-48
>                 URL: https://wso2.org/jira/browse/WSFRUBY-48
>             Project: WSO2 WSF/Ruby
>          Issue Type: Bug
>          Components: WSService
>    Affects Versions: 1.0.0
>         Environment: Linux, Fedora 7, x86_64, ruby 1.8.6 patch level 111
>            Reporter: pranav
>            Assignee: Dimuthu Gamage
>
> For problem description, please refer thread 'http://wso2.org/forum/thread/3193'.
> Solved the problem.
> Please find patch below -
> -------------------------------------------------------------
> diff -rc wso2-wsf-ruby-src-1.0.1/wsservice/wsf_util.c wso2-wsf-ruby-src-1.0.0/wsservice/wsf_util.c
> *** wso2-wsf-ruby-src-1.0.1/wsservice/wsf_util.c 2008-02-12 13:19:06.000000000 +0530
> --- wso2-wsf-ruby-src-1.0.0/wsservice/wsf_util.c 2007-12-21 16:59:18.000000000 +0530
> ***************
> *** 201,207 ****
>       axutil_allocator_t *allocator = NULL;
>       axutil_error_t *error = NULL;
>       axutil_log_t *log = NULL;
> !     axis2_char_t log_path[4096];
>       axutil_env_t *env = NULL;
>       axutil_thread_pool_t *thread_pool = NULL;
>       const axis2_char_t *LOG_NAME = "wsf_ruby_server.log";
> --- 201,207 ----
>       axutil_allocator_t *allocator = NULL;
>       axutil_error_t *error = NULL;
>       axutil_log_t *log = NULL;
> !     axis2_char_t log_path[250];
>       axutil_env_t *env = NULL;
>       axutil_thread_pool_t *thread_pool = NULL;
>       const axis2_char_t *LOG_NAME = "wsf_ruby_server.log";
> ***************
> *** 216,224 ****
>               (0 == strcmp (path_tolog, "")) ||
>               (0 == strcmp (path_tolog, ".")) ||
>               (0 == strcmp (path_tolog, "./")))) {
> !         snprintf (log_path, sizeof(log_path), "%s", LOG_NAME);
>       } else {
> !         snprintf (log_path, sizeof(log_path), "%s/%s", path_tolog, LOG_NAME);
>       }
>   
>       thread_pool = axutil_thread_pool_init (allocator);
> --- 216,224 ----
>               (0 == strcmp (path_tolog, "")) ||
>               (0 == strcmp (path_tolog, ".")) ||
>               (0 == strcmp (path_tolog, "./")))) {
> !         snprintf (log_path, 256, "%s", LOG_NAME);
>       } else {
> !         snprintf (log_path, 256, "%s/%s", path_tolog, LOG_NAME);
>       }
>   
>       thread_pool = axutil_thread_pool_init (allocator);
> ***************
> *** 620,631 ****
>   
>                     AXIS2_LOG_DEBUG (env->log, AXIS2_LOG_SI,
>                       "[wsf_service] ht mep not null, %s", op_name);
> !                   snprintf (operation, sizeof(operation), "%s", op_name);
>                     if(TYPE(ht_mep) == T_HASH)
>                     {
>                       mep_value = rb_hash_aref(ht_mep, ID2SYM(rb_intern(operation)));
>                     }
> !                   if(mep_value != Qnil)
>                     {
>                        mep = RSTRING(mep_value)->ptr;
>                        if (mep) {
> --- 620,631 ----
>   
>                     AXIS2_LOG_DEBUG (env->log, AXIS2_LOG_SI,
>                       "[wsf_service] ht mep not null, %s", op_name);
> !                   sprintf (operation, "%s", op_name);
>                     if(TYPE(ht_mep) == T_HASH)
>                     {
>                       mep_value = rb_hash_aref(ht_mep, ID2SYM(rb_intern(operation)));
>                     }
> !                   if(mep_value == Qnil)
>                     {
>                        mep = RSTRING(mep_value)->ptr;
>                        if (mep) 

-- 
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

        



More information about the Wsf-c-dev mailing list