Package: ldns
Version: 1.6.17-1
Severity: minor
Usertags: goto-cc

During a rebuild of all packages in a clean sid chroot (and cowbuilder+pbuilder)
the build failed with the following error. Please note that we use our research
compiler tool-chain (using tools from the cbmc package), which permits extended
reporting on type inconsistencies at link time.

[...]
./libtool --tag=CC --quiet --mode=link gcc -Wstrict-prototypes -Wwrite-strings 
-W -Wall -g -O2   examples/ldns-testns.lo examples/ldns-testpkts.lo  -lldns -o 
examples/ldns-testns

error: conflicting function declarations "verbose"
old definition in module ldns-testns file ./examples/ldns-testns.c line 191
void (signed int lvl, const char *msg, ...)
new definition in module ldns-testpkts file ./examples/ldns-testpkts.c line 39
void (enum verbosity_value, const char *, ...)
Makefile:172: recipe for target 'examples/ldns-testns' failed
make[2]: *** [examples/ldns-testns] Error 64
make[2]: Leaving directory 
'/srv/jenkins-slave/workspace/sid-goto-cc-ldns/ldns-1.6.17'
dh_auto_build: make -j1 returned exit code 2

While the compiler may implement enum via int, there is no such guarantee; if a
smaller type is chosen, the function will be using uninitialized memory. Thus
these declaration should be made consistent, possibly by moving the declarations
of ldns-testpkts.c to ldns-testpkts.h. The code may be reviewed here:

http://sources.debian.net/src/ldns/1.6.17-1/examples/ldns-testpkts.c?hl=39#L39
http://sources.debian.net/src/ldns/1.6.17-1/examples/ldns-testns.c?hl=191#L191

Best,
Michael

Attachment: pgpQxbuZSEAIk.pgp
Description: PGP signature

Reply via email to