Uploaded image for project: 'Qpid Proton'
  1. Qpid Proton
  2. PROTON-354

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

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • proton-0.4
    • proton-0.5
    • proton-j
    • 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.

      Attachments

        Activity

          People

            rhs Rafael H. Schloming
            sean506 Sean Gallagher
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: