You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@logging.apache.org by "Thorsten Schöning (Jira)" <lo...@logging.apache.org> on 2020/08/07 16:26:00 UTC

[jira] [Resolved] (LOGCXX-352) crash on program exit

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

Thorsten Schöning resolved LOGCXX-352.
--------------------------------------
    Resolution: Duplicate

> crash on program exit
> ---------------------
>
>                 Key: LOGCXX-352
>                 URL: https://issues.apache.org/jira/browse/LOGCXX-352
>             Project: Log4cxx
>          Issue Type: Bug
>          Components: Core
>    Affects Versions: 0.10.0
>         Environment: Linux with g++ 4.4.1
>            Reporter: Thorsten Zachmann
>            Assignee: Curt Arnold
>            Priority: Critical
>         Attachments: test.tgz
>
>
> I will attach a test program once I submitted the bug report.
> If it is compiled the like the following 
> g++ Foo.cpp log4cxxtest.cpp -llog4cxx -o crash
> it crashes. Here is the output of gdb:
> > gdb ./crash 
> (gdb) r       
> Starting program: /home/tz/develop/astaro/crash
> [Thread debugging using libthread_db enabled]  
> Foo(2) 0x616490                                
> 0 [0x7ffff7fcf750] DEBUG Foo null - Foo()      
> ~Foo(2) 0x616490
> Program received signal SIGSEGV, Segmentation fault.
> 0x00007ffff7dc9230 in vtable for log4cxx::helpers::ObjectPtrBase () from /usr/lib/liblog4cxx.so.10
> (gdb) bt
> #0  0x00007ffff7dc9230 in vtable for log4cxx::helpers::ObjectPtrBase () from /usr/lib/liblog4cxx.so.10
> #1  0x00007ffff7b19958 in log4cxx::Logger::isDebugEnabled() const () from /usr/lib/liblog4cxx.so.10
> #2  0x0000000000401a71 in Foo::~Foo() ()
> #3  0x0000000000402033 in std::auto_ptr<Foo>::~auto_ptr() ()
> #4  0x00007ffff6f1cc12 in __run_exit_handlers (status=0) at exit.c:78
> #5  *__GI_exit (status=0) at exit.c:100
> #6  0x00007ffff6f02ac4 in __libc_start_main (main=<value optimized out>, argc=<value optimized out>, ubp_av=<value optimized out>,
>         init=<value optimized out>, fini=<value optimized out>, rtld_fini=<value optimized out>, stack_end=0x7fffffffe298)
> at libc-start.c:252
> #7  0x0000000000401539 in _start () at ../sysdeps/x86_64/elf/start.S:113
> (gdb)
>  If the order is changed to the following
> > g++ log4cxxtest.cpp Foo.cpp -llog4cxx -o nocrash
> > ./nocrash
> Foo(2) 0xd86490
> 0 [0x7f7ad0061750] DEBUG Foo null - Foo()
> ~Foo(2) 0xd86490
> 0 [0x7f7ad0061750] DEBUG Foo null - ~Foo()
> all works without problems.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)