GNU bug report logs - #50764
Fix (string-distance "" "") edge-case

Previous Next

Package: emacs;

Reported by: Philip Kaludercic <philipk <at> posteo.net>

Date: Thu, 23 Sep 2021 16:17:01 UTC

Severity: normal

Tags: patch

Done: Mattias Engdegård <mattiase <at> acm.org>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: help-debbugs <at> gnu.org (GNU bug Tracking System)
To: Mattias Engdegård <mattiase <at> acm.org>
Cc: tracker <at> debbugs.gnu.org
Subject: bug#50764: closed (Fix (string-distance "" "") edge-case)
Date: Thu, 23 Sep 2021 17:13:02 +0000
[Message part 1 (text/plain, inline)]
Your message dated Thu, 23 Sep 2021 19:12:30 +0200
with message-id <FFD6FE62-0CF2-4C1A-9352-4CB64E24A0BE <at> acm.org>
and subject line bug#50764: Fix (string-distance "" "") edge-case
has caused the debbugs.gnu.org bug report #50764,
regarding Fix (string-distance "" "") edge-case
to be marked as done.

(If you believe you have received this mail in error, please contact
help-debbugs <at> gnu.org.)


-- 
50764: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=50764
GNU Bug Tracking System
Contact help-debbugs <at> gnu.org with problems
[Message part 2 (message/rfc822, inline)]
From: Philip Kaludercic <philipk <at> posteo.net>
To: bug-gnu-emacs <at> gnu.org
Subject: Fix (string-distance "" "") edge-case
Date: Thu, 23 Sep 2021 16:16:42 +0000
[Message part 3 (text/plain, inline)]
Tags: patch


string-distance appears to be using uninitialized memory, if the second
argument is an empty string. This leads to the function occasionally
generating random and meaningless results. This patch ensures that the
entire memory is initialized before it is accessed, fixing the results
for edge cases with empty strings.

In GNU Emacs 28.0.50 (build 13, x86_64-pc-linux-gnu, X toolkit, cairo version 1.16.0, Xaw scroll bars)
 of 2021-09-23 built on icterid
Repository revision: bb5d8582f75712c3610795aa5ead79600308f8bb
Repository branch: master
Windowing system distributor 'The X.Org Foundation', version 11.0.12011000
System Description: Debian GNU/Linux 11 (bullseye)

Configured using:
 'configure LDFLAGS=-flto 'CFLAGS=-O2 -march=native -mtune=native -pipe'
 --with-native-compilation PKG_CONFIG_PATH='

[0001-Fix-string-distance-for-two-empty-strings.patch (text/patch, attachment)]
[Message part 5 (text/plain, inline)]
-- 
	Philip K.
[Message part 6 (message/rfc822, inline)]
From: Mattias Engdegård <mattiase <at> acm.org>
To: Philip Kaludercic <philipk <at> posteo.net>
Cc: 50764-done <at> debbugs.gnu.org
Subject: bug#50764: Fix (string-distance "" "") edge-case
Date: Thu, 23 Sep 2021 19:12:30 +0200
Looks like your independent test suite is already paying dividends!
Pushed with tests.



This bug report was last modified 3 years and 324 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.