From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#33014: 26.1.50; 27.0.50; Fatal error after re-evaluating a thread's function Date: Mon, 15 Oct 2018 17:59:26 +0300 Message-ID: <837eijtfw1.fsf@gnu.org> References: <87d0sh9hje.fsf@runbox.com> <83murjwplq.fsf@gnu.org> <87zhvjc4r3.fsf@runbox.com> <83y3b2uzyt.fsf@gnu.org> <87va65daw9.fsf@runbox.com> <8336t9vi3h.fsf@gnu.org> <87ftx89uqs.fsf@igel.home> NNTP-Posting-Host: blaine.gmane.org X-Trace: blaine.gmane.org 1539615487 19240 195.159.176.226 (15 Oct 2018 14:58:07 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Mon, 15 Oct 2018 14:58:07 +0000 (UTC) Cc: gazally@runbox.com, 33014@debbugs.gnu.org To: Andreas Schwab Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Mon Oct 15 16:58:03 2018 Return-path: Envelope-to: geb-bug-gnu-emacs@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 1gC4Jl-0004re-Tt for geb-bug-gnu-emacs@m.gmane.org; Mon, 15 Oct 2018 16:58:02 +0200 Original-Received: from localhost ([::1]:52717 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gC4Ls-00061J-ES for geb-bug-gnu-emacs@m.gmane.org; Mon, 15 Oct 2018 11:00:12 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:60991) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gC4Lm-00060y-OV for bug-gnu-emacs@gnu.org; Mon, 15 Oct 2018 11:00:07 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gC4Li-0007vi-Ov for bug-gnu-emacs@gnu.org; Mon, 15 Oct 2018 11:00:06 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:46654) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1gC4Li-0007ur-JQ for bug-gnu-emacs@gnu.org; Mon, 15 Oct 2018 11:00:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1gC4Li-0003z6-GL for bug-gnu-emacs@gnu.org; Mon, 15 Oct 2018 11:00:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 15 Oct 2018 15:00:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 33014 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 33014-submit@debbugs.gnu.org id=B33014.153961557115251 (code B ref 33014); Mon, 15 Oct 2018 15:00:02 +0000 Original-Received: (at 33014) by debbugs.gnu.org; 15 Oct 2018 14:59:31 +0000 Original-Received: from localhost ([127.0.0.1]:50912 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gC4LD-0003xv-5a for submit@debbugs.gnu.org; Mon, 15 Oct 2018 10:59:31 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:51089) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gC4LC-0003xi-Ea for 33014@debbugs.gnu.org; Mon, 15 Oct 2018 10:59:30 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gC4Kz-0006C9-V6 for 33014@debbugs.gnu.org; Mon, 15 Oct 2018 10:59:23 -0400 Original-Received: from fencepost.gnu.org ([2001:4830:134:3::e]:43244) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gC4Kz-0006B4-L6; Mon, 15 Oct 2018 10:59:17 -0400 Original-Received: from [176.228.60.248] (port=4953 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1gC4Ky-00023T-BB; Mon, 15 Oct 2018 10:59:17 -0400 In-reply-to: <87ftx89uqs.fsf@igel.home> (message from Andreas Schwab on Sun, 14 Oct 2018 21:46:35 +0200) 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: 208.118.235.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:151267 Archived-At: > From: Andreas Schwab > Cc: Gemini Lasswell , 33014@debbugs.gnu.org > Date: Sun, 14 Oct 2018 21:46:35 +0200 > > Do we actually mark the registers of the threads as gc roots? According to my reading of the code, we do. Each time a running thread is about to release the global lock, we call flush_stack_call_func, which is supposed to flush relevant registers to the stack of that thread. And mark_one_thread marks the stack of each thread, so it should be able to see the Lisp objects on that stack. In this case, the function whose bytecode seems to be GC'ed is the thread function itself. That function is also marked, as part of marking the thread object itself, although, of course, re-evaluating the function will redefine the function. But, if my reading of exec_byte_code is correct, the bytecode should be on the stack and in registers while we execute it, so even though the bytecode gets disconnected from the function, it is still reachable from the stack, and should have been marked... Could this be some bug in the implementation of __builtin_unwind_init etc., which causes it not to save some registers under some conditions? Gemini, what version of the compiler are you using?