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

APRCharsetEncoder is not thread safe

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 0.10.0
    • Fix Version/s: 0.10.0
    • Component/s: None
    • Labels:
      None
    • Environment:
      linux debian i686 SMP
      build with: ant -Dhas.wchar_t=0

      Description

      It looks like the way apr_xlate is used in APRCharsetEncoder is not thread safe.

      It is used when wchar_t is disabled and all LOG4CXX_LOCALE_ENCODING_* defines are set to 0. The bug disappears when wchar_t is enabled (WcstombsCharsetEncoder is used) or when LOG4CXX_LOCALE_ENCODING_UTF8 is set to 1 (TrivialCharsetEncoder is used).

      I did not investigate further since no wchar_t and LOG4CXX_LOCALE_ENCODING_UTF8 set to 1 fit my needs.

      Some links that might help if they are not too old (from google):

      http://svn.haxx.se/dev/archive-2002-11/0567.shtml
      http://comments.gmane.org/gmane.comp.apache.apr.devel/2480

      PS: the problem is still in SVN revision 517601.

      Regards,


      Arnaud.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                carnold@apache.org Curt Arnold
                Reporter:
                bozo Arnaud de Bossoreille de Ribou
              • Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: