You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@mesos.apache.org by Ben Mahler <be...@gmail.com> on 2012/12/07 19:06:28 UTC

Review Request: Fixed compilation issues on Ubuntu 10.04.

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

Review request for mesos, Benjamin Hindman and Vinod Kone.


Description
-------

The new proc code has issues compiling on Ubuntu 10.04 with gcc 4.4.3.

There is a known issue in this gcc version with false warnings of this type:
../../src/linux/proc.hpp: In member function ‘virtual void CgroupsCpusetTest_ManyCPUManyCpusets_Test::TestBody()’:
../../src/linux/proc.hpp:81: error: dereferencing pointer ‘<anonymous>’ does break strict-aliasing rules
../../src/linux/proc.hpp:86: error: dereferencing pointer ‘<anonymous>’ does break strict-aliasing rules
../../src/linux/proc.hpp:76: error: dereferencing pointer ‘<anonymous>’ does break strict-aliasing rules
/usr/include/c++/4.4/bits/stl_tree.h:175: note: initialized from here


Diffs
-----

  src/linux/proc.hpp 6c84a73ab1c4d6893390f96eae15422c21001328 
  src/tests/cgroups_isolation_tests.cpp 41d6ac9d6331bcfd1e57d403e13a1d27cd5d14bc 

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


Testing
-------

make check on Ubuntu 10.04


Thanks,

Ben Mahler


Re: Review Request: Fixed compilation issues on Ubuntu 10.04.

Posted by Ben Mahler <be...@gmail.com>.

> On Dec. 11, 2012, 11:26 p.m., Benjamin Hindman wrote:
> > It might be nice to add a comment explaining why you had to factor out the operators so somebody doesn't try and put them back inside the class.

I actually didn't need to factor it out, I ended up doing that originally in an effort to silence the warning but it was unrelated.
I kept is this way because I see that looks like the idiomatic way to to it in C++, if you prefer it to be in the class I can revert it.


> On Dec. 11, 2012, 11:26 p.m., Benjamin Hindman wrote:
> > src/tests/cgroups_isolation_tests.cpp, line 70
> > <https://reviews.apache.org/r/8415/diff/1/?file=235787#file235787line70>
> >
> >     Just curious, what was the warning?

See the review description. I ended up using binary search with commenting to find what line in this file triggers the warning in the proc code.


- Ben


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


On Dec. 7, 2012, 6:06 p.m., Ben Mahler wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/8415/
> -----------------------------------------------------------
> 
> (Updated Dec. 7, 2012, 6:06 p.m.)
> 
> 
> Review request for mesos, Benjamin Hindman and Vinod Kone.
> 
> 
> Description
> -------
> 
> The new proc code has issues compiling on Ubuntu 10.04 with gcc 4.4.3.
> 
> There is a known issue in this gcc version with false warnings of this type:
> ../../src/linux/proc.hpp: In member function ‘virtual void CgroupsCpusetTest_ManyCPUManyCpusets_Test::TestBody()’:
> ../../src/linux/proc.hpp:81: error: dereferencing pointer ‘<anonymous>’ does break strict-aliasing rules
> ../../src/linux/proc.hpp:86: error: dereferencing pointer ‘<anonymous>’ does break strict-aliasing rules
> ../../src/linux/proc.hpp:76: error: dereferencing pointer ‘<anonymous>’ does break strict-aliasing rules
> /usr/include/c++/4.4/bits/stl_tree.h:175: note: initialized from here
> 
> 
> Diffs
> -----
> 
>   src/linux/proc.hpp 6c84a73ab1c4d6893390f96eae15422c21001328 
>   src/tests/cgroups_isolation_tests.cpp 41d6ac9d6331bcfd1e57d403e13a1d27cd5d14bc 
> 
> Diff: https://reviews.apache.org/r/8415/diff/
> 
> 
> Testing
> -------
> 
> make check on Ubuntu 10.04
> 
> 
> Thanks,
> 
> Ben Mahler
> 
>


