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

Bug#482303: luatex: getpwnam() implicitly converted to pointer

Package: luatex
Version: 0.25.2-1
Severity: important
Usertags: implicit-pointer-conversion

Our automated buildd log filter[1] detected a problem that is likely to
cause your package to segfault on architectures where the size of a
pointer is greater than the size of an integer, such as ia64 and amd64.

  Function `getpwnam' implicitly converted to pointer at ../../../src/texk/kpathsea/tilde.c:103

This is often due to a missing function prototype definition.
For more information, see [2].

luatex provides its own pwd.h file which is getting included instead
of the system pwd.h file and does not include a prototype for
getpwnam(). If the luatex pwd.h file is not available in the include
path, the system one gets properly included:

Here's the compilation w/ the luatex pwd.h in the path:
  root@dl385:/tmp/luatex-0.25.2/build/texk/kpathsea# /bin/sh ../libtool --mode=compile gcc -DHAVE_CONFIG_H  -I. -I../../../src/texk/kpathsea -I.. -I../../../src/texk/kpathsea/..   -g -Wall -O2  -DMAKE_KPSE_DLL -c ../../../src/texk/kpathsea/tilde.c
  gcc -DHAVE_CONFIG_H -I. -I.. -I../../../src/texk/kpathsea/.. -g -Wall -O2 -DMAKE_KPSE_DLL -c ../../../src/texk/kpathsea/tilde.c -o tilde.o
  ../../../src/texk/kpathsea/tilde.c: In function 'kpse_tilde_expand':
  ../../../src/texk/kpathsea/tilde.c:103: warning: implicit declaration of function 'getpwnam'
  ../../../src/texk/kpathsea/tilde.c:103: warning: cast to pointer from integer of different size
  echo timestamp > tilde.lo

Here's the compilation w/ '-I../../../src/texk/kpathsea' omitted:
  root@dl385:/tmp/luatex-0.25.2/build/texk/kpathsea# /bin/sh ../libtool --mode=compile gcc -DHAVE_CONFIG_H  -I. -I.. -I../../../src/texk/kpathsea/..   -g -Wall -O2  -DMAKE_KPSE_DLL -c ../../../src/texk/kpathsea/tilde.cgcc -DHAVE_CONFIG_H -I. -I.. -I../../../src/texk/kpathsea/.. -g -Wall -O2 -DMAKE_KPSE_DLL -c ../../../src/texk/kpathsea/tilde.c -o tilde.o
  echo timestamp > tilde.lo

[1] http://people.debian.org/~dannf/check-implicit-pointer-functions
[2] http://wiki.debian.org/ImplicitPointerConversions

dann frazier

Reply to: