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

        Sean Gallagher created issue -
        Rafael H. Schloming made changes -
        Field Original Value New Value
        Assignee Rafael H. Schloming [ rhs ]
        Rafael H. Schloming made changes -
        Status Open [ 1 ] Resolved [ 5 ]
        Fix Version/s 0.5 [ 12324004 ]
        Resolution Fixed [ 1 ]

          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