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.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 50764 in the body.
You can then email your comments to 50764 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-gnu-emacs <at> gnu.org:
bug#50764; Package emacs. (Thu, 23 Sep 2021 16:17:01 GMT) Full text and rfc822 format available.

Acknowledgement sent to Philip Kaludercic <philipk <at> posteo.net>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Thu, 23 Sep 2021 16:17:01 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

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 1 (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 3 (text/plain, inline)]
-- 
	Philip K.

Reply sent to Mattias Engdegård <mattiase <at> acm.org>:
You have taken responsibility. (Thu, 23 Sep 2021 17:13:02 GMT) Full text and rfc822 format available.

Notification sent to Philip Kaludercic <philipk <at> posteo.net>:
bug acknowledged by developer. (Thu, 23 Sep 2021 17:13:02 GMT) Full text and rfc822 format available.

Message #10 received at 50764-done <at> debbugs.gnu.org (full text, mbox):

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.





bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Fri, 22 Oct 2021 11:24:08 GMT) Full text and rfc822 format available.

This bug report was last modified 2 years and 187 days ago.

Previous Next


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