Bug#44654: dpkg: seg faults w/2.3.17; problem traced to sysinfo() call
dpkg under my self-compiled Linux 2.3.17 seg faults on startup if a
non-dpkg-deb option is given. The problem is avoided if the call to
sysinfo() in main/filesdb.c is bypassed. I can't see what's going
wrong (it's probably something in kernel space clobbering user space,
but the code seems fine and probably hasn't changed in a while).
Furthermore, the use of the sysinfo() call is a nop, because dpkg uses
the "large memory" model by default if you have more than 6144 bytes
(yes, I said bytes) of total system memory, regardless of free memory.
This should probably be changed (filesdb around line 500).
The kernel is built with gcc 22.214.171.124 and the latest binutils. .config
available on request.
[CC'd to linux-kernel.]
-- System Information
Debian Release: potato
Kernel: Linux quango4 2.3.17 #1 Thu Sep 9 01:07:05 CDT 1999 i686
Versions of packages dpkg depends on:
ii libc6 2.1.2-1 GNU C Library: Shared libraries an
ii libncurses4 4.2-3.2 Shared libraries for terminal hand
ii libstdc++2.9-glibc2.1 2.91.66-2 The GNU stdc++ library (EGCS versi