Qpid Proton
  1. Qpid Proton
  2. PROTON-354

TrackerQueue window pointers could wrap. Increase numeric range or use modular arithmatic

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: 0.4
    • Fix Version/s: 0.5
    • Component/s: proton-j
    • Labels:
    • Environment:
      Windows / Eclipse Juno

      Description

      TrackerQueue uses "int" data type for numbering deliveries and managing the window size.
      tests are not coded for circular arithmetic so weirdness will start after 2^31 deliveries.
      Quick fix is to make these labels long.
      Slightly less quick fix is to use circular arithmetic.
      in getDelivery()
      if (seq < _lwm || seq > _hwm) return null;
      change to
      if (((seq - _lwm) < 0) || ((seq - _hwm) > 0)) return null;

      in apply()
      if (seq < _lwm || seq > _hwm) return;
      change as above.

        Activity

        Hide
        ASF subversion and git services added a comment -

        Commit 1510900 from rhs@apache.org in branch 'proton/trunk'
        [ https://svn.apache.org/r1510900 ]

        PROTON-354: compare trackers using sequence number arithmetic

        Show
        ASF subversion and git services added a comment - Commit 1510900 from rhs@apache.org in branch 'proton/trunk' [ https://svn.apache.org/r1510900 ] PROTON-354 : compare trackers using sequence number arithmetic

          People

          • Assignee:
            Rafael H. Schloming
            Reporter:
            Sean Gallagher
          • Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development