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

XMLLayoutTestCase uses inadequate filters for 64 bit platforms

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 0.10.0
    • Fix Version/s: 0.10.0
    • Component/s: Build
    • Labels:
      None
    • Environment:
      Debian GNU/Linux AMD64

      Description

      The XMLLayoutTestCase uses two filters to filter the resulting output for variable data: The XMLTimestampFilter uses Filter("[0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9]", "XXX") to remove time stamps, the XMLThreadFilter uses Filter("0x[0-9A-Fa-f]", "main") to remove thread IDs.
      On 64 bit platforms, the thread id can be long enough that the XMLTimestampFilter matches it, if it contains only numerical digits. This ends up with output like

      <log4j:event logger="org.apache.log4j.xml.XMLLayoutTestCase$X" timestamp="XXX" level="INFO" thread="mainXXX">

      ( 'thread="0x2b1269016940"' is first replaced with 'thread="0x2bXXX"' which is then replaced with 'thread="mainXXX"').

      This makes the test case fail sometimes.

        Attachments

          Activity

            People

            • Assignee:
              andreas Andreas Fester
              Reporter:
              andreas Andreas Fester
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: