Log4cxx
  1. Log4cxx
  2. LOGCXX-17

Use of non reentrant time functions

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 0.9.7
    • Fix Version/s: 0.10.0
    • Component/s: None
    • Labels:
      None
    • Environment:
      SunOS BMachine 5.8 Generic_108528-27 sun4u sparc SUNW,Sun-Fire-V210

      Description

      When using %d for ConversionPattern the application crushes. this is caused by use of non reentrant time functions
      gmtime and localtime

      the solution is to replace these functions with gmtime_r and localtime_r for posix builds.

      struct tm tmResult;
      const tm * tm = ::gmtime_r(&time, &tmResult);

      i did it and it works fine.

      i am going to run some more tests on other sun machines and i hope i can help more in the future.

      Thanks for the great logging system
      Giora

        Activity

          People

          • Assignee:
            Curt Arnold
            Reporter:
            Giora Kosoi
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development