[
https://issues.apache.org/jira/browse/LOGCXX-345?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Thorsten Schöning resolved LOGCXX-345.
--------------------------------------
Resolution: Cannot Reproduce
Because we are trying to reduce the backlog of open issues, I'm closing this
one right now. The described environment in which the problem has been reported
originally is pretty outdated these days and things might have been fixed
already with a newer version of log4cxx and/or a new environment. If this
concrete problem is still relevant for someone, feel free to reopen and provide
the necessary details. Otherwise it's best to create a new issue describing the
new environment and problem.
> double free apr
> ---------------
>
> Key: LOGCXX-345
> URL: https://issues.apache.org/jira/browse/LOGCXX-345
> Project: Log4cxx
> Issue Type: Bug
> Affects Versions: 0.10.0
> Environment: linux kernel 2.6.9
> gcc 3.4.6
> Reporter: frank ling
> Assignee: Curt Arnold
> Priority: Major
>
> program:
> main:
> log4cxx::BasicConfigurator::configure();
> //log4cxx::LogManager::shutdown();// uncomment this ,no double free
> a.cpp:
> static log4cxx::LoggerPtr logger=log4cxx::Logger::getLogger("xxxx");
> use valgrind:
> ==27177== Invalid write of size 4
> ==27177== at 0x6F8754B: apr_pool_destroy (apr_pools.c:390)
> ==27177== by 0x6C35DDE:
> log4cxx::helpers::LocaleCharsetEncoder::~LocaleCharsetEncoder()
> (objectptr.h:100)
> ==27177== by 0x6C34DF4: __tcf_1 (objectptr.h:100)
> ==27177== by 0x38F3430C44: exit (in /lib64/tls/libc-2.3.4.so)
> ==27177== by 0x38F341C401: (below main) (in /lib64/tls/libc-2.3.4.so)
> ==27177== Address 0x729A3F0 is 8 bytes inside a block of size 192 free'd
> ==27177== at 0x490655D: free (vg_replace_malloc.c:235)
> ==27177== by 0x6F8764B: apr_pool_terminate (apr_pools.c:597)
> ==27177== by 0x6C2AE58:
> log4cxx::helpers::APRInitializer::~APRInitializer() (aprinitializer.cpp:45)
> ==27177== by 0x38F3430F2A: __cxa_finalize (in /lib64/tls/libc-2.3.4.so)
> ==27177== by 0x6C26692: (within /opt/FUDE-0.4/log/lib/liblog4cxx.so.10.0.0)
> ==27177== by 0x6CE43F0: (within /opt/FUDE-0.4/log/lib/liblog4cxx.so.10.0.0)
> ==27177== by 0x38F3430C44: exit (in /lib64/tls/libc-2.3.4.so)
> ==27177== by 0x38F341C401: (below main) (in /lib64/tls/libc-2.3.4.so)
> ==27177==
> gdb program
> b log4cxx::helpers::APRInitializer::~APRInitializer()
> b log4cxx::helpers::CharsetEncoder::getDefaultEncoder()
> first break getDefaultEncoder() ,second APRInitializer::~APRInitializer()
> but APRInitializer::~APRInitializer() call apr_pool_terminate ,
> so log4cxx::helpers::LocaleCharsetEncoder::~LocaleCharsetEncoder() call
> apr_pool_destroy error
--
This message was sent by Atlassian Jira
(v8.3.4#803005)