You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@mesos.apache.org by Benjamin Bannier <be...@mesosphere.io> on 2016/01/05 09:23:58 UTC

Review Request 41878: Consistently used fixed width types.

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

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


Re: Review Request 41878: Consistently used fixed width types.

Posted by Till Toenshoff <to...@me.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/41878/#review112851
-----------------------------------------------------------

Ship it!


Ship It!

- Till Toenshoff


On Jan. 5, 2016, 8: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, 8: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
> 
>


Re: Review Request 41878: Consistently used fixed width types.

Posted by Benjamin Bannier <be...@mesosphere.io>.

> 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
> 
>


Re: Review Request 41878: Consistently used fixed width types.

Posted by Michael Park <mp...@apache.org>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/41878/#review113413
-----------------------------------------------------------

Ship it!



3rdparty/libprocess/3rdparty/stout/include/stout/duration.hpp (lines 403 - 404)
<https://reviews.apache.org/r/41878/#comment174040>

    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.


- Michael Park


On Jan. 5, 2016, 8: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, 8: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
> 
>


Re: Review Request 41878: Consistently used fixed width types.

Posted by Benjamin Bannier <be...@mesosphere.io>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/41878/
-----------------------------------------------------------

(Updated Jan. 12, 2016, 7:57 a.m.)


Review request for mesos, Michael Park and Jan Schlicht.


Changes
-------

Rebased.


Bugs: MESOS-4275
    https://issues.apache.org/jira/browse/MESOS-4275


Repository: mesos


Description (updated)
-------

Type long have 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.

Review: https://reviews.apache.org/r/41878


Diffs (updated)
-----

  3rdparty/libprocess/3rdparty/stout/include/stout/duration.hpp 40b22604ec4eb01f44a36624bababb9b59d16bdb 

Diff: https://reviews.apache.org/r/41878/diff/


Testing
-------

make check (OS X 10.10.5)


Thanks,

Benjamin Bannier


Re: Review Request 41878: Consistently used fixed width types.

Posted by Jan Schlicht <ja...@mesosphere.io>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/41878/#review112854
-----------------------------------------------------------

Ship it!


Ship It!

- Jan Schlicht


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
> 
>