[Bug 14616] New: Printf format code and data type do not match in taskset
bugzilla at busybox.net
bugzilla at busybox.net
Mon Feb 28 19:15:08 UTC 2022
https://bugs.busybox.net/show_bug.cgi?id=14616
Bug ID: 14616
Summary: Printf format code and data type do not match in
taskset
Product: Busybox
Version: 1.33.x
Hardware: Other
OS: Linux
Status: NEW
Severity: normal
Priority: P5
Component: Other
Assignee: unassigned at busybox.net
Reporter: pdvb at yahoo.com
CC: busybox-cvs at busybox.net
Target Milestone: ---
The following code uses an (unsigned long) "%lx" format code, but passes an
(unsigned long long) value to printf. The result is that on architectures
which use 32-bit for (unsigned long) and 64-bit for (unsigned long long) the
printf produces incorrect output.
#define TASKSET_PRINTF_MASK "%lx"
static unsigned long long from_mask(ul *mask, unsigned sz_in_bytes
UNUSED_PARAM)
{
return *mask;
}
This was broken by commit ef0e76cc on 1/29/2017
The quick fix is to define the function as:
static unsigned long from_mask()
--
You are receiving this mail because:
You are on the CC list for the bug.
More information about the busybox-cvs
mailing list