Log4cxx
  1. Log4cxx
  2. LOGCXX-217

Not initialized LoggerPtr segfault program.

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 0.10.0
    • Fix Version/s: 0.10.0
    • Component/s: None
    • Labels:
      None
    • Environment:
      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.

        Activity

        Samusenko Andre created issue -
        Samusenko Andre made changes -
        Field Original Value New Value
        Status Open [ 1 ] Resolved [ 5 ]
        Resolution Fixed [ 1 ]
        Fix Version/s 0.10.0 [ 10782 ]

          People

          • Assignee:
            Curt Arnold
            Reporter:
            Samusenko Andre
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development