[jira] [Commented] (MESOS-6616) Error: dereferencing type-punned pointer will break strict-aliasing rules.

2018-02-16 Thread Alexander Rukletsov (JIRA)

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

Alexander Rukletsov commented on MESOS-6616:


Back ported onto `1.4.x`:
{noformat}
commit dade7f5c68b54ebe18a50c619af1bb2ad49d4bd1
Author: Alexander Rukletsov 
AuthorDate: Fri Feb 16 17:02:16 2018 +0100
Commit: Alexander Rukletsov 
CommitDate: Fri Feb 16 17:13:45 2018 +0100

Fixed the type-punned pointer and strict aliasing issue.

Dereferencing a pointer cast from a different type of pointer
violates the so-called "strict aliasing" rule, which is undefined
behaviour and might lead to bugs when compiler optimizations are
enabled.

For more information on this topic, see
https://blog.regehr.org/archives/959
http://alas.matf.bg.ac.rs/manuals/lspe/snode=153.html

Review: https://reviews.apache.org/r/64686/
{noformat}

> Error: dereferencing type-punned pointer will break strict-aliasing rules.
> --
>
> Key: MESOS-6616
> URL: https://issues.apache.org/jira/browse/MESOS-6616
> Project: Mesos
>  Issue Type: Bug
>Affects Versions: 1.1.0, 1.2.3, 1.3.1, 1.4.1
> Environment: Fedora Rawhide;
> Debian 8.10 + gcc 5.5.0-6 with {{O2}}
>Reporter: Orion Poplawski
>Assignee: Alexander Rukletsov
>Priority: Major
>  Labels: compile-error, mesosphere
> Fix For: 1.4.2, 1.5.0
>
>
> Trying to update the mesos package to 1.1.0 in Fedora.  Getting:
> {noformat}
> libtool: compile:  g++ -DPACKAGE_NAME=\"mesos\" -DPACKAGE_TARNAME=\"mesos\" 
> -DPACKAGE_VERSION=\"1.1.0\" "-DPACKAGE_STRING=\"mesos 1.1.0\"" 
> -DPACKAGE_BUGREPORT=\"\" -DPACKAGE_URL=\"\" -DPACKAGE=\"mesos\" 
> -DVERSION=\"1.1.0\" -DSTDC_HEADERS=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 
> -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 
> -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1 -DHAVE_DLFCN_H=1 
> -DLT_OBJDIR=\".libs/\" -DHAVE_CXX11=1 -DHAVE_PTHREAD_PRIO_INHERIT=1 
> -DHAVE_PTHREAD=1 -DHAVE_LIBZ=1 -DHAVE_FTS_H=1 -DHAVE_APR_POOLS_H=1 
> -DHAVE_LIBAPR_1=1 -DHAVE_BOOST_VERSION_HPP=1 -DHAVE_LIBCURL=1 
> -DHAVE_ELFIO_ELFIO_HPP=1 -DHAVE_GLOG_LOGGING_H=1 -DHAVE_HTTP_PARSER_H=1 
> -DMESOS_HAS_JAVA=1 -DHAVE_LEVELDB_DB_H=1 -DHAVE_LIBNL_3=1 
> -DHAVE_LIBNL_ROUTE_3=1 -DHAVE_LIBNL_IDIAG_3=1 -DWITH_NETWORK_ISOLATOR=1 
> -DHAVE_GOOGLE_PROTOBUF_MESSAGE_H=1 -DHAVE_EV_H=1 -DHAVE_PICOJSON_H=1 
> -DHAVE_LIBSASL2=1 -DHAVE_SVN_VERSION_H=1 -DHAVE_LIBSVN_SUBR_1=1 
> -DHAVE_SVN_DELTA_H=1 -DHAVE_LIBSVN_DELTA_1=1 -DHAVE_LIBZ=1 
> -DHAVE_ZOOKEEPER_H=1 -DHAVE_PYTHON=\"2.7\" -DMESOS_HAS_PYTHON=1 -I. -Wall 
> -Werror -Wsign-compare -DLIBDIR=\"/usr/lib64\" 
> -DPKGLIBEXECDIR=\"/usr/libexec/mesos\" -DPKGDATADIR=\"/usr/share/mesos\" 
> -DPKGMODULEDIR=\"/usr/lib64/mesos/modules\" -I../include -I../include 
> -I../include/mesos -DPICOJSON_USE_INT64 -D__STDC_FORMAT_MACROS 
> -I../3rdparty/libprocess/include -I../3rdparty/nvml-352.79 
> -I../3rdparty/stout/include -DHAS_AUTHENTICATION=1 -Iyes/include 
> -I/usr/include/subversion-1 -Iyes/include -Iyes/include -Iyes/include/libnl3 
> -Iyes/include -I/ -Iyes/include -I/usr/include/apr-1 -I/usr/include/apr-1.0 
> -I/builddir/build/BUILD/mesos-1.1.0/libev-4.15/include -isystem yes/include 
> -Iyes/include -I/usr/src/gmock -I/usr/src/gmock/include -I/usr/src/gmock/src 
> -I/usr/src/gmock/gtest -I/usr/src/gmock/gtest/include 
> -I/usr/src/gmock/gtest/src -Iyes/include -Iyes/include -I/usr/include 
> -I/builddir/build/BUILD/mesos-1.1.0/libev4.15/include -Iyes/include 
> -I/usr/include -I/usr/include/zookeeper -pthread -O2 -g -pipe -Wall 
> -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -fexceptions 
> -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches 
> -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -m64 -mtune=generic 
> -DEV_CHILD_ENABLE=0 -I/builddir/build/BUILD/mesos-1.1.0/libev-4.15 
> -Wno-unused-local-typedefs -Wno-maybe-uninitialized -std=c++11 -c 
> health-check/health_checker.cpp  -fPIC -DPIC -o 
> health-check/.libs/libmesos_no_3rdparty_la-health_checker.o
> In file included from health-check/health_checker.cpp:51:0:
> ./linux/ns.hpp: In function 'Try ns::clone(pid_t, int, const 
> std::function&, int)':
> ./linux/ns.hpp:480:69: error: dereferencing type-punned pointer will break 
> strict-aliasing rules [-Werror=strict-aliasing]
>  pid_t pid = ((struct ucred*) CMSG_DATA(CMSG_FIRSTHDR(&message)))->pid;
>  ^~
> ./linux/ns.hpp: In lambda function:
> ./linux/ns.hpp:581:59: error: dereferencing type-punned pointer will break 
> strict-aliasing rules [-Werror=strict-aliasing]
>((struct ucred*) CMSG_DATA(CMSG_FIRSTHDR(&message)))->pid = ::getpid();
> 

