mesos-reviews mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Benjamin Bannier" <benjamin.bann...@mesosphere.io>
Subject Re: Review Request 41878: Consistently used fixed width types.
Date Fri, 08 Jan 2016 06:52:53 GMT


> On Jan. 8, 2016, 6:42 a.m., Michael Park wrote:
> > 3rdparty/libprocess/3rdparty/stout/include/stout/duration.hpp, lines 404-405
> > <https://reviews.apache.org/r/41878/diff/1/?file=1180733#file1180733line404>
> >
> >     Not yours, but can we actually fix the overflow issue here? We should rearrange
these conditions such that we don't end up doing `seconds * SECONDS` which can overflow.

Since `seconds` is a `double`, all calculations and comparisons are performed in `double`
as well. We might run into loss of precision, but not over- or underflows; even for `double`
infinities on the LHS the comparisons still work as intended.


- Benjamin


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/41878/#review113413
-----------------------------------------------------------


On Jan. 5, 2016, 9:23 a.m., Benjamin Bannier wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/41878/
> -----------------------------------------------------------
> 
> (Updated Jan. 5, 2016, 9:23 a.m.)
> 
> 
> Review request for mesos, Michael Park and Jan Schlicht.
> 
> 
> Bugs: MESOS-4275
>     https://issues.apache.org/jira/browse/MESOS-4275
> 
> 
> Repository: mesos
> 
> 
> Description
> -------
> 
> Type long has different widths under e.g., 32- and 64-bit
> architectures. Since we already use fixed width types internally in most
> places update these remaining uses.
> 
> 
> Diffs
> -----
> 
>   3rdparty/libprocess/3rdparty/stout/include/stout/duration.hpp dc610e697032f0d5d9c7a6524aeb34984041dec7

> 
> Diff: https://reviews.apache.org/r/41878/diff/
> 
> 
> Testing
> -------
> 
> make check (OS X 10.10.5)
> 
> 
> Thanks,
> 
> Benjamin Bannier
> 
>


Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message