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

XMLLayoutTestCase uses inadequate filters for 64 bit platforms

Attach filesAttach ScreenshotVotersWatch issueWatchersCreate sub-taskLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

Details

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

          This comment will be Viewable by All Users Viewable by All Users
          Cancel

          People

            andreas Andreas Hartmann
            andreas Andreas Hartmann
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Slack

                Issue deployment