mesos-reviews mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From James Peach <jpe...@apache.org>
Subject Re: Review Request 52647: Fix new sign comparison errors in libprocess produced by hardened flags
Date Thu, 27 Oct 2016 16:40:32 GMT


> On Oct. 18, 2016, 3:14 a.m., James Peach wrote:
> > 3rdparty/libprocess/src/tests/io_tests.cpp, line 284
> > <https://reviews.apache.org/r/52647/diff/3/?file=1538065#file1538065line284>
> >
> >     Can you just make ``length`` type ``ssize_t``?
> 
> Aaron Wood wrote:
>     `length` is `ssize_t` (set on line 235)
> 
> James Peach wrote:
>     Ok I see. It is bogus that ``length`` is ``ssize_t`` since ``io::read`` is returning
``Future<size_t>``. Just make ``length`` a ``size_t``.

Aaron and I discussed this. `length` needs to be `ssize_t` because it is the return from global
`::write`. This means that casting `length` to an unsigned type is the most expedient solution.
Alternatively, you could reuse `size` instead of `length`.


- James


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


On Oct. 21, 2016, 6:29 p.m., Aaron Wood wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/52647/
> -----------------------------------------------------------
> 
> (Updated Oct. 21, 2016, 6:29 p.m.)
> 
> 
> Review request for mesos, James Peach, Michael Park, and Neil Conway.
> 
> 
> Bugs: MESOS-6239
>     https://issues.apache.org/jira/browse/MESOS-6239
> 
> 
> Repository: mesos
> 
> 
> Description
> -------
> 
> The hardening flags produced many new sign comparison errors in libprocess that need
to be fixed for Mesos to compile/run.
> 
> 
> Diffs
> -----
> 
>   3rdparty/libprocess/src/decoder.hpp c79296b 
>   3rdparty/libprocess/src/encoder.hpp 005d1cc 
>   3rdparty/libprocess/src/process.cpp 18a8e20 
>   3rdparty/libprocess/src/tests/decoder_tests.cpp 4535614 
>   3rdparty/libprocess/src/tests/encoder_tests.cpp 9e57375 
>   3rdparty/libprocess/src/tests/http_tests.cpp 8d6c8c4 
>   3rdparty/libprocess/src/tests/io_tests.cpp b85c79f 
>   3rdparty/libprocess/src/tests/subprocess_tests.cpp c8350cf 
> 
> Diff: https://reviews.apache.org/r/52647/diff/
> 
> 
> Testing
> -------
> 
> Made sure compilation, tests, and benchmarks worked with both gcc and clang. Ran `make
&& make check && make bench`.
> 
> 
> Thanks,
> 
> Aaron Wood
> 
>


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