pkgsrc-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

pkg/48070: The printf width specifier z should be used to format that type(MISSING_SIZE_T_SUPPORT)



>Number:         48070
>Category:       pkg
>Synopsis:       The printf width specifier z should be used to format that 
>type(MISSING_SIZE_T_SUPPORT)
>Confidential:   no
>Severity:       serious
>Priority:       low
>Responsible:    pkg-manager
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Sat Jul 20 00:40:00 +0000 2013
>Originator:     nullnilaki
>Release:        
>Organization:
japan
>Environment:
>Description:
1:core dumped
#pkg_admin rebuild Segmentation fault (core dumped)

2:debug
(gdb) where 
#0 0x48162fd6 in __svfprintf () from /shlib/libc.so.2 
#1 0x48165592 in vfprintf () from /shlib/libc.so.2
...
#4 0x48161824 in printf () from /shlib/libc.so.2
#5 0x804c3ba in rebuild ()

3:source
pkgtools/pkg_install/files/admin/main.c
rebuild(void)
{
printf("Stored %" PRIzu " file%s and %zu explicit director%s"
}

4:configure
*-*-hpux*)
  $as_echo "#define MISSING_SIZE_T_SUPPORT 1" >>confdefs.h

5:macro
#ifndef MISSING_SIZE_T_SUPPORT
#  define PRIzu "zu"
#elif SIZEOF_SIZE_T == SIZEOF_INT
#  define PRIzu "u"
#elif SIZEOF_SIZE_T == SIZEOF_LONG
#  define PRIzu "lu"
#elif SIZEOF_SIZE_T == SIZEOF_LONG_LONG
#  define PRIzu "llu"
#else
#  errror "Unknown size_t size"
#endif

6:summary
The printf width specifier z should be used to format that type.
But some platform do not support z.

>How-To-Repeat:

>Fix:
printf("Stored %" PRIzu " file%s and %" PRIzu " explicit director%s"



Home | Main Index | Thread Index | Old Index