You are viewing a plain text version of this content. The canonical link for it is here.
Posted to proton@qpid.apache.org by "ASF subversion and git services (JIRA)" <ji...@apache.org> on 2013/08/06 13:04:49 UTC
[jira] [Commented] (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:comment-tabpanel&focusedCommentId=13730650#comment-13730650 ]
ASF subversion and git services commented on PROTON-354:
--------------------------------------------------------
Commit 1510900 from rhs@apache.org in branch 'proton/trunk'
[ https://svn.apache.org/r1510900 ]
PROTON-354: compare trackers using sequence number arithmetic
> 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
> 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