Package: corosync
Version: 1.4.6-1
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.

[...]
gcc  -g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat 
-Werror=format-security -O3 -ggdb3     -Wall -Wshadow -Wmissing-prototypes 
-Wmissing-declarations -Wstrict-prototypes -Wdeclaration-after-statement 
-Wpointer-arith -Wwrite-strings -Wcast-align -Wbad-function-cast 
-Wmissing-format-attribute -Wformat=2 -Wformat-security -Wformat-nonliteral 
-Wno-long-long -Wno-strict-aliasing   -L../lib -Wl,-z,relro   -o corosync-pload 
corosync-pload.o -lpload -lcoroipcc -lrt -lpthread -ldl 

error: conflicting function declarations "pload_initialize"
old definition in module corosync-pload file ../include/corosync/pload.h line 80
pload_error_t (pload_handle_t *handle, pload_callbacks_t *callbacks)
new definition in module pload file pload.c line 74
unsigned int (pload_handle_t *handle, pload_callbacks_t *callbacks)

where pload_error_t is a typedef name for an enum declared in pload.h. As the
representation of an enum is compiler defined (and will likely be a signed int
in this case), undefined behaviour may arise -- even ignoring the aspect that
other parts of the code may rely on all return values being one of the enum
values rather than being an arbitrary unsigned value.

The appropriate fix likely is using pload_error_t in the definition in pload.c.

Best,
Michael

Attachment: pgpoPahlLBIkR.pgp
Description: PGP signature

Reply via email to