From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#35429: 27.0.50; Arbitrary xdisp.c related crashes when working with overlay-using packages Date: Thu, 25 Apr 2019 23:25:39 +0300 Message-ID: <83r29pygqk.fsf@gnu.org> References: Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="203236"; mail-complaints-to="usenet@blaine.gmane.org" Cc: 35429@debbugs.gnu.org To: Kaushal Modi Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Thu Apr 25 22:34:28 2019 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([209.51.188.17]) by blaine.gmane.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1hJl4c-000qj6-Bd for geb-bug-gnu-emacs@m.gmane.org; Thu, 25 Apr 2019 22:34:26 +0200 Original-Received: from localhost ([127.0.0.1]:34717 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hJl4b-00070M-8U for geb-bug-gnu-emacs@m.gmane.org; Thu, 25 Apr 2019 16:34:25 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:45830) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hJl4Q-0006vw-F9 for bug-gnu-emacs@gnu.org; Thu, 25 Apr 2019 16:34:15 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hJkxS-0004JT-E1 for bug-gnu-emacs@gnu.org; Thu, 25 Apr 2019 16:27:03 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:45890) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1hJkxS-0004JK-6d for bug-gnu-emacs@gnu.org; Thu, 25 Apr 2019 16:27:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1hJkxR-00078d-UW for bug-gnu-emacs@gnu.org; Thu, 25 Apr 2019 16:27:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 25 Apr 2019 20:27:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 35429 X-GNU-PR-Package: emacs Original-Received: via spool by 35429-submit@debbugs.gnu.org id=B35429.155622396827381 (code B ref 35429); Thu, 25 Apr 2019 20:27:01 +0000 Original-Received: (at 35429) by debbugs.gnu.org; 25 Apr 2019 20:26:08 +0000 Original-Received: from localhost ([127.0.0.1]:59434 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hJkwZ-00077Y-KD for submit@debbugs.gnu.org; Thu, 25 Apr 2019 16:26:07 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:58371) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hJkwX-000774-KG for 35429@debbugs.gnu.org; Thu, 25 Apr 2019 16:26:06 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:57287) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hJkwS-0003D7-BX; Thu, 25 Apr 2019 16:26:00 -0400 Original-Received: from [176.228.60.248] (port=2617 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1hJkwR-00080K-EP; Thu, 25 Apr 2019 16:26:00 -0400 In-reply-to: (message from Kaushal Modi on Thu, 25 Apr 2019 11:36:27 -0400) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.51.188.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:158261 Archived-At: > From: Kaushal Modi > Date: Thu, 25 Apr 2019 11:36:27 -0400 > > In the past one-two weeks Any chance for a more accurate time frame? Or maybe even bisection? > I have been noticing arbitrary crashes when working in Org mode, with other > packages like org-tree-slide and artist-mode. My guess is that this has to do with packages dealing with > overlays. > > I do not have a reproducible recipe, but this time, I got the full backtrace (attached as gdb.txt). Thanks. Unfortunately, the backtrace makes no sense to me. The buffer was pure ASCII, right? At least for the first 2K characters it seems the answer is yes, because: > #4 0x0000000000584793 in line_number_display_width (w=w@entry=0x89da880, width=width@entry=0x7fffffff43dc, pixel_width=pixel_width@entry=0x7fffffff43e0) at indent.c:1981 > startpos = { > charpos = 2874, > bytepos = 2874 > } As you see, the character and the byte positions coincide, which is a sign of a plain ASCII buffer text. So it makes little sense that the assertion is violated, because it is called to validate the same character position of 2874: > #1 0x00000000005a1232 in die (msg=msg@entry=0x680450 "charpos == BYTE_TO_CHAR (bytepos)", file=file@entry=0x67dc6a "xdisp.c", line=line@entry=3047) at alloc.c:7221 > No locals. > #2 0x0000000000456b44 in init_iterator (it=it@entry=0x7fffffff3040, w=w@entry=0x89da880, charpos=2874, bytepos=, row=, base_face_id=base_face_id@entry=DEFAULT_FACE_ID) at xdisp.c:3047 So something strange is at work here, and I cannot see what it could be, especially with all those "optimized out" variables. I would suggest to try an unoptimized build, and if the same crashes happen there as well, perhaps the backtrace will tell something more useful. It would help to know the value of bytepos argument to init_iterator, and if it indeed is equal to charpos, the next thing to look at is the buffer's markers. Thanks.