axis-c-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Alex Mantaut (JIRA)" <>
Subject [jira] [Updated] (AXIS2C-1611) Seg fault if error on building conf
Date Sat, 10 Nov 2012 18:47:12 GMT


Alex Mantaut updated AXIS2C-1611:

    Attachment: axis2c_dep_engine_double_free.patch

Patch to solve the problem
> Seg fault if error on building conf
> -----------------------------------
>                 Key: AXIS2C-1611
>                 URL:
>             Project: Axis2-C
>          Issue Type: Bug
>          Components: core/engine
>    Affects Versions: 1.6.0
>         Environment: Linux
>            Reporter: Alex Mantaut
>              Labels: conf, core, dep_engine, patch
>             Fix For: 1.7.0
>         Attachments: axis2c_dep_engine_double_free.patch
>   Original Estimate: 0.5h
>  Remaining Estimate: 0.5h
> There is a segfault when an error ocurrs in creating conf.
> To reproduce the bug:
> - Install axis2c trunk, and compile samples
> - go to AXIS2C_HOME/lib and remove or move one of the libraries (cd $AXIS2C_HOME/lib
&&sudo mv
> - execute one of the samples (i.e. echo) it will segfault.
> Altough it is an error not beeing able to find an so, it should close gracefully, I think
that this segfault may arise under other circumstances which cause conf building to fail...
> Examining the issue with valgrind it seems that there is a double freeing of dep_engine.
> dep_engine has a reference to conf and conf has a reference to dep_engine, and when it
fails on creating conf, it deletes the conf (dep_engine.c:968) and when it exits the function
tries to delete dep_engine again, which causes the segfault.
> The proposed solution is to set the dep_engine ptr from conf to NULL before deleting
the conf.
> The proposed patch avoids the segfault, and doesn't leak memory in normal or error cases,
please let me know if it is OK.
> Also I attach the valgrind analysis for the segfault (version prior applying the patch)

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:

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message