From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.devel Subject: Re: Overlays as an AA-tree Date: Tue, 27 Sep 2016 17:38:44 +0300 Message-ID: <834m51csqz.fsf@gnu.org> References: <87d1jylv43.fsf@fastmail.com> <87a8f0p69w.fsf@fastmail.com> <878tujlmp0.fsf@fastmail.com> <87k2dx97tq.fsf@fastmail.com> Reply-To: Eli Zaretskii NNTP-Posting-Host: blaine.gmane.org X-Trace: blaine.gmane.org 1474987167 20187 195.159.176.226 (27 Sep 2016 14:39:27 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Tue, 27 Sep 2016 14:39:27 +0000 (UTC) Cc: monnier@iro.umontreal.ca, emacs-devel@gnu.org To: Joakim Jalap Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue Sep 27 16:39:21 2016 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1botXG-0002qZ-BT for ged-emacs-devel@m.gmane.org; Tue, 27 Sep 2016 16:39:06 +0200 Original-Received: from localhost ([::1]:51486 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1botXE-0003HH-Er for ged-emacs-devel@m.gmane.org; Tue, 27 Sep 2016 10:39:04 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:49077) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1botX2-0003Dv-CJ for emacs-devel@gnu.org; Tue, 27 Sep 2016 10:38:54 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1botWx-0007Mc-9N for emacs-devel@gnu.org; Tue, 27 Sep 2016 10:38:51 -0400 Original-Received: from fencepost.gnu.org ([2001:4830:134:3::e]:36627) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1botWx-0007M3-5v; Tue, 27 Sep 2016 10:38:47 -0400 Original-Received: from 84.94.185.246.cable.012.net.il ([84.94.185.246]:1856 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_128_CBC_SHA1:128) (Exim 4.82) (envelope-from ) id 1botWv-0006rp-Bh; Tue, 27 Sep 2016 10:38:45 -0400 In-reply-to: <87k2dx97tq.fsf@fastmail.com> (message from Joakim Jalap on Tue, 27 Sep 2016 08:26:41 +0200) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:4830:134:3::e X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.org gmane.emacs.devel:207831 Archived-At: > From: Joakim Jalap > Date: Tue, 27 Sep 2016 08:26:41 +0200 > Cc: emacs-devel@gnu.org > > I managed to get it to compile at last, but now I'm hitting another > issue. temacs segfaults in a gc while loading simple.el. It seems > somehow some memory doesn't look like it should, because the stack trace > from the gc is about 1100 frames! Mostly mark_object, with some > mark_vectorlike here and there. How do I debug something like that? I > tried putting a breakpoint in mark_buffer, but that function is called > like a million times, and from what I can see at least the first hundred > or so don't cause a crash. > > When it crashes, it always seems to be on the 10th Lisp_Object in struct > buffer, which by my calculations is major_mode_. From there it seems to > go haywire and into a thousand or more calls to mainly_mark object. Seeing 1100 frames in GC is nothing unusual. In fact, I've seen 30K frames in a perfectly healthy GC. Garbage collection is deeply recursive, so just that number of frames doesn't mean GC went haywire. I agree with Stefan: most likely you didn't update the GC code to deal with your implementation of overlays.