On Sun, Jun 29, 2014 at 09:01:05PM +0200, Peter De Wachter wrote:

> an crashes when using the Dutch word list:
> 
> $ an -d /usr/share/dict/dutch anagram
> anagram
> maraan g
> Segmentation fault

I've been able to reproduce. It's a function recursing without limit.

#0  0x00007ffff55b4095 in _int_malloc (
    av=av@entry=0x7ffff58dd620 <main_arena>, bytes=bytes@entry=16)
    at malloc.c:3790
#1  0x00007ffff55b6bdc in __libc_calloc (n=<optimized out>,
    elem_size=<optimized out>) at malloc.c:3219
#2  0x00000000004019a9 in safe_calloc (nmemb=nmemb@entry=16, size=size@entry=1)
    at malloc.c:29
#3  0x00000000004017b6 in bf_subtract (a=0xfa08d0, b=0x607e90)
    at bitfield.c:109
#4  0x0000000000401472 in find_anagrams (words=0x607e70, stack=0xfa08f0,
    bits=0xfa08d0, maxwords=0, length=1, maxtotal=0x7fffffffe4a0) at an.c:55
#5  0x000000000040148f in find_anagrams (words=0x607e70, stack=0xfa0890,
    bits=0xfa0870, maxwords=0, length=1, maxtotal=0x7fffffffe4a0) at an.c:56
#6  0x000000000040148f in find_anagrams (words=0x607e70, stack=0xfa0830,
    bits=0xfa0810, maxwords=0, length=1, maxtotal=0x7fffffffe4a0) at an.c:56
#7  0x000000000040148f in find_anagrams (words=0x607e70, stack=0xfa07d0,
    bits=0xfa07b0, maxwords=0, length=1, maxtotal=0x7fffffffe4a0) at an.c:56
#8  0x000000000040148f in find_anagrams (words=0x607e70, stack=0xfa0770,
    bits=0xfa0750, maxwords=0, length=1, maxtotal=0x7fffffffe4a0) at an.c:56
#9  0x000000000040148f in find_anagrams (words=0x607e70, stack=0xfa0710,
    bits=0xfa06f0, maxwords=0, length=1, maxtotal=0x7fffffffe4a0) at an.c:56
#10 0x000000000040148f in find_anagrams (words=0x607e70, stack=0xfa06b0,
    bits=0xfa0690, maxwords=0, length=1, maxtotal=0x7fffffffe4a0) at an.c:56
#11 0x000000000040148f in find_anagrams (words=0x607e70, stack=0xfa0650,
    bits=0xfa0630, maxwords=0, length=1, maxtotal=0x7fffffffe4a0) at an.c:56
#12 0x000000000040148f in find_anagrams (words=0x607e70, stack=0xfa05f0,
    bits=0xfa05d0, maxwords=0, length=1, maxtotal=0x7fffffffe4a0) at an.c:56
#13 0x000000000040148f in find_anagrams (words=0x607e70, stack=0xfa0590,
    bits=0xfa0570, maxwords=0, length=1, maxtotal=0x7fffffffe4a0) at an.c:56
#14 0x000000000040148f in find_anagrams (words=0x607e70, stack=0xfa0530,
    bits=0xfa0510, maxwords=0, length=1, maxtotal=0x7fffffffe4a0) at an.c:56
#15 0x000000000040148f in find_anagrams (words=0x607e70, stack=0xfa04d0,
    bits=0xfa04b0, maxwords=0, length=1, maxtotal=0x7fffffffe4a0) at an.c:56

It seems to be caused by the bogus "word" 06 here:

pioniersschop
paardzet
poppenkind
poppenkasterij
privégedrag
pottenbakkersdraaischijf
potroos
's
06
1e
2e
4wd
AAW
ABU
AM
AMAR

This dictionary looks to be of very low quality in places with many
bogus entries:

Artesiër
Arthur
Arthur Conan Doyle
Arwin
As

Axelaar
Axels
Ayaan Hirsi Ali
Ayatollah Khomeini
Ayers Rock
Azerbeidzjaan

Bart
Bartina
Bartolomeüs
Baruch de Spinoza
Bas
Bas-Congo
Base
Basel

Bussums
Buvingen
Byzantium
C
C++
CBS
CDA
CIA
CO₂-emissie
CWI
Caesar

Chalcidice
Chantal
Chaplin
Charkov
Charleroi
Charles
Charles Darwin
Charles Dickens
Charles Lindbergh
Charles de Gaulle
Charlie Chaplin
Charlois
Charlotte
Charlotte Amalie
Che Guevara

verassend
verassende
marcje
lost generations
marctje
plats du jour
stede
arnhemmer


As "06" contains no letters, it's causing an infinite recursion when
it's used.

-- 
Paul Martin <p...@debian.org>


-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org

Reply via email to