GNU bug report logs - #43499
27.1; It is possible for (forward-comment -1) to crash emacs

Previous Next

Package: emacs;

Reported by: Jeff Norden <jnorden <at> tntech.edu>

Date: Sat, 19 Sep 2020 01:26:01 UTC

Severity: normal

Tags: patch

Found in version 27.1

Done: Eli Zaretskii <eliz <at> gnu.org>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Stefan Kangas <stefan <at> marxist.se>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: 43499 <at> debbugs.gnu.org, Jeff Norden <jnorden <at> tntech.edu>
Subject: bug#43499: 27.1; It is possible for (forward-comment -1) to crash emacs
Date: Thu, 12 Nov 2020 22:40:17 -0500
Eli Zaretskii <eliz <at> gnu.org> writes:

>> From: Jeff Norden <jnorden <at> tntech.edu>
>> Cc: 43499 <at> debbugs.gnu.org
>> Date: Sat, 19 Sep 2020 11:24:23 -0500
>>
>> > Thanks.  I propose a slightly different change below.  I think it's
>> > somewhat better, because it does the comparison only once, and the
>> > while loop can then run at full speed without testing on each
>> > iteration.  (It looks like a large change, but almost all of it is
>> > just whitespace changes due to re-indentation of the loop.)  Do you
>> > agree?
>>
>> I think either change will work fine.  It doesn't seem to me that either
>> one would be faster, unless I'm missing something.  My suggestion was to
>> move the test from the body of the loop (where from == stop is checked
>> each iteration) to the clause of the while statement (as from > stop
>> instead).  But, maybe a test before the loop starts makes the code more
>> clear - that is entirely your call.
>
> Thanks, I installed my changes.

Did that fix the issue?  Does that mean that this bug can be closed?




This bug report was last modified 4 years and 189 days ago.

Previous Next


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