[bind10-dev] failed build master bef01123fb5dfaee927bc58da465109240811a18

JINMEI Tatuya / 神明達哉 jinmei at isc.org
Mon Dec 31 16:04:36 UTC 2012


At Mon, 31 Dec 2012 16:04:49 +0530,
Mukund Sivaraman <muks at isc.org> wrote:

> On Mon, Dec 31, 2012 at 04:55:01AM +0000, tester at isc.org wrote:
> > http://git.bind10.isc.org/~tester/builder//BIND10/20121231043503-Debian6Linux-i686-GCC/logs/build.out
> 
> This needs some discussion. Compile fails on Debian i686 buildbot:
> 
> libtool: compile:  g++ -DHAVE_CONFIG_H -I. -I../../.. -I../../../src/lib
> -I../../../src/lib -I../../../src/lib/dns -I../../../src/lib/dns
> -I../../../src/lib/util -I../../../src/lib/util -DOS_LINUX
> -I../../../ext/asio -I../../../ext/coroutine -DASIO_DISABLE_THREADS=1
> -Wall -Wextra -Wwrite-strings -Woverloaded-virtual -Wno-sign-compare
> -Werror -fPIC -g -O2 -MT libb10_dns___la-master_loader.lo -MD -MP -MF
> .deps/libb10_dns___la-master_loader.Tpo -c master_loader.cc  -fPIC -DPIC
> -o .libs/libb10_dns___la-master_loader.o
> cc1plus: warnings being treated as errors
> ../../../src/lib/dns/rrclass.h: In member function 'isc::dns::RRType
> isc::dns::MasterLoader::MasterLoaderImpl::parseRRParams(bool&,
> isc::dns::MasterToken)':
> ../../../src/lib/dns/rrclass.h:280: error: dereferencing pointer
> '<anonymous>' does break strict-aliasing rules
> master_loader.cc:225: note: initialized from here

According to this, the compiler complains about it within
RRClass::operator!= performed on the result of MaybeRRClass::operator*.
I've not fully looked into how exactly this combination led to the
above spurious warning, but since calling operator* itself doesn't
seem to trigger it from the fact that it didn't complain about the use
of it for MaybeRRTTL, I guess an easy workaround is to convert it to
RRClass explicitly and then use operator!=.

        const MaybeRRClass maybe_rrclass =
            RRClass::createFromText(rrparam_token.getString());
        if (maybe_rrclass) {
            // comment here about making an explicit copy
            const RRClass rrclass(*maybe_rrclass);
            if (rrclass != zone_class_) {

Having an RR class field in textual RR would be less common, and
copying RR class is quite cheap so (if it works) I think it's
acceptable.

---
JINMEI, Tatuya


More information about the bind10-dev mailing list