[jira] [Commented] (MESOS-6616) Error: dereferencing type-punned pointer will break strict-aliasing rules.

2018-02-02 Thread Andrei Budnik (JIRA)

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

Andrei Budnik commented on MESOS-6616:
--

[~alexr] Can these patches be backported to 1.4.x?

> Error: dereferencing type-punned pointer will break strict-aliasing rules.
> --
>
> Key: MESOS-6616
> URL: https://issues.apache.org/jira/browse/MESOS-6616
> Project: Mesos
>  Issue Type: Bug
>Affects Versions: 1.1.0, 1.2.3, 1.3.1, 1.4.1
> Environment: Fedora Rawhide;
> Debian 8.10 + gcc 5.5.0-6 with {{O2}}
>Reporter: Orion Poplawski
>Assignee: Alexander Rukletsov
>Priority: Major
>  Labels: compile-error, mesosphere
> Fix For: 1.5.0
>
>
> Trying to update the mesos package to 1.1.0 in Fedora.  Getting:
> {noformat}
> libtool: compile:  g++ -DPACKAGE_NAME=\"mesos\" -DPACKAGE_TARNAME=\"mesos\" 
> -DPACKAGE_VERSION=\"1.1.0\" "-DPACKAGE_STRING=\"mesos 1.1.0\"" 
> -DPACKAGE_BUGREPORT=\"\" -DPACKAGE_URL=\"\" -DPACKAGE=\"mesos\" 
> -DVERSION=\"1.1.0\" -DSTDC_HEADERS=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 
> -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 
> -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1 -DHAVE_DLFCN_H=1 
> -DLT_OBJDIR=\".libs/\" -DHAVE_CXX11=1 -DHAVE_PTHREAD_PRIO_INHERIT=1 
> -DHAVE_PTHREAD=1 -DHAVE_LIBZ=1 -DHAVE_FTS_H=1 -DHAVE_APR_POOLS_H=1 
> -DHAVE_LIBAPR_1=1 -DHAVE_BOOST_VERSION_HPP=1 -DHAVE_LIBCURL=1 
> -DHAVE_ELFIO_ELFIO_HPP=1 -DHAVE_GLOG_LOGGING_H=1 -DHAVE_HTTP_PARSER_H=1 
> -DMESOS_HAS_JAVA=1 -DHAVE_LEVELDB_DB_H=1 -DHAVE_LIBNL_3=1 
> -DHAVE_LIBNL_ROUTE_3=1 -DHAVE_LIBNL_IDIAG_3=1 -DWITH_NETWORK_ISOLATOR=1 
> -DHAVE_GOOGLE_PROTOBUF_MESSAGE_H=1 -DHAVE_EV_H=1 -DHAVE_PICOJSON_H=1 
> -DHAVE_LIBSASL2=1 -DHAVE_SVN_VERSION_H=1 -DHAVE_LIBSVN_SUBR_1=1 
> -DHAVE_SVN_DELTA_H=1 -DHAVE_LIBSVN_DELTA_1=1 -DHAVE_LIBZ=1 
> -DHAVE_ZOOKEEPER_H=1 -DHAVE_PYTHON=\"2.7\" -DMESOS_HAS_PYTHON=1 -I. -Wall 
> -Werror -Wsign-compare -DLIBDIR=\"/usr/lib64\" 
> -DPKGLIBEXECDIR=\"/usr/libexec/mesos\" -DPKGDATADIR=\"/usr/share/mesos\" 
> -DPKGMODULEDIR=\"/usr/lib64/mesos/modules\" -I../include -I../include 
> -I../include/mesos -DPICOJSON_USE_INT64 -D__STDC_FORMAT_MACROS 
> -I../3rdparty/libprocess/include -I../3rdparty/nvml-352.79 
> -I../3rdparty/stout/include -DHAS_AUTHENTICATION=1 -Iyes/include 
> -I/usr/include/subversion-1 -Iyes/include -Iyes/include -Iyes/include/libnl3 
> -Iyes/include -I/ -Iyes/include -I/usr/include/apr-1 -I/usr/include/apr-1.0 
> -I/builddir/build/BUILD/mesos-1.1.0/libev-4.15/include -isystem yes/include 
> -Iyes/include -I/usr/src/gmock -I/usr/src/gmock/include -I/usr/src/gmock/src 
> -I/usr/src/gmock/gtest -I/usr/src/gmock/gtest/include 
> -I/usr/src/gmock/gtest/src -Iyes/include -Iyes/include -I/usr/include 
> -I/builddir/build/BUILD/mesos-1.1.0/libev4.15/include -Iyes/include 
> -I/usr/include -I/usr/include/zookeeper -pthread -O2 -g -pipe -Wall 
> -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -fexceptions 
> -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches 
> -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -m64 -mtune=generic 
> -DEV_CHILD_ENABLE=0 -I/builddir/build/BUILD/mesos-1.1.0/libev-4.15 
> -Wno-unused-local-typedefs -Wno-maybe-uninitialized -std=c++11 -c 
> health-check/health_checker.cpp  -fPIC -DPIC -o 
> health-check/.libs/libmesos_no_3rdparty_la-health_checker.o
> In file included from health-check/health_checker.cpp:51:0:
> ./linux/ns.hpp: In function 'Try ns::clone(pid_t, int, const 
> std::function&, int)':
> ./linux/ns.hpp:480:69: error: dereferencing type-punned pointer will break 
> strict-aliasing rules [-Werror=strict-aliasing]
>  pid_t pid = ((struct ucred*) CMSG_DATA(CMSG_FIRSTHDR(&message)))->pid;
>  ^~
> ./linux/ns.hpp: In lambda function:
> ./linux/ns.hpp:581:59: error: dereferencing type-punned pointer will break 
> strict-aliasing rules [-Werror=strict-aliasing]
>((struct ucred*) CMSG_DATA(CMSG_FIRSTHDR(&message)))->pid = ::getpid();
>^~
> ./linux/ns.hpp:582:59: error: dereferencing type-punned pointer will break 
> strict-aliasing rules [-Werror=strict-aliasing]
>((struct ucred*) CMSG_DATA(CMSG_FIRSTHDR(&message)))->uid = ::getuid();
>^~
> ./linux/ns.hpp:583:59: error: dereferencing type-punned pointer will break 
> strict-aliasing rules [-Werror=strict-aliasing]
>((struct ucred*) CMSG_DATA(CMSG_FIRSTHDR(&message)))->gid = ::getgid();
>^~
> cc1plus: all warnings being treated as errors
> make[2]: *** [Makefile:6655: 
> health-check/lib

[jira] [Commented] (MESOS-6616) error: dereferencing type-punned pointer will break strict-aliasing rules

2017-12-18 Thread Alexander Rukletsov (JIRA)

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

Alexander Rukletsov commented on MESOS-6616:


I'm able to reproduce it on Debian 8.10 + gcc 5.5.0-6 with {{O2}} enabled.
{noformat}
admin@ip-10-178-168-202:~/mesos/build$ gcc --version
gcc (Debian 5.5.0-6) 5.5.0 20171010
{noformat}
{noformat}
admin@ip-10-178-168-202:~/mesos/build$ lsb_release -a
No LSB modules are available.
Distributor ID: Debian
Description:Debian GNU/Linux 8.10 (jessie)
Release:8.10
Codename:   jessie
{noformat}
{noformat}
../configure --enable-libevent --enable-ssl --disable-java --enable-optimize 
--disable-silent-rules --enable-install-module-dependencies
{noformat}
The compile error is likely triggered via {{--enable-optimize}} which turns 
{{O2}} optimizations on.

It looks like certain versions of {{gcc}} mistakenly (?) assume that any 
dereferencing of a type-punned pointer violates strict-aliasing rules.

More about strict aliasing and type-punned pointers: 
https://blog.regehr.org/archives/959 and 
https://gcc.gnu.org/onlinedocs/gcc-4.6.0/gnat_ugn_unw/Optimization-and-Strict-Aliasing.html

> error: dereferencing type-punned pointer will break strict-aliasing rules
> -
>
> Key: MESOS-6616
> URL: https://issues.apache.org/jira/browse/MESOS-6616
> Project: Mesos
>  Issue Type: Bug
>Affects Versions: 1.1.0, 1.2.3, 1.3.1, 1.4.1
> Environment: Fedora Rawhide;
> Debian 8.10 + gcc 5.5.0-6 with {{O2}}
>Reporter: Orion Poplawski
>Assignee: Alexander Rukletsov
>  Labels: compile-error, mesosphere
>
> Trying to update the mesos package to 1.1.0 in Fedora.  Getting:
> {noformat}
> libtool: compile:  g++ -DPACKAGE_NAME=\"mesos\" -DPACKAGE_TARNAME=\"mesos\" 
> -DPACKAGE_VERSION=\"1.1.0\" "-DPACKAGE_STRING=\"mesos 1.1.0\"" 
> -DPACKAGE_BUGREPORT=\"\" -DPACKAGE_URL=\"\" -DPACKAGE=\"mesos\" 
> -DVERSION=\"1.1.0\" -DSTDC_HEADERS=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 
> -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 
> -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1 -DHAVE_DLFCN_H=1 
> -DLT_OBJDIR=\".libs/\" -DHAVE_CXX11=1 -DHAVE_PTHREAD_PRIO_INHERIT=1 
> -DHAVE_PTHREAD=1 -DHAVE_LIBZ=1 -DHAVE_FTS_H=1 -DHAVE_APR_POOLS_H=1 
> -DHAVE_LIBAPR_1=1 -DHAVE_BOOST_VERSION_HPP=1 -DHAVE_LIBCURL=1 
> -DHAVE_ELFIO_ELFIO_HPP=1 -DHAVE_GLOG_LOGGING_H=1 -DHAVE_HTTP_PARSER_H=1 
> -DMESOS_HAS_JAVA=1 -DHAVE_LEVELDB_DB_H=1 -DHAVE_LIBNL_3=1 
> -DHAVE_LIBNL_ROUTE_3=1 -DHAVE_LIBNL_IDIAG_3=1 -DWITH_NETWORK_ISOLATOR=1 
> -DHAVE_GOOGLE_PROTOBUF_MESSAGE_H=1 -DHAVE_EV_H=1 -DHAVE_PICOJSON_H=1 
> -DHAVE_LIBSASL2=1 -DHAVE_SVN_VERSION_H=1 -DHAVE_LIBSVN_SUBR_1=1 
> -DHAVE_SVN_DELTA_H=1 -DHAVE_LIBSVN_DELTA_1=1 -DHAVE_LIBZ=1 
> -DHAVE_ZOOKEEPER_H=1 -DHAVE_PYTHON=\"2.7\" -DMESOS_HAS_PYTHON=1 -I. -Wall 
> -Werror -Wsign-compare -DLIBDIR=\"/usr/lib64\" 
> -DPKGLIBEXECDIR=\"/usr/libexec/mesos\" -DPKGDATADIR=\"/usr/share/mesos\" 
> -DPKGMODULEDIR=\"/usr/lib64/mesos/modules\" -I../include -I../include 
> -I../include/mesos -DPICOJSON_USE_INT64 -D__STDC_FORMAT_MACROS 
> -I../3rdparty/libprocess/include -I../3rdparty/nvml-352.79 
> -I../3rdparty/stout/include -DHAS_AUTHENTICATION=1 -Iyes/include 
> -I/usr/include/subversion-1 -Iyes/include -Iyes/include -Iyes/include/libnl3 
> -Iyes/include -I/ -Iyes/include -I/usr/include/apr-1 -I/usr/include/apr-1.0 
> -I/builddir/build/BUILD/mesos-1.1.0/libev-4.15/include -isystem yes/include 
> -Iyes/include -I/usr/src/gmock -I/usr/src/gmock/include -I/usr/src/gmock/src 
> -I/usr/src/gmock/gtest -I/usr/src/gmock/gtest/include 
> -I/usr/src/gmock/gtest/src -Iyes/include -Iyes/include -I/usr/include 
> -I/builddir/build/BUILD/mesos-1.1.0/libev4.15/include -Iyes/include 
> -I/usr/include -I/usr/include/zookeeper -pthread -O2 -g -pipe -Wall 
> -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -fexceptions 
> -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches 
> -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -m64 -mtune=generic 
> -DEV_CHILD_ENABLE=0 -I/builddir/build/BUILD/mesos-1.1.0/libev-4.15 
> -Wno-unused-local-typedefs -Wno-maybe-uninitialized -std=c++11 -c 
> health-check/health_checker.cpp  -fPIC -DPIC -o 
> health-check/.libs/libmesos_no_3rdparty_la-health_checker.o
> In file included from health-check/health_checker.cpp:51:0:
> ./linux/ns.hpp: In function 'Try ns::clone(pid_t, int, const 
> std::function&, int)':
> ./linux/ns.hpp:480:69: error: dereferencing type-punned pointer will break 
> strict-aliasing rules [-Werror=strict-aliasing]
>  pid_t pid = ((struct ucred*) CMSG_DATA(CMSG_FIRSTHDR(&message)))->pid;
>  ^~
> ./linux/ns.hpp: In lambda function:
> ./linux/ns.hp

[jira] [Commented] (MESOS-6616) error: dereferencing type-punned pointer will break strict-aliasing rules

2017-12-18 Thread Alexander Rukletsov (JIRA)

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

Alexander Rukletsov commented on MESOS-6616:


I'm able to reproduce it on Debian 8.10 + gcc 5.5.0-6 with {{O2}} enabled.
{noformat}
admin@ip-10-178-168-202:~/mesos/build$ gcc --version
gcc (Debian 5.5.0-6) 5.5.0 20171010
{noformat}
{noformat}
admin@ip-10-178-168-202:~/mesos/build$ lsb_release -a
No LSB modules are available.
Distributor ID: Debian
Description:Debian GNU/Linux 8.10 (jessie)
Release:8.10
Codename:   jessie
{noformat}
{noformat}
../configure --enable-libevent --enable-ssl --disable-java --enable-optimize 
--disable-silent-rules --enable-install-module-dependencies
{noformat}
The compile error is likely triggered via {{--enable-optimize}} which turns 
{{O2}} optimizations on.

It looks like certain versions of {{gcc}} mistakenly (?) assume that any 
dereferencing of a type-punned pointer violates strict-aliasing rules.

More about strict aliasing and type-punned pointers: 
https://blog.regehr.org/archives/959 and 
https://gcc.gnu.org/onlinedocs/gcc-4.6.0/gnat_ugn_unw/Optimization-and-Strict-Aliasing.html

