GNU bug report logs - #53136
28.0.90; segfault in lock_file

Previous Next

Package: emacs;

Reported by: Po Lu <luangruo <at> yahoo.com>

Date: Sun, 9 Jan 2022 06:05:01 UTC

Severity: normal

Found in version 28.0.90

Full log


View this message in rfc822 format

From: Eli Zaretskii <eliz <at> gnu.org>
To: Po Lu <luangruo <at> yahoo.com>
Cc: 53136 <at> debbugs.gnu.org
Subject: bug#53136: 28.0.90; segfault in lock_file
Date: Sun, 09 Jan 2022 10:42:07 +0200
> From: Po Lu <luangruo <at> yahoo.com>
> Cc: 53136 <at> debbugs.gnu.org
> Date: Sun, 09 Jan 2022 16:10:42 +0800
> 
> >>       memcpy (dot, replacement, replacementlen);
> >> 
> >> Ends up writing one byte outside dot.
> >> 
> >> I could not find the problem, but someone else may want to take a look.
> 
> > Details, please: the values of all the relevant variables at that
> > point, including the contents of all the string variables.
> 
> gdb says dot is "optimized out" (but valgrind, which I happened to be
> running that Emacs under in an attempt to catch the GC bug I reported a
> month ago, disagrees).  pidlen is 6.
> 
> I will try to get more information from the valgrind core file.

Thanks.

> > And what is your value of MAX_LFINFO?
> 
> MAX_LFINFO is 8192.

So we somehow wrote more than 8192 bytes by that memcpy line?  I find
this hard to believe.

What exactly did valgrind say?




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

Previous Next


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