[systemd-bugs] [Bug 63250] New: Skipping backwards with matches is subtly broken

bugzilla-daemon at freedesktop.org bugzilla-daemon at freedesktop.org
Mon Apr 8 01:21:17 PDT 2013


https://bugs.freedesktop.org/show_bug.cgi?id=63250

          Priority: high
            Bug ID: 63250
          Assignee: systemd-bugs at lists.freedesktop.org
           Summary: Skipping backwards with matches is subtly broken
        QA Contact: systemd-bugs at lists.freedesktop.org
          Severity: normal
    Classification: Unclassified
                OS: All
          Reporter: marius.vollmer at redhat.com
          Hardware: Other
            Status: NEW
           Version: unspecified
         Component: general
           Product: systemd

Created attachment 77577
  --> https://bugs.freedesktop.org/attachment.cgi?id=77577&action=edit
Fix typo.

I think it's just a typo, check the attached patch.

Sometimes, skipping backwards with a match that yields the empty set will not
return 0, but will successfully skip the requested number of items.  The next
call to sd_journal_next will then correctly return 0.

To reproduce, find two matches that are independently non-empty, but whose
intersection is empty, and then use them with "journalctl -n10" or similar.

For example:

  # journalctl PRIORITY=2
  <some output>
  # journalctl _PID=1
  <some other output>
  # journalctl PRIORITY=2 _PID=1
  <empty>

But

  # journalctl -n10 PRIORITY=2 _PID=1
  <one entry>

You might need to swap the match expressions:

  # journalctl -n10 _PID=1 PRIORITY=2

As mentioned, I think this is just a typo in next_for_match for the
DIRECTION_UP case.  The attached patch seems to fix all incorrect behavior that
I could find.

-- 
You are receiving this mail because:
You are the QA Contact for the bug.
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/systemd-bugs/attachments/20130408/48cf0135/attachment.html>


More information about the systemd-bugs mailing list