From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.devel Subject: Re: GC and stack marking Date: Wed, 21 May 2014 18:39:49 +0300 Message-ID: <838upvnnsq.fsf@gnu.org> References: <83a9add91p.fsf@gnu.org> <8338g4bd7m.fsf@gnu.org> <83wqdgntan.fsf@gnu.org> <83ppj7oniv.fsf@gnu.org> Reply-To: Eli Zaretskii NNTP-Posting-Host: plane.gmane.org X-Trace: ger.gmane.org 1400686807 15666 80.91.229.3 (21 May 2014 15:40:07 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 21 May 2014 15:40:07 +0000 (UTC) Cc: fabrice.popineau@gmail.com, emacs-devel@gnu.org To: Stefan Monnier Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed May 21 17:40:00 2014 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1Wn8cX-0006bA-2q for ged-emacs-devel@m.gmane.org; Wed, 21 May 2014 17:39:57 +0200 Original-Received: from localhost ([::1]:60460 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Wn8cW-0002nh-L8 for ged-emacs-devel@m.gmane.org; Wed, 21 May 2014 11:39:56 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:40174) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Wn8cP-0002mj-8i for emacs-devel@gnu.org; Wed, 21 May 2014 11:39:54 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Wn8cH-0000fL-2I for emacs-devel@gnu.org; Wed, 21 May 2014 11:39:49 -0400 Original-Received: from mtaout26.012.net.il ([80.179.55.182]:39914) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Wn8cG-0000f4-QZ for emacs-devel@gnu.org; Wed, 21 May 2014 11:39:40 -0400 Original-Received: from conversion-daemon.mtaout26.012.net.il by mtaout26.012.net.il (HyperSendmail v2007.08) id <0N5X00L00KKLFW00@mtaout26.012.net.il> for emacs-devel@gnu.org; Wed, 21 May 2014 18:36:32 +0300 (IDT) Original-Received: from HOME-C4E4A596F7 ([87.69.4.28]) by mtaout26.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0N5X00FP3KOWM260@mtaout26.012.net.il>; Wed, 21 May 2014 18:36:32 +0300 (IDT) In-reply-to: X-012-Sender: halo1@inter.net.il X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 80.179.55.182 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 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-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:171992 Archived-At: > From: Stefan Monnier > Cc: emacs-devel@gnu.org, fabrice.popineau@gmail.com > Date: Tue, 20 May 2014 23:01:24 -0400 > > > That's how I found out that it was being marked by mark_stack. But > > that doesn't tell you how that value _got_ on the stack, does it? > > No, but it does tell you its address in the stack, so you can then walk > up the backtrace and look at the address of local variables until you > (hopefully) find the one that matters. I already tried that before, and came up empty-handed. I tried again now; the address of that value on the stack does not correspond to any local variable in the corresponding stack frame, and I also cannot find that address in the disassembly of the function whose stack frame includes the value. I might try setting a watchpoint at that address, but that might be impractical; we shall see. Now, I have a question: mark_stack stops examining the stack when it gets to its own stack frame. That is certainly safe, but it sounds too conservative: it should stop at the stack frame of Fgarbage_collect, I think, because no live Lisp object can appear while Fgarbage_collect runs, right?