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

Bug#211850: dpkg: --print-architecture segfaults when "gcc -dumpmachine" returns a non-matching triplet



Package: dpkg
Version: 1.9.21
Severity: normal

dpkg --print-architecture will segfault when the default compiler returns a
non-matching triplet, instead of reporting an error. You can try it by
overriding the CC variable with a dummy compiler:

rmh@gluck:~/tmp/dpkg-1.10.15$ ./configure && make
[...]
rmh@gluck:~/tmp/dpkg-1.10.15$ cd main/
rmh@gluck:~/tmp/dpkg-1.10.15/main$ cat ../../cc
#!/bin/sh
echo no-match
rmh@gluck:~/tmp/dpkg-1.10.15/main$ CC=../../cc ./dpkg --print-architecture
Segmentation fault

The offending line is in main/enquiry.c:448

-- System Information
Debian Release: 3.0
Architecture: i386
Kernel: Linux gluck 2.4.22-rc2 #1 SMP Mon Aug 18 08:28:49 PDT 2003 i686
Locale: LANG=C, LC_CTYPE=C

Versions of packages dpkg depends on:
ii  libc6                  2.2.5-11.5        GNU C Library: Shared libraries an
ii  libncurses5            5.2.20020112a-7   Shared libraries for terminal hand
ii  libstdc++2.10-glibc2.2 1:2.95.4-11woody1 The GNU stdc++ library




Reply to: