On Sat, Sep 27, 2008 at 06:39:40PM +0300, Martin Michlmayr wrote:
> libdebian-installer segfaults parsing the attached status file.
>
> open("/var/lib/dpkg/status", O_RDONLY) = 7
> fstat64(7, {st_mode=S_IFREG|0644, st_size=12288, ...}) = 0
> mmap2(NULL, 12288, PROT_READ, MAP_PRIVATE, 7, 0) = 0x40172000
> madvise(0x40172000, 12288, MADV_SEQUENTIAL) = 0
> --- SIGSEGV (Segmentation fault) @ 0 (0) ---
> +++ killed by SIGSEGV +++
>
> Program received signal SIGSEGV, Segmentation fault.
> 0x400355bc in di_parser_rfc822_read () from /lib/libdebian-installer.so.4
> (gdb) where
> #0 0x400355bc in di_parser_rfc822_read () from /lib/libdebian-installer.so.4
> #1 0x400356a8 in di_parser_rfc822_read_file () from /lib/libdebian-installer.so.4
> #2 0x40034d84 in di_packages_special_read_file () from /lib/libdebian-installer.so.4
> #3 0x00009970 in ?? ()
> (gdb)
The following program worked fine with the given "status" file on i386:
--- 8< ---
#include <debian-installer/package.h>
int main(int argc, char ** argv)
{
di_packages *packages;
di_packages_allocator *packages_allocator;
packages_allocator = di_packages_allocator_alloc();
packages = di_packages_read_file("status", packages_allocator);
return 0;
}
--- >8 ---
A more complete trace would be helpful.
Cheers,
--
Jérémy Bobbio .''`.
lunar@debian.org : :Ⓐ : # apt-get install anarchism
`. `'`
`-
Attachment:
signature.asc
Description: Digital signature