Details
-
Bug
-
Status: Resolved
-
Major
-
Resolution: Fixed
-
0.10.0
-
None
-
None
-
SunOS 5.9
gcc-3.4.6
apr-1.2.8
apr-iconv-1.1.1
apr-util-1.2.8
Description
#include <log4cxx/logger.h>
using namespace log4cxx;
int main(int argn, char* argv[])
{
LoggerPtr logger;
return 0;
}
This code crash program.
Compile as "g++ foo.cpp -llog4cxx".
>./a.out
Segmentation Fault (core dumped)
gdb a.out core:
#0 0xfefedf8c in apr_atomic_xchg32 (mem=0x0, val=0) at atomic/unix/apr_atomic.c:349
349 atomic/unix/apr_atomic.c: No such file or directory.
in atomic/unix/apr_atomic.c
APR compiled by this gcc from sources.
Problem was found, when i have made daemon with fork() and exit(0). In this case LoggerPtr using as global object.