#748410 Inconsistent parameter types of xmalloc, xrealloc

Package:
cpio
Source:
cpio
Description:
GNU cpio -- a program to manage archives of files
Submitter:
Michael Tautschnig
Date:
2025-08-11 20:55:03 UTC
Severity:
normal
#748410#5
Date:
2014-05-16 22:55:45 UTC
From:
To:
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.

[...]
  CCLD   cpio

file ../../src/dstring.c line 32: error: conflicting function declarations "xmalloc"
old definition in module copyin file ../../gnu/xalloc.h line 58
void * (unsigned long int)
new definition in module dstring file ../../src/dstring.c line 32
char * (unsigned int)
make[3]: *** [cpio] Error 64
make[3]: Leaving directory `/srv/jenkins-slave/workspace/sid-goto-cc-cpio/cpio-2.11+dfsg/obj/src'
make[2]: *** [all-recursive] Error 1

This declaration in dstring.c may be reviewed here:

http://sources.debian.net/src/cpio/2.11+dfsg-2/src/dstring.c?hl=32,33#L32

In the same spirit, this type cast appears dangerous:

http://sources.debian.net/src/cpio/2.11+dfsg-2/src/copyin.c?hl=141#L141

In times of systems with more than 4GB of memory, these may mean an undesired
limitation (if not actually causing errors).

Best,
Michael

#748410#12
Date:
2025-08-11 20:53:15 UTC
From:
To:
Properly close this bug, it was marked as fixed already.