Public bug reported:

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=0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ9abcdefghijklmnopqrstuvwxyz
chars1="  0123456789  ABCDEFGHIJKLMNOPQRSTUVWXYZ9  abcdefghijklmnopqrstuvwxyz"

line=1
for (( j=0 ; j < 1700 ; )) do
    for (( i=0 ; i<1000 ; i++ )) ; do
        (( r = RANDOM % 100 + 1 ))
        a="${chars:RANDOM%${#chars}:3}"
        b="${chars:RANDOM%${#chars}:5}"
        c="${chars1:RANDOM%${#chars1}:$r}"
        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+hg487+dfsg-1
ProcVersionSignature: Ubuntu 5.0.0-25.26-generic 5.0.18
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_DIR=<set>
 LANG=en_US.UTF-8
 SHELL=/usr/bin/zsh
SourcePackage: xxdiff
UpgradeStatus: Upgraded to disco on 2019-04-19 (117 days ago)

** Affects: xxdiff (Ubuntu)
     Importance: Undecided
         Status: New


** Tags: amd64 apport-bug disco

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1840163

Title:
  xxdiff segfaults when reading large files

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/xxdiff/+bug/1840163/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to