GNU bug report logs - #48843
pos_visible_p segfault

Previous Next

Package: emacs;

Reported by: Christopher Howard <christopher <at> librehacker.com>

Date: Sat, 5 Jun 2021 05:07:01 UTC

Severity: normal

Done: Eli Zaretskii <eliz <at> gnu.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 48843 in the body.
You can then email your comments to 48843 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#48843; Package emacs. (Sat, 05 Jun 2021 05:07:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Christopher Howard <christopher <at> librehacker.com>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Sat, 05 Jun 2021 05:07:02 GMT) Full text and rfc822 format available.

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

From: Christopher Howard <christopher <at> librehacker.com>
To: bug-gnu-emacs <at> gnu.org
Subject: pos_visible_p segfault
Date: Fri, 04 Jun 2021 21:05:52 -0800
[Message part 1 (text/plain, inline)]
Hello, I am able to consistently reproduce a segfault under rather
precise conditions, when I am doing a search while comparing two files
using emacs-vdiff. The segfault seems to be happening in pos_visible_p.

GNU Emacs 27.2 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.24.24,
cairo version 1.16.0)

christopher <at> nightshade ~$ guix describe
Generation 7	Jun 04 2021 15:20:58	(current)
  guix 7382aa0
    repository URL: https://git.savannah.gnu.org/git/guix.git
    branch: master
    commit: 7382aa00b82860762bc326dec6b45f8cd2161327

christopher <at> nightshade ~$ guix show emacs-vdiff | grep version
version: 0.2.4

christopher <at> nightshade ~$ neofetch --stdout | grep CPU
CPU: AMD Athlon II X3 455 (3) @ 3.300GHz

Steps to reproduce:

- Starts Emacs (in Gnome or in virtual console)
- M-x vdiff-file
- for file 1: my.dump (attached)
- for file 2: upstream.dump (attached)
- while in file 1 buffer: C-s 1 e 2 d

I figured out how to get a backtrace in gdb:

Thread 1 ".emacs-27.2-rea" received signal SIGSEGV, Segmentation fault.
0x000000000045c447 in pos_visible_p ()
(gdb) bt
#0  0x000000000045c447 in pos_visible_p ()
#1  0x000000000047ddab in Fpos_visible_in_window_p ()
#2  0x000000000056d225 in Ffuncall ()
#3  0x00000000005a0550 in exec_byte_code ()
#4  0x000000000056d17f in Ffuncall ()
#5  0x00000000005a0550 in exec_byte_code ()
#6  0x000000000056d17f in Ffuncall ()
#7  0x00000000005a0550 in exec_byte_code ()
#8  0x000000000056d17f in Ffuncall ()
#9  0x00000000005a0550 in exec_byte_code ()
#10 0x000000000056d17f in Ffuncall ()
#11 0x00000000005a0550 in exec_byte_code ()
#12 0x000000000056d17f in Ffuncall ()
#13 0x00000000005a0550 in exec_byte_code ()
#14 0x000000000056d17f in Ffuncall ()
#15 0x0000000000569be0 in Ffuncall_interactively ()
#16 0x000000000056d225 in Ffuncall ()
#17 0x000000000056d444 in Fapply ()
#18 0x000000000056b21a in Fcall_interactively ()
#19 0x000000000056d225 in Ffuncall ()
#20 0x00000000005a0550 in exec_byte_code ()
#21 0x000000000056d17f in Ffuncall ()
#22 0x000000000056d2da in call1 ()
#23 0x00000000005076f0 in command_loop_1 ()
#24 0x000000000056c53e in internal_condition_case ()
#25 0x00000000004f937c in command_loop_2 ()
#26 0x000000000056c4ad in internal_catch ()
#27 0x00000000004f9324 in command_loop ()
#28 0x00000000004fe2b6 in recursive_edit_1 ()
#29 0x00000000004fe5c4 in Frecursive_edit ()
#30 0x00000000004227e5 in main ()

I looked briefly at vdiff source code, and it only lisp code. I don't
think it proper to consider this a vdiff bug, though it seems like
something about how vdiff is handling manipulating or setting up the
windows allows the segfault situation in pos_visible_p() to occur.
-- 
Christopher Howard
blog: https://librehacker.com
social: https://gnusocial.club/librehacker
[upstream.dump (text/plain, attachment)]
[my.dump (text/plain, attachment)]

Reply sent to Eli Zaretskii <eliz <at> gnu.org>:
You have taken responsibility. (Sat, 05 Jun 2021 07:07:01 GMT) Full text and rfc822 format available.

Notification sent to Christopher Howard <christopher <at> librehacker.com>:
bug acknowledged by developer. (Sat, 05 Jun 2021 07:07:01 GMT) Full text and rfc822 format available.

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

