[ 
https://issues.apache.org/jira/browse/MESOS-9183?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16592304#comment-16592304
 ] 

Jie Yu commented on MESOS-9183:
-------------------------------

this is probably due to we convert everthing to 
`boost::icl::interval_bounds::static_right_open`, causing an overflow in this 
case.

> IntervalSet<uint16_t> up bound is one off
> -----------------------------------------
>
>                 Key: MESOS-9183
>                 URL: https://issues.apache.org/jira/browse/MESOS-9183
>             Project: Mesos
>          Issue Type: Bug
>          Components: stout
>            Reporter: Xudong Ni
>            Priority: Minor
>
> the unsigned int 16 range is [0, 65535]; if we tried to set this range, the 
> set will be "{}"
> Example code:
> {quote}IntervalSet<uint16_t> set;
> set += (Bound<uint16_t>::closed(0), Bound<uint16_t>::closed(65535));
> Results: "{}"; Expected: "[0, 65535]"
> {quote}
> If we decrease the up bound by 1 to 65534, it work normally.
> {quote}IntervalSet<uint16_t> set;
> set += (Bound<uint16_t>::closed(0), Bound<uint16_t>::closed(65534));
> Results: "[0, 65535)"; Expected: "[0, 65535)"
> {quote}
> It appears the the up bound is one off, since the inervalSet is template, 
> other type may have the same issue.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to