NetBSD Problem Report #638
From gnats Sun Dec 11 22:08:16 1994
Received: from pain.lcs.mit.edu (pain.lcs.mit.edu [128.52.46.239]) by sun-lamp.cs.berkeley.edu (8.6.9/8.6.9) with ESMTP id WAA01865 for <gnats-bugs@sun-lamp.cs.berkeley.edu>; Sun, 11 Dec 1994 22:08:15 -0800
Message-Id: <m0rH1My-000dAgC@spadina.torfree.net>
Date: Sun, 11 Dec 94 22:24:11 EST
From: dej@torfree.net (David Jones)
To: gnats-bugs@NetBSD.ORG
Subject: Boyer-Moore functions match spuriously
X-Send-Pr-Version: 3.2
>Number: 638
>Category: lib
>Synopsis: Boyer-Moore string functions match spuriously
>Confidential: no
>Severity: serious
>Priority: low
>Responsible: lib-bug-people
>State: closed
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Sun Dec 11 22:20:04 +0000 1994
>Closed-Date: Wed Dec 14 07:15:27 +0000 1994
>Last-Modified:
>Originator: David Jones
>Release: 1.0
>Organization:
" None"
>Environment:
System: NetBSD qpoint 1.0A NetBSD 1.0A (QPOINT) #2: Sat Dec 10 22:23:53 EST 1994 dej@qpoint:/local/src/sys.941204/arch/amiga/compile/QPOINT amiga
>Description:
The Boyer-Moore string matching functions will sometimes signal a match even
where no match exists.
>How-To-Repeat:
Script started on Sun Dec 11 21:37:22 1994
/home/dej/fff> cat bm.c
#include <sys/types.h>
#include <bm.h>
void main(int argc, char *argv[])
{
bm_pat *pat;
pat = bm_comp(argv[1], strlen(argv[1]), 0);
if (bm_exec(pat, argv[2], strlen(argv[2]))) {
printf("Found.\n");
}
bm_free(pat);
}
/home/dej/fff> bm stoo stoodley -- case 1
Found.
/home/dej/fff> bm stoo stodgfg -- case 2
/home/dej/fff> bm stoo johnston -- case 3
Found.
/home/dej/fff> bm stoo ostodgfg -- case 4
/home/dej/fff> bm stoh johnston -- case 5
Found.
/home/dej/fff> bm stoh johnmston -- case 6
/home/dej/fff> exit
Cases 1, 2, 4 and 6 are correct.
Cases 3 and 5 are not.
>Fix:
None known
>Release-Note:
>Audit-Trail:
State-Changed-From-To: open->closed
State-Changed-By: cgd
State-Changed-When: Tue Dec 13 23:15:27 PST 1994
State-Changed-Why:
fixed it!
>Unformatted:
(Contact us)
$NetBSD: query-full-pr,v 1.51 2026/08/10 02:28:17 riastradh Exp $
$NetBSD: gnats_config.sh,v 1.10 2026/05/13 22:00:09 riastradh Exp $
Copyright © 1994-2026
The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.