Bug#749436: multipath-tools: Conflicting declarations of devt2devname shadow undefined behaviour

Michael Tautschnig mt at debian.org
Mon May 26 22:49:35 UTC 2014


Package: multipath-tools
Version: 0.5.0-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.

[...]
cc  -shared -lpthread -ldevmapper -ldl -L../libmultipath -lmultipath -Wl,-soname=libmpathpersist.so.0 -g -O2 -fPIE -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2 -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -Wunused -Wstrict-prototypes -fPIC -DLIB_STRING=\"lib\" -I../libmultipath -I../libmpathpersist  -o libmpathpersist.so.0 mpath_persist.o mpath_updatepr.o mpath_pr_ioctl.o 

error: conflicting function declarations "devt2devname"
old definition in module mpath_persist file mpathpr.h line 53
signed int (char *, char *)
new definition in module util file util.h line 10
signed int (char *devname, signed int devname_len, char *devt)
Makefile:22: recipe for target 'libmpathpersist.so.0' failed
make[2]: *** [libmpathpersist.so.0] Error 64

For some reason mpathpr.h runs its own declaration of devt2devname rather than
including util.h - compare the two declarations:

http://sources.debian.net/src/multipath-tools/0.5.0-1/libmpathpersist/mpathpr.h?hl=53#L53
http://sources.debian.net/src/multipath-tools/0.5.0-1/libmultipath/util.h?hl=10#L10

Thus both the number and types of arguments are wrong here, resulting in
undefined behaviour:

http://sources.debian.net/src/multipath-tools/0.5.0-1/libmpathpersist/mpath_persist.c?hl=74#L74

Best,
Michael


-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 859 bytes
Desc: not available
URL: <http://lists.alioth.debian.org/pipermail/pkg-lvm-maintainers/attachments/20140526/f51319a9/attachment.sig>


More information about the pkg-lvm-maintainers mailing list