Re: Review Request: Fixed compilation issues on Ubuntu 10.04.

Posted by Benjamin Hindman <be...@berkeley.edu>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/8415/#review14326
-----------------------------------------------------------


It might be nice to add a comment explaining why you had to factor out the operators so somebody doesn't try and put them back inside the class.


src/linux/proc.hpp
<https://reviews.apache.org/r/8415/#comment30503>

    You lost the formatting from above (s/operator==/operator ==/).



src/linux/proc.hpp
<https://reviews.apache.org/r/8415/#comment30504>

    Ditto.



src/tests/cgroups_isolation_tests.cpp
<https://reviews.apache.org/r/8415/#comment30505>

    Just curious, what was the warning?


- Benjamin Hindman


On Dec. 7, 2012, 6:06 p.m., Ben Mahler wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/8415/
> -----------------------------------------------------------
> 
> (Updated Dec. 7, 2012, 6:06 p.m.)
> 
> 
> Review request for mesos, Benjamin Hindman and Vinod Kone.
> 
> 
> Description
> -------
> 
> The new proc code has issues compiling on Ubuntu 10.04 with gcc 4.4.3.
> 
> There is a known issue in this gcc version with false warnings of this type:
> ../../src/linux/proc.hpp: In member function ‘virtual void CgroupsCpusetTest_ManyCPUManyCpusets_Test::TestBody()’:
> ../../src/linux/proc.hpp:81: error: dereferencing pointer ‘<anonymous>’ does break strict-aliasing rules
> ../../src/linux/proc.hpp:86: error: dereferencing pointer ‘<anonymous>’ does break strict-aliasing rules
> ../../src/linux/proc.hpp:76: error: dereferencing pointer ‘<anonymous>’ does break strict-aliasing rules
> /usr/include/c++/4.4/bits/stl_tree.h:175: note: initialized from here
> 
> 
> Diffs
> -----
> 
>   src/linux/proc.hpp 6c84a73ab1c4d6893390f96eae15422c21001328 
>   src/tests/cgroups_isolation_tests.cpp 41d6ac9d6331bcfd1e57d403e13a1d27cd5d14bc 
> 
> Diff: https://reviews.apache.org/r/8415/diff/
> 
> 
> Testing
> -------
> 
> make check on Ubuntu 10.04
> 
> 
> Thanks,
> 
> Ben Mahler
> 
>


Re: Review Request: Fixed compilation issues on Ubuntu 10.04.

Posted by Ben Mahler <be...@gmail.com>.

> On Dec. 20, 2012, 5:38 p.m., Benjamin Hindman wrote:
> > So is the conclusion that the strict alias issue is a gcc 4.4.3 bug?

Yes, I had found other projects encountering this bug but didn't manage to find the actual issue in gcc's bug tracker.


- Ben


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


On Dec. 12, 2012, 6:51 p.m., Ben Mahler wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/8415/
> -----------------------------------------------------------
> 
> (Updated Dec. 12, 2012, 6:51 p.m.)
> 
> 
> Review request for mesos, Benjamin Hindman and Vinod Kone.
> 
> 
> Description
> -------
> 
> The new proc code has issues compiling on Ubuntu 10.04 with gcc 4.4.3.
> 
> There is a known issue in this gcc version with false warnings of this type:
> ../../src/linux/proc.hpp: In member function ‘virtual void CgroupsCpusetTest_ManyCPUManyCpusets_Test::TestBody()’:
> ../../src/linux/proc.hpp:81: error: dereferencing pointer ‘<anonymous>’ does break strict-aliasing rules
> ../../src/linux/proc.hpp:86: error: dereferencing pointer ‘<anonymous>’ does break strict-aliasing rules
> ../../src/linux/proc.hpp:76: error: dereferencing pointer ‘<anonymous>’ does break strict-aliasing rules
> /usr/include/c++/4.4/bits/stl_tree.h:175: note: initialized from here
> 
> 
> Diffs
> -----
> 
>   src/linux/proc.hpp 6c84a73ab1c4d6893390f96eae15422c21001328 
>   src/tests/cgroups_isolation_tests.cpp 41d6ac9d6331bcfd1e57d403e13a1d27cd5d14bc 
> 
> Diff: https://reviews.apache.org/r/8415/diff/
> 
> 
> Testing
> -------
> 
> make check on Ubuntu 10.04
> 
> 
> Thanks,
> 
> Ben Mahler
> 
>


Re: Review Request: Fixed compilation issues on Ubuntu 10.04.

Posted by Benjamin Hindman <be...@berkeley.edu>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/8415/#review14763
-----------------------------------------------------------

Ship it!


So is the conclusion that the strict alias issue is a gcc 4.4.3 bug?

- Benjamin Hindman


On Dec. 12, 2012, 6:51 p.m., Ben Mahler wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/8415/
> -----------------------------------------------------------
> 
> (Updated Dec. 12, 2012, 6:51 p.m.)
> 
> 
> Review request for mesos, Benjamin Hindman and Vinod Kone.
> 
> 
> Description
> -------
> 
> The new proc code has issues compiling on Ubuntu 10.04 with gcc 4.4.3.
> 
> There is a known issue in this gcc version with false warnings of this type:
> ../../src/linux/proc.hpp: In member function ‘virtual void CgroupsCpusetTest_ManyCPUManyCpusets_Test::TestBody()’:
> ../../src/linux/proc.hpp:81: error: dereferencing pointer ‘<anonymous>’ does break strict-aliasing rules
> ../../src/linux/proc.hpp:86: error: dereferencing pointer ‘<anonymous>’ does break strict-aliasing rules
> ../../src/linux/proc.hpp:76: error: dereferencing pointer ‘<anonymous>’ does break strict-aliasing rules
> /usr/include/c++/4.4/bits/stl_tree.h:175: note: initialized from here
> 
> 
> Diffs
> -----
> 
>   src/linux/proc.hpp 6c84a73ab1c4d6893390f96eae15422c21001328 
>   src/tests/cgroups_isolation_tests.cpp 41d6ac9d6331bcfd1e57d403e13a1d27cd5d14bc 
> 
> Diff: https://reviews.apache.org/r/8415/diff/
> 
> 
> Testing
> -------
> 
> make check on Ubuntu 10.04
> 
> 
> Thanks,
> 
> Ben Mahler
> 
>


Re: Review Request: Fixed compilation issues on Ubuntu 10.04.

Posted by Ben Mahler <be...@gmail.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/8415/
-----------------------------------------------------------

(Updated Dec. 12, 2012, 6:51 p.m.)


Review request for mesos, Benjamin Hindman and Vinod Kone.


Changes
-------

Syntax formatting from benh review.


Description
-------

The new proc code has issues compiling on Ubuntu 10.04 with gcc 4.4.3.

There is a known issue in this gcc version with false warnings of this type:
../../src/linux/proc.hpp: In member function ‘virtual void CgroupsCpusetTest_ManyCPUManyCpusets_Test::TestBody()’:
../../src/linux/proc.hpp:81: error: dereferencing pointer ‘<anonymous>’ does break strict-aliasing rules
../../src/linux/proc.hpp:86: error: dereferencing pointer ‘<anonymous>’ does break strict-aliasing rules
../../src/linux/proc.hpp:76: error: dereferencing pointer ‘<anonymous>’ does break strict-aliasing rules
/usr/include/c++/4.4/bits/stl_tree.h:175: note: initialized from here


Diffs (updated)
-----

  src/linux/proc.hpp 6c84a73ab1c4d6893390f96eae15422c21001328 
  src/tests/cgroups_isolation_tests.cpp 41d6ac9d6331bcfd1e57d403e13a1d27cd5d14bc 

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


Testing
-------

make check on Ubuntu 10.04


Thanks,

Ben Mahler