Uploaded image for project: 'Log4cxx'
  1. Log4cxx
  2. LOGCXX-17

Use of non reentrant time functions

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 0.9.7
    • 0.10.0
    • None
    • None
    • 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

      Attachments

        Activity

          People

            carnold@apache.org Curt Arnold
            giorak Giora Kosoi
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: