xxdiff segfaults when reading large files
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
xxdiff (Ubuntu) |
New
|
Undecided
|
Unassigned |
Bug Description
I have a very large genealogy database (almost 2 million lines) and I use xxdiff to look at changes. The lastest update now crashes when loading the file. For privacy reasons the actual file is not being supplied - and it's very big! However, here is a script that reproduces the problem.
run the following script, say in /tmp or other directory - it generates a semi random file
and then diff's it against a copy of it self. a few seconds after starting xxdiff it dies
/usr/bin/xxdiff f1 f2
9357 segmentation fault (core dumped) /usr/bin/xxdiff f1 f2
/usr/bin/xxdiff f1 f2: 0.85s real 0.56s user 0.19s system 89%
warning script will remove and then recreate files named f1 and f2.
#!/bin/bash
rm -f f1 f2
chars=012345678
chars1=" 0123456789 ABCDEFGHIJKLMNO
line=1
for (( j=0 ; j < 1700 ; )) do
for (( i=0 ; i<1000 ; i++ )) ; do
(( r = RANDOM % 100 + 1 ))
echo "$cnt $a $b $c" >> f1
(( cnt++ ))
(( line++ ))
done
(( j++ ))
done
set -x
cp f1 f2
/usr/bin/xxdiff f1 f2
ProblemType: Bug
DistroRelease: Ubuntu 19.04
Package: xxdiff 1:4.0.1+
ProcVersionSign
Uname: Linux 5.0.0-25-generic x86_64
ApportVersion: 2.20.10-0ubuntu27.1
Architecture: amd64
CurrentDesktop: ubuntu:GNOME
Date: Wed Aug 14 08:52:01 2019
InstallationDate: Installed on 2018-02-26 (533 days ago)
InstallationMedia: Ubuntu 17.10 "Artful Aardvark" - Release amd64 (20180105.1)
ProcEnviron:
TERM=xterm
PATH=(custom, no user)
XDG_RUNTIME_
LANG=en_US.UTF-8
SHELL=/usr/bin/zsh
SourcePackage: xxdiff
UpgradeStatus: Upgraded to disco on 2019-04-19 (117 days ago)