logging-log4cxx-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Fabian Jacquet <fabian.jacq...@gmail.com>
Subject Async appender and const char *
Date Tue, 05 Oct 2010 08:49:40 GMT
Hi all,

We detected a problem if we use a dynamic DLL using Log4cxx on Windows.
We use AsyncAppenders and we have a lot of DLL dynamically loaded.

LocationInfo::fileName and methodName are const char* but it's possible that
the AsyncAppender use those variables after the unload of the DLL which
added the message. So the char* redirect to a deleted memory.
The application crash after the unload of the dll if the AsyncAppender is a
bit slow.

To fix this problem we replaced the type of those two variables to
std::string. So we have a copy.

But we don't know if this is the best solution.

Mime
View raw message