> error: dereferencing type-punned pointer will break strict-aliasing rules
> -
>
> Key: MESOS-6616
> URL: https://issues.apache.org/jira/browse/MESOS-6616
> Project: Mesos
>  Issue Type: Bug
>Affects Versions: 1.1.0, 1.2.3, 1.3.1, 1.4.1
> Environment: Fedora Rawhide;
> Debian 8.10 + gcc 5.5.0-6 with {{O2}}
>Reporter: Orion Poplawski
>Assignee: Alexander Rukletsov
>  Labels: compile-error, mesosphere
>
> Trying to update the mesos package to 1.1.0 in Fedora.  Getting:
> {noformat}
> libtool: compile:  g++ -DPACKAGE_NAME=\"mesos\" -DPACKAGE_TARNAME=\"mesos\" 
> -DPACKAGE_VERSION=\"1.1.0\" "-DPACKAGE_STRING=\"mesos 1.1.0\"" 
> -DPACKAGE_BUGREPORT=\"\" -DPACKAGE_URL=\"\" -DPACKAGE=\"mesos\" 
> -DVERSION=\"1.1.0\" -DSTDC_HEADERS=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 
> -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 
> -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1 -DHAVE_DLFCN_H=1 
> -DLT_OBJDIR=\".libs/\" -DHAVE_CXX11=1 -DHAVE_PTHREAD_PRIO_INHERIT=1 
> -DHAVE_PTHREAD=1 -DHAVE_LIBZ=1 -DHAVE_FTS_H=1 -DHAVE_APR_POOLS_H=1 
> -DHAVE_LIBAPR_1=1 -DHAVE_BOOST_VERSION_HPP=1 -DHAVE_LIBCURL=1 
> -DHAVE_ELFIO_ELFIO_HPP=1 -DHAVE_GLOG_LOGGING_H=1 -DHAVE_HTTP_PARSER_H=1 
> -DMESOS_HAS_JAVA=1 -DHAVE_LEVELDB_DB_H=1 -DHAVE_LIBNL_3=1 
> -DHAVE_LIBNL_ROUTE_3=1 -DHAVE_LIBNL_IDIAG_3=1 -DWITH_NETWORK_ISOLATOR=1 
> -DHAVE_GOOGLE_PROTOBUF_MESSAGE_H=1 -DHAVE_EV_H=1 -DHAVE_PICOJSON_H=1 
> -DHAVE_LIBSASL2=1 -DHAVE_SVN_VERSION_H=1 -DHAVE_LIBSVN_SUBR_1=1 
> -DHAVE_SVN_DELTA_H=1 -DHAVE_LIBSVN_DELTA_1=1 -DHAVE_LIBZ=1 
> -DHAVE_ZOOKEEPER_H=1 -DHAVE_PYTHON=\"2.7\" -DMESOS_HAS_PYTHON=1 -I. -Wall 
> -Werror -Wsign-compare -DLIBDIR=\"/usr/lib64\" 
> -DPKGLIBEXECDIR=\"/usr/libexec/mesos\" -DPKGDATADIR=\"/usr/share/mesos\" 
> -DPKGMODULEDIR=\"/usr/lib64/mesos/modules\" -I../include -I../include 
> -I../include/mesos -DPICOJSON_USE_INT64 -D__STDC_FORMAT_MACROS 
> -I../3rdparty/libprocess/include -I../3rdparty/nvml-352.79 
> -I../3rdparty/stout/include -DHAS_AUTHENTICATION=1 -Iyes/include 
> -I/usr/include/subversion-1 -Iyes/include -Iyes/include -Iyes/include/libnl3 
> -Iyes/include -I/ -Iyes/include -I/usr/include/apr-1 -I/usr/include/apr-1.0 
> -I/builddir/build/BUILD/mesos-1.1.0/libev-4.15/include -isystem yes/include 
> -Iyes/include -I/usr/src/gmock -I/usr/src/gmock/include -I/usr/src/gmock/src 
> -I/usr/src/gmock/gtest -I/usr/src/gmock/gtest/include 
> -I/usr/src/gmock/gtest/src -Iyes/include -Iyes/include -I/usr/include 
> -I/builddir/build/BUILD/mesos-1.1.0/libev4.15/include -Iyes/include 
> -I/usr/include -I/usr/include/zookeeper -pthread -O2 -g -pipe -Wall 
> -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -fexceptions 
> -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches 
> -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -m64 -mtune=generic 
> -DEV_CHILD_ENABLE=0 -I/builddir/build/BUILD/mesos-1.1.0/libev-4.15 
> -Wno-unused-local-typedefs -Wno-maybe-uninitialized -std=c++11 -c 
> health-check/health_checker.cpp  -fPIC -DPIC -o 
> health-check/.libs/libmesos_no_3rdparty_la-health_checker.o
> In file included from health-check/health_checker.cpp:51:0:
> ./linux/ns.hpp: In function 'Try ns::clone(pid_t, int, const 
> std::function&, int)':
> ./linux/ns.hpp:480:69: error: dereferencing type-punned pointer will break 
> strict-aliasing rules [-Werror=strict-aliasing]
>  pid_t pid = ((struct ucred*) CMSG_DATA(CMSG_FIRSTHDR(&message)))->pid;
>  ^~
> ./linux/ns.hpp: In lambda function:
> ./linux/ns.hp

[jira] [Commented] (MESOS-6616) error: dereferencing type-punned pointer will break strict-aliasing rules

2017-05-06 Thread toni (JIRA)

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

toni commented on MESOS-6616:
-

Same problem in Arch For Mesos 1.2:
{noformat} 
gcc -v
Usando especificaciones internas.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-pc-linux-gnu/6.3.1/lto-wrapper
Objetivo: x86_64-pc-linux-gnu
Configurado con: /build/gcc/src/gcc/configure --prefix=/usr --libdir=/usr/lib 
--libexecdir=/usr/lib --mandir=/usr/share/man --infodir=/usr/share/info 
--with-bugurl=https://bugs.archlinux.org/ 
--enable-languages=c,c++,ada,fortran,go,lto,objc,obj-c++ --enable-shared 
--enable-threads=posix --enable-libmpx --with-system-zlib --with-isl 
--enable-__cxa_atexit --disable-libunwind-exceptions --enable-clocale=gnu 
--disable-libstdcxx-pch --disable-libssp --enable-gnu-unique-object 
--enable-linker-build-id --enable-lto --enable-plugin 
--enable-install-libiberty --with-linker-hash-style=gnu 
--enable-gnu-indirect-function --disable-multilib --disable-werror 
--enable-checking=release
Modelo de hilos: posix
gcc versiĆ³n 6.3.1 20170306 (GCC) 
{/noformat} 


{noformat} 
mv -f checks/.deps/libmesos_no_3rdparty_la-checker.Tpo 
checks/.deps/libmesos_no_3rdparty_la-checker.Plo
/bin/sh ../libtool  --tag=CXX   --mode=compile g++ -DPACKAGE_NAME=\"mesos\" 
-DPACKAGE_TARNAME=\"mesos\" -DPACKAGE_VERSION=\"1.2.0\" 
-DPACKAGE_STRING=\"mesos\ 1.2.0\" -DPACKAGE_BUGREPORT=\"\" -DPACKAGE_URL=\"\" 
-DPACKAGE=\"mesos\" -DVERSION=\"1.2.0\" -DSTDC_HEADERS=1 -DHAVE_SYS_TYPES_H=1 
-DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 
-DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1 
-DHAVE_DLFCN_H=1 -DLT_OBJDIR=\".libs/\" -DHAVE_CXX11=1 
-DHAVE_PTHREAD_PRIO_INHERIT=1 -DHAVE_PTHREAD=1 -DHAVE_LIBZ=1 -DHAVE_FTS_H=1 
-DHAVE_APR_POOLS_H=1 -DHAVE_LIBAPR_1=1 -DHAVE_LIBCURL=1 -DMESOS_HAS_JAVA=1 
-DHAVE_LIBNL_3=1 -DHAVE_NETLINK_NETLINK_H=1 -DHAVE_LIBNL_ROUTE_3=1 
-DHAVE_NETLINK_ROUTE_LINK_VETH_H=1 -DHAVE_LIBNL_IDIAG_3=1 
-DWITH_NETWORK_ISOLATOR=1 -DHAVE_LIBSASL2=1 -DHAVE_SVN_VERSION_H=1 
-DHAVE_LIBSVN_SUBR_1=1 -DHAVE_SVN_DELTA_H=1 -DHAVE_LIBSVN_DELTA_1=1 
-DHAVE_LIBZ=1 -DHAVE_PYTHON=\"2.7\" -DMESOS_HAS_PYTHON=1 -I. -I../../src   
-Werror -DLIBDIR=\"/usr/lib\" -DPKGLIBEXECDIR=\"/usr/lib/mesos\" 
-DPKGDATADIR=\"/usr/share/mesos\" -DPKGMODULEDIR=\"/usr/lib/mesos/modules\" 
-I../../include -I../include -I../include/mesos -DPICOJSON_USE_INT64 
-D__STDC_FORMAT_MACROS -isystem ../3rdparty/boost-1.53.0 
-I../3rdparty/elfio-3.2 -I../3rdparty/glog-0.3.3/src 
-I../3rdparty/leveldb-1.4/include -I../../3rdparty/libprocess/include 
-I../3rdparty/nvml-352.79 -I../3rdparty/picojson-1.3.0 
-I../3rdparty/protobuf-2.6.1/src -I../../3rdparty/stout/include 
-I../3rdparty/zookeeper-3.4.8/src/c/include 
-I../3rdparty/zookeeper-3.4.8/src/c/generated -DHAS_AUTHENTICATION=1 
-I/usr/include/subversion-1 -I/usr/include/libnl3 -I/usr/include/apr-1 
-I/usr/include/apr-1.0 -D_FORTIFY_SOURCE=2 -pthread -Wall -Wsign-compare 
-Wformat-security -fstack-protector-strong -fPIC -fPIE -march=x86-64 
-mtune=generic -O2 -pipe -fstack-protector-strong -Wno-unused-local-typedefs 
-Wno-maybe-uninitialized -std=c++11 -MT 
checks/libmesos_no_3rdparty_la-health_checker.lo -MD -MP -MF 
checks/.deps/libmesos_no_3rdparty_la-health_checker.Tpo -c -o 
checks/libmesos_no_3rdparty_la-health_checker.lo `test -f 
'checks/health_checker.cpp' || echo '../../src/'`checks/health_checker.cpp
libtool: compile:  g++ -DPACKAGE_NAME=\"mesos\" -DPACKAGE_TARNAME=\"mesos\" 
-DPACKAGE_VERSION=\"1.2.0\" "-DPACKAGE_STRING=\"mesos 1.2.0\"" 
-DPACKAGE_BUGREPORT=\"\" -DPACKAGE_URL=\"\" -DPACKAGE=\"mesos\" 
-DVERSION=\"1.2.0\" -DSTDC_HEADERS=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 
-DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 
-DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1 -DHAVE_DLFCN_H=1 
-DLT_OBJDIR=\".libs/\" -DHAVE_CXX11=1 -DHAVE_PTHREAD_PRIO_INHERIT=1 
-DHAVE_PTHREAD=1 -DHAVE_LIBZ=1 -DHAVE_FTS_H=1 -DHAVE_APR_POOLS_H=1 
-DHAVE_LIBAPR_1=1 -DHAVE_LIBCURL=1 -DMESOS_HAS_JAVA=1 -DHAVE_LIBNL_3=1 
-DHAVE_NETLINK_NETLINK_H=1 -DHAVE_LIBNL_ROUTE_3=1 
-DHAVE_NETLINK_ROUTE_LINK_VETH_H=1 -DHAVE_LIBNL_IDIAG_3=1 
-DWITH_NETWORK_ISOLATOR=1 -DHAVE_LIBSASL2=1 -DHAVE_SVN_VERSION_H=1 
-DHAVE_LIBSVN_SUBR_1=1 -DHAVE_SVN_DELTA_H=1 -DHAVE_LIBSVN_DELTA_1=1 
-DHAVE_LIBZ=1 -DHAVE_PYTHON=\"2.7\" -DMESOS_HAS_PYTHON=1 -I. -I../../src 
-Werror -DLIBDIR=\"/usr/lib\" -DPKGLIBEXECDIR=\"/usr/lib/mesos\" 
-DPKGDATADIR=\"/usr/share/mesos\" -DPKGMODULEDIR=\"/usr/lib/mesos/modules\" 
-I../../include -I../include -I../include/mesos -DPICOJSON_USE_INT64 
-D__STDC_FORMAT_MACROS -isystem ../3rdparty/boost-1.53.0 
-I../3rdparty/elfio-3.2 -I../3rdparty/glog-0.3.3/src 
-I../3rdparty/leveldb-1.4/include -I../../3rdparty/libprocess/include 
-I../3rdparty/nvml-352.79 -I../3rdparty/picojson-1.3.0 
-I../3rdparty/protobuf-2.6.1/src -I../../3rdpa

[jira] [Commented] (MESOS-6616) error: dereferencing type-punned pointer will break strict-aliasing rules

2017-04-06 Thread Orion Poplawski (JIRA)

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

Orion Poplawski commented on MESOS-6616:


This was probably with gcc 6.2.1

> error: dereferencing type-punned pointer will break strict-aliasing rules
> -
>
> Key: MESOS-6616
> URL: https://issues.apache.org/jira/browse/MESOS-6616
> Project: Mesos
>  Issue Type: Bug
>Affects Versions: 1.1.0
> Environment: Fedora Rawhide
>Reporter: Orion Poplawski
>  Labels: compile-error
>
> Trying to update the mesos package to 1.1.0 in Fedora.  Getting:
> libtool: compile:  g++ -DPACKAGE_NAME=\"mesos\" -DPACKAGE_TARNAME=\"mesos\" 
> -DPACKAGE_VERSION=\"1.1.0\" "-DPACKAGE_STRING=\"mesos 1.1.0\"" 
> -DPACKAGE_BUGREPORT=\"\" -DPACKAGE_URL=\"\" -DPACKAGE=\"mesos\" 
> -DVERSION=\"1.1.0\" -DSTDC_HEADERS=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 
> -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 
> -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1 -DHAVE_DLFCN_H=1 
> -DLT_OBJDIR=\".libs/\" -DHAVE_CXX11=1 -DHAVE_PTHREAD_PRIO_INHERIT=1 
> -DHAVE_PTHREAD=1 -DHAVE_LIBZ=1 -DHAVE_FTS_H=1 -DHAVE_APR_POOLS_H=1 
> -DHAVE_LIBAPR_1=1 -DHAVE_BOOST_VERSION_HPP=1 -DHAVE_LIBCURL=1 
> -DHAVE_ELFIO_ELFIO_HPP=1 -DHAVE_GLOG_LOGGING_H=1 -DHAVE_HTTP_PARSER_H=1 
> -DMESOS_HAS_JAVA=1 -DHAVE_LEVELDB_DB_H=1 -DHAVE_LIBNL_3=1 
> -DHAVE_LIBNL_ROUTE_3=1 -DHAVE_LIBNL_IDIAG_3=1 -DWITH_NETWORK_ISOLATOR=1 
> -DHAVE_GOOGLE_PROTOBUF_MESSAGE_H=1 -DHAVE_EV_H=1 -DHAVE_PICOJSON_H=1 
> -DHAVE_LIBSASL2=1 -DHAVE_SVN_VERSION_H=1 -DHAVE_LIBSVN_SUBR_1=1 
> -DHAVE_SVN_DELTA_H=1 -DHAVE_LIBSVN_DELTA_1=1 -DHAVE_LIBZ=1 
> -DHAVE_ZOOKEEPER_H=1 -DHAVE_PYTHON=\"2.7\" -DMESOS_HAS_PYTHON=1 -I. -Wall 
> -Werror -Wsign-compare -DLIBDIR=\"/usr/lib64\" 
> -DPKGLIBEXECDIR=\"/usr/libexec/mesos\" -DPKGDATADIR=\"/usr/share/mesos\" 
> -DPKGMODULEDIR=\"/usr/lib64/mesos/modules\" -I../include -I../include 
> -I../include/mesos -DPICOJSON_USE_INT64 -D__STDC_FORMAT_MACROS 
> -I../3rdparty/libprocess/include -I../3rdparty/nvml-352.79 
> -I../3rdparty/stout/include -DHAS_AUTHENTICATION=1 -Iyes/include 
> -I/usr/include/subversion-1 -Iyes/include -Iyes/include -Iyes/include/libnl3 
> -Iyes/include -I/ -Iyes/include -I/usr/include/apr-1 -I/usr/include/apr-1.0 
> -I/builddir/build/BUILD/mesos-1.1.0/libev-4.15/include -isystem yes/include 
> -Iyes/include -I/usr/src/gmock -I/usr/src/gmock/include -I/usr/src/gmock/src 
> -I/usr/src/gmock/gtest -I/usr/src/gmock/gtest/include 
> -I/usr/src/gmock/gtest/src -Iyes/include -Iyes/include -I/usr/include 
> -I/builddir/build/BUILD/mesos-1.1.0/libev4.15/include -Iyes/include 
> -I/usr/include -I/usr/include/zookeeper -pthread -O2 -g -pipe -Wall 
> -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -fexceptions 
> -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches 
> -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -m64 -mtune=generic 
> -DEV_CHILD_ENABLE=0 -I/builddir/build/BUILD/mesos-1.1.0/libev-4.15 
> -Wno-unused-local-typedefs -Wno-maybe-uninitialized -std=c++11 -c 
> health-check/health_checker.cpp  -fPIC -DPIC -o 
> health-check/.libs/libmesos_no_3rdparty_la-health_checker.o
> In file included from health-check/health_checker.cpp:51:0:
> ./linux/ns.hpp: In function 'Try ns::clone(pid_t, int, const 
> std::function&, int)':
> ./linux/ns.hpp:480:69: error: dereferencing type-punned pointer will break 
> strict-aliasing rules [-Werror=strict-aliasing]
>  pid_t pid = ((struct ucred*) CMSG_DATA(CMSG_FIRSTHDR(&message)))->pid;
>  ^~
> ./linux/ns.hpp: In lambda function:
> ./linux/ns.hpp:581:59: error: dereferencing type-punned pointer will break 
> strict-aliasing rules [-Werror=strict-aliasing]
>((struct ucred*) CMSG_DATA(CMSG_FIRSTHDR(&message)))->pid = ::getpid();
>^~
> ./linux/ns.hpp:582:59: error: dereferencing type-punned pointer will break 
> strict-aliasing rules [-Werror=strict-aliasing]
>((struct ucred*) CMSG_DATA(CMSG_FIRSTHDR(&message)))->uid = ::getuid();
>^~
> ./linux/ns.hpp:583:59: error: dereferencing type-punned pointer will break 
> strict-aliasing rules [-Werror=strict-aliasing]
>((struct ucred*) CMSG_DATA(CMSG_FIRSTHDR(&message)))->gid = ::getgid();
>^~
> cc1plus: all warnings being treated as errors
> make[2]: *** [Makefile:6655: 
> health-check/libmesos_no_3rdparty_la-health_checker.lo] Error 1



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


[jira] [Commented] (MESOS-6616) error: dereferencing type-punned pointer will break strict-aliasing rules

2017-04-06 Thread Neil Conway (JIRA)

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

Neil Conway commented on MESOS-6616:


[~opoplawski] Interesting. What version of GCC is this?

> error: dereferencing type-punned pointer will break strict-aliasing rules
> -
>
> Key: MESOS-6616
> URL: https://issues.apache.org/jira/browse/MESOS-6616
> Project: Mesos
>  Issue Type: Bug
>Affects Versions: 1.1.0
> Environment: Fedora Rawhide
>Reporter: Orion Poplawski
>  Labels: compile-error
>
> Trying to update the mesos package to 1.1.0 in Fedora.  Getting:
> libtool: compile:  g++ -DPACKAGE_NAME=\"mesos\" -DPACKAGE_TARNAME=\"mesos\" 
> -DPACKAGE_VERSION=\"1.1.0\" "-DPACKAGE_STRING=\"mesos 1.1.0\"" 
> -DPACKAGE_BUGREPORT=\"\" -DPACKAGE_URL=\"\" -DPACKAGE=\"mesos\" 
> -DVERSION=\"1.1.0\" -DSTDC_HEADERS=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 
> -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 
> -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1 -DHAVE_DLFCN_H=1 
> -DLT_OBJDIR=\".libs/\" -DHAVE_CXX11=1 -DHAVE_PTHREAD_PRIO_INHERIT=1 
> -DHAVE_PTHREAD=1 -DHAVE_LIBZ=1 -DHAVE_FTS_H=1 -DHAVE_APR_POOLS_H=1 
> -DHAVE_LIBAPR_1=1 -DHAVE_BOOST_VERSION_HPP=1 -DHAVE_LIBCURL=1 
> -DHAVE_ELFIO_ELFIO_HPP=1 -DHAVE_GLOG_LOGGING_H=1 -DHAVE_HTTP_PARSER_H=1 
> -DMESOS_HAS_JAVA=1 -DHAVE_LEVELDB_DB_H=1 -DHAVE_LIBNL_3=1 
> -DHAVE_LIBNL_ROUTE_3=1 -DHAVE_LIBNL_IDIAG_3=1 -DWITH_NETWORK_ISOLATOR=1 
> -DHAVE_GOOGLE_PROTOBUF_MESSAGE_H=1 -DHAVE_EV_H=1 -DHAVE_PICOJSON_H=1 
> -DHAVE_LIBSASL2=1 -DHAVE_SVN_VERSION_H=1 -DHAVE_LIBSVN_SUBR_1=1 
> -DHAVE_SVN_DELTA_H=1 -DHAVE_LIBSVN_DELTA_1=1 -DHAVE_LIBZ=1 
> -DHAVE_ZOOKEEPER_H=1 -DHAVE_PYTHON=\"2.7\" -DMESOS_HAS_PYTHON=1 -I. -Wall 
> -Werror -Wsign-compare -DLIBDIR=\"/usr/lib64\" 
> -DPKGLIBEXECDIR=\"/usr/libexec/mesos\" -DPKGDATADIR=\"/usr/share/mesos\" 
> -DPKGMODULEDIR=\"/usr/lib64/mesos/modules\" -I../include -I../include 
> -I../include/mesos -DPICOJSON_USE_INT64 -D__STDC_FORMAT_MACROS 
> -I../3rdparty/libprocess/include -I../3rdparty/nvml-352.79 
> -I../3rdparty/stout/include -DHAS_AUTHENTICATION=1 -Iyes/include 
> -I/usr/include/subversion-1 -Iyes/include -Iyes/include -Iyes/include/libnl3 
> -Iyes/include -I/ -Iyes/include -I/usr/include/apr-1 -I/usr/include/apr-1.0 
> -I/builddir/build/BUILD/mesos-1.1.0/libev-4.15/include -isystem yes/include 
> -Iyes/include -I/usr/src/gmock -I/usr/src/gmock/include -I/usr/src/gmock/src 
> -I/usr/src/gmock/gtest -I/usr/src/gmock/gtest/include 
> -I/usr/src/gmock/gtest/src -Iyes/include -Iyes/include -I/usr/include 
> -I/builddir/build/BUILD/mesos-1.1.0/libev4.15/include -Iyes/include 
> -I/usr/include -I/usr/include/zookeeper -pthread -O2 -g -pipe -Wall 
> -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -fexceptions 
> -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches 
> -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -m64 -mtune=generic 
> -DEV_CHILD_ENABLE=0 -I/builddir/build/BUILD/mesos-1.1.0/libev-4.15 
> -Wno-unused-local-typedefs -Wno-maybe-uninitialized -std=c++11 -c 
> health-check/health_checker.cpp  -fPIC -DPIC -o 
> health-check/.libs/libmesos_no_3rdparty_la-health_checker.o
> In file included from health-check/health_checker.cpp:51:0:
> ./linux/ns.hpp: In function 'Try ns::clone(pid_t, int, const 
> std::function&, int)':
> ./linux/ns.hpp:480:69: error: dereferencing type-punned pointer will break 
> strict-aliasing rules [-Werror=strict-aliasing]
>  pid_t pid = ((struct ucred*) CMSG_DATA(CMSG_FIRSTHDR(&message)))->pid;
>  ^~
> ./linux/ns.hpp: In lambda function:
> ./linux/ns.hpp:581:59: error: dereferencing type-punned pointer will break 
> strict-aliasing rules [-Werror=strict-aliasing]
>((struct ucred*) CMSG_DATA(CMSG_FIRSTHDR(&message)))->pid = ::getpid();
>^~
> ./linux/ns.hpp:582:59: error: dereferencing type-punned pointer will break 
> strict-aliasing rules [-Werror=strict-aliasing]
>((struct ucred*) CMSG_DATA(CMSG_FIRSTHDR(&message)))->uid = ::getuid();
>^~
> ./linux/ns.hpp:583:59: error: dereferencing type-punned pointer will break 
> strict-aliasing rules [-Werror=strict-aliasing]
>((struct ucred*) CMSG_DATA(CMSG_FIRSTHDR(&message)))->gid = ::getgid();
>^~
> cc1plus: all warnings being treated as errors
> make[2]: *** [Makefile:6655: 
> health-check/libmesos_no_3rdparty_la-health_checker.lo] Error 1



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)