Uploaded image for project: 'Mesos'
  1. Mesos
  2. MESOS-6616

Error: dereferencing type-punned pointer will break strict-aliasing rules.

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 1.1.0, 1.2.3, 1.3.1, 1.4.1
    • 1.4.2, 1.5.0
    • None
    • Fedora Rawhide;
      Debian 8.10 + gcc 5.5.0-6 with O2

    • Mesosphere Sprint 71
    • 3

    Description

      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<int> ns::clone(pid_t, int, const std::function<int()>&, 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
      

      Attachments

        Activity

          People

            alexr Alex R
            opoplawski Orion Poplawski
            Benjamin Bannier Benjamin Bannier
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: