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 "Alex Mantaut (JIRA)" <ji...@apache.org> on 2013/03/28 20:29:17 UTC

[jira] [Updated] (AXIS2C-1629) some code maybe cause segment fault

     [ https://issues.apache.org/jira/browse/AXIS2C-1629?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Alex Mantaut updated AXIS2C-1629:
---------------------------------

    Attachment: axis2c_log_no_system_env.patch

Hi, you're right, it doesn't make any sense to use log when system_env doesn't exist, and in case of error this could make impossible to determinate the cause of error. 
Attached patch takes care of that, it shows the correct output to stderr (I think is the only valid thing to do because there is no log available)
By looking at the code it seems that it might be necessary to have a better mechanism for showing errors while the log is not available... (Perhaps another funct/macro in axutil_log) But for now this seems the easier way to fix the issue...
                
> some code maybe cause segment fault 
> ------------------------------------
>
>                 Key: AXIS2C-1629
>                 URL: https://issues.apache.org/jira/browse/AXIS2C-1629
>             Project: Axis2-C
>          Issue Type: Bug
>          Components: core/transport
>    Affects Versions: 1.6.0
>            Reporter: hailong
>            Priority: Minor
>         Attachments: axis2c_log_no_system_env.patch
>
>   Original Estimate: 5m
>  Remaining Estimate: 5m
>
> http_server_main.c
> line 276
> /**
>  * Signal handler
>  */
> void
> sig_handler(
>     int signal)
> {
>     if(!system_env)
>     {
>         AXIS2_LOG_ERROR(
>             system_env->log,
>             AXIS2_LOG_SI,
>             "Received signal %d, unable to proceed system_env is NULL ,\
>                          system exit with -1",
>             signal);
>         _exit(-1);
>     }
> //////////////////////////////////////////////////////////////////////////////////////////////////////////////
> if  system_env is null, then use system_env->log ?????
> Although it is generally not the case.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

---------------------------------------------------------------------
To unsubscribe, e-mail: c-dev-unsubscribe@axis.apache.org
For additional commands, e-mail: c-dev-help@axis.apache.org