You are viewing a plain text version of this content. The canonical link for it is here.
Posted to proton@qpid.apache.org by "Rafael H. Schloming (JIRA)" <ji...@apache.org> on 2013/08/06 13:04:49 UTC

[jira] [Assigned] (PROTON-354) TrackerQueue window pointers could wrap. Increase numeric range or use modular arithmatic

     [ https://issues.apache.org/jira/browse/PROTON-354?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Rafael H. Schloming reassigned PROTON-354:
------------------------------------------

    Assignee: Rafael H. Schloming
    
> TrackerQueue window pointers could wrap. Increase numeric range or use modular arithmatic
> -----------------------------------------------------------------------------------------
>
>                 Key: PROTON-354
>                 URL: https://issues.apache.org/jira/browse/PROTON-354
>             Project: Qpid Proton
>          Issue Type: Bug
>          Components: proton-j
>    Affects Versions: 0.4
>         Environment: Windows / Eclipse Juno
>            Reporter: Sean Gallagher
>            Assignee: Rafael H. Schloming
>            Priority: Minor
>              Labels: Messenger
>
> 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.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira