Package: cruft-ng
Version: 0.4.52
Severity: normal
X-Debbugs-Cc: [email protected]
I had created a dpkg local diversion using the command -
dpkg-divert --divert /etc/PackageKit/20packagekit.distrib --rename
/etc/apt/apt.conf.d/20packagekit
The output of the command "dpkg-divert --list" command is now -
diversion of /usr/share/dict/words to
/usr/share/dict/words.pre-dictionaries-common by dictionaries-common
diversion of /usr/share/man/man1/sh.1.gz to /usr/share/man/man1/sh.distrib.1.gz
by dash
local diversion of /etc/apt/apt.conf.d/20packagekit to
/etc/PackageKit/20packagekit.distrib
diversion of /usr/bin/firefox to /usr/bin/firefox.real by firefox-esr
diversion of /bin/sh to /bin/sh.distrib by dash
When I run cruft-ng version 0.4.52 on the system it crashes with Segmentation
fault
Below is the relevant part of the output (in gdb, with DEBUG variable set to 1)
Note that the output of "dpkg-divert --list" does not show a package name for
the local diversion. The code parsing the output in dpkg_open() always assumes
that there is one. (If the dpkg local diversion is removed, cruft-ng completes
successfully)
...
READING FILES IN DPKG DATABASE
[Detaching after vfork from child process 104913]
diversion of /usr/share/dict/words to
/usr/share/dict/words.pre-dictionaries-common by dictionaries-common
diversion of /usr/share/man/man1/sh.1.gz to /usr/share/man/man1/sh.distrib.1.gz
by dash
local diversion of /etc/apt/apt.conf.d/20packagekit to
/etc/PackageKit/20packagekit.distrib
Program received signal SIGSEGV, Segmentation fault.
__strlen_sse2 () at ../sysdeps/x86_64/multiarch/strlen-vec.S:133
Download failed: Invalid argument. Continuing without source file
./string/../sysdeps/x86_64/multiarch/strlen-vec.S.
133 ../sysdeps/x86_64/multiarch/strlen-vec.S: No such file or directory.
(gdb) bt
#0 __strlen_sse2 () at ../sysdeps/x86_64/multiarch/strlen-vec.S:133
#1 0x0000555555568e8c in std::char_traits<char>::length (__s=0x0)
at /usr/include/c++/11/bits/char_traits.h:399
#2 std::__cxx11::basic_string<char, std::char_traits<char>,
std::allocator<char> >::assign (__s=0x0, this=0x7fffffffcb20)
at /usr/include/c++/11/bits/basic_string.h:1459
#3 std::__cxx11::basic_string<char, std::char_traits<char>,
std::allocator<char> >::operator= (__s=0x0, this=0x7fffffffcb20)
at /usr/include/c++/11/bits/basic_string.h:690
#4 read_diversions (diversions=std::vector of length 2, capacity 2 = {...})
at ./dpkg_popen.cc:66
#5 0x00005555555696ee in read_dpkg_items (
dpkg=std::vector of length 0, capacity 0) at ./dpkg_popen.cc:83
#6 0x0000555555558b5d in main (argc=<optimized out>, argv=<optimized out>)
at ./cruft.cc:258
(gdb)
-- System Information:
Debian Release: bookworm/sid
APT prefers testing-debug
APT policy: (500, 'testing-debug'), (500, 'stable-security'), (500, 'testing')
Architecture: amd64 (x86_64)
Kernel: Linux 5.17.0-1-amd64 (SMP w/4 CPU threads; PREEMPT)
Locale: LANG=en_GB.UTF-8, LC_CTYPE=en_GB.UTF-8 (charmap=UTF-8),
LANGUAGE=en_GB:en
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled
Versions of packages cruft-ng depends on:
ii cruft-common 0.9.42
ii libc6 2.33-7
ii libgcc-s1 12-20220319-1
ii libstdc++6 12-20220319-1
ii plocate 1.1.15-2
cruft-ng recommends no packages.
cruft-ng suggests no packages.
-- no debconf information