From: Eli Zaretskii <eliz <at> gnu.org>
To: Christopher Howard <christopher <at> librehacker.com>
Cc: 48843-done <at> debbugs.gnu.org
Subject: Re: bug#48843: pos_visible_p segfault
Date: Sat, 05 Jun 2021 10:05:55 +0300
> From: Christopher Howard <christopher <at> librehacker.com>
> Date: Fri, 04 Jun 2021 21:05:52 -0800
> 
> Hello, I am able to consistently reproduce a segfault under rather
> precise conditions, when I am doing a search while comparing two files
> using emacs-vdiff. The segfault seems to be happening in pos_visible_p.
> 
> GNU Emacs 27.2 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.24.24,
> cairo version 1.16.0)
> 
> christopher <at> nightshade ~$ guix describe
> Generation 7	Jun 04 2021 15:20:58	(current)
>   guix 7382aa0
>     repository URL: https://git.savannah.gnu.org/git/guix.git
>     branch: master
>     commit: 7382aa00b82860762bc326dec6b45f8cd2161327
> 
> christopher <at> nightshade ~$ guix show emacs-vdiff | grep version
> version: 0.2.4
> 
> christopher <at> nightshade ~$ neofetch --stdout | grep CPU
> CPU: AMD Athlon II X3 455 (3) @ 3.300GHz
> 
> Steps to reproduce:
> 
> - Starts Emacs (in Gnome or in virtual console)
> - M-x vdiff-file
> - for file 1: my.dump (attached)
> - for file 2: upstream.dump (attached)
> - while in file 1 buffer: C-s 1 e 2 d
> 
> I figured out how to get a backtrace in gdb:
> 
> Thread 1 ".emacs-27.2-rea" received signal SIGSEGV, Segmentation fault.
> 0x000000000045c447 in pos_visible_p ()
> (gdb) bt
> #0  0x000000000045c447 in pos_visible_p ()
> #1  0x000000000047ddab in Fpos_visible_in_window_p ()

Thanks.  This is a known bug in Emacs 27.2 (see bug#45156), which is
already fixed on the master branch.

So I'm closing this bug.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#48843; Package emacs. (Sat, 05 Jun 2021 13:51:02 GMT) Full text and rfc822 format available.

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

From: Christopher Howard <christopher <at> librehacker.com>
To: 48843 <at> debbugs.gnu.org
Subject: Re: bug#48843: closed (Re: bug#48843: pos_visible_p segfault)
Date: Sat, 05 Jun 2021 05:49:48 -0800
This is for certain?

The bug you referenced indicates the problem has been fixed in 27.2,
which is the version I am currently using.

Christopher





Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#48843; Package emacs. (Sat, 05 Jun 2021 13:55:01 GMT) Full text and rfc822 format available.

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

From: Christopher Howard <christopher <at> librehacker.com>
To: 48843 <at> debbugs.gnu.org
Subject: Re: bug#48843: closed (Re: bug#48843: pos_visible_p segfault)
Date: Sat, 05 Jun 2021 05:54:07 -0800
Nevermind, I see the problem is not occuring in Emacs 28.0.50, which is
available also from Guix. Thank you!

-- 
Christopher Howard
blog: https://librehacker.com
social: https://gnusocial.club/librehacker

On Sat, 2021-06-05 at 05:49 -0800, Christopher Howard wrote:
> This is for certain?
> 
> The bug you referenced indicates the problem has been fixed in 27.2,
> which is the version I am currently using.
> 
> Christopher





Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#48843; Package emacs. (Sat, 05 Jun 2021 14:29:01 GMT) Full text and rfc822 format available.

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

From: Eli Zaretskii <eliz <at> gnu.org>
To: Christopher Howard <christopher <at> librehacker.com>
Cc: 48843 <at> debbugs.gnu.org
Subject: Re: bug#48843: closed (Re: bug#48843: pos_visible_p segfault)
Date: Sat, 05 Jun 2021 17:28:33 +0300
> From: Christopher Howard <christopher <at> librehacker.com>
> Date: Sat, 05 Jun 2021 05:49:48 -0800
> 
> This is for certain?

Yes.  I verified that the problem you describe happens in Emacs 27.2,
but not with the current master branch.

> The bug you referenced indicates the problem has been fixed in 27.2,
> which is the version I am currently using.

No, you misunderstood the discussion.  It says the bug was fixed on
master, not on the emacs-27 branch (from which Emacs 27.2 was
released).

However, if you build your own Emacs, you should be able to apply the
patches from that bug and rebuild Emacs 27.2 with those changes.




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

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

Previous Next


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