Re: Static destruction fiasco?
2011-03-01 06:10:54 GMT
On Feb 27, 2011, at 1:25 PM, Rhys Ulerich wrote:
> Hi,
>
> I've noticed that this little test program segfaults beautifully under 0.10
>
> #include <log4cxx/logger.h>
>
> log4cxx::LoggerPtr logger;
>
> int main()
> {
> logger = log4cxx::Logger::getLogger("someName");
> LOG4CXX_WARN(logger, "Stuffstuffstuff");
> // logger = 0;
> return 0;
> }
>
> but if I uncomment the "logger = 0" statement it runs just fine. Presumably
> that's because "logger = 0" forces the ObjectPtrT instance behind LoggerPtr to
> destruct logger before other static destruction occurs.
>
> That said, which of
> 1) Bug
> 2) Don't do that
> does that segfault fall into?
>
> Thanks,
> Rhys
(Continue reading)
RSS Feed