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: Fri, 19 Oct 2018 11:44:35 +0300 Message-ID: <83va5ypbpo.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> <837eijtfw1.fsf@gnu.org> <878t2xd90z.fsf@runbox.com> <83in21snha.fsf@gnu.org> <87woqebx9v.fsf@runbox.com> NNTP-Posting-Host: blaine.gmane.org X-Trace: blaine.gmane.org 1539938670 31570 195.159.176.226 (19 Oct 2018 08:44:30 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Fri, 19 Oct 2018 08:44:30 +0000 (UTC) Cc: 33014@debbugs.gnu.org To: Gemini Lasswell Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Fri Oct 19 10:44:25 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 1gDQOM-00084Q-GP for geb-bug-gnu-emacs@m.gmane.org; Fri, 19 Oct 2018 10:44:22 +0200 Original-Received: from localhost ([::1]:47900 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gDQQT-00086k-2q for geb-bug-gnu-emacs@m.gmane.org; Fri, 19 Oct 2018 04:46:33 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:38269) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gDQQE-00084p-Ro for bug-gnu-emacs@gnu.org; Fri, 19 Oct 2018 04:46:24 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gDQQ3-0000b6-Ed for bug-gnu-emacs@gnu.org; Fri, 19 Oct 2018 04:46:13 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:53873) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1gDQPy-0000QD-JW for bug-gnu-emacs@gnu.org; Fri, 19 Oct 2018 04:46:04 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1gDQPy-0000kn-DR for bug-gnu-emacs@gnu.org; Fri, 19 Oct 2018 04:46: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: Fri, 19 Oct 2018 08:46: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.15399387102819 (code B ref 33014); Fri, 19 Oct 2018 08:46:02 +0000 Original-Received: (at 33014) by debbugs.gnu.org; 19 Oct 2018 08:45:10 +0000 Original-Received: from localhost ([127.0.0.1]:58131 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gDQP6-0000jI-BI for submit@debbugs.gnu.org; Fri, 19 Oct 2018 04:45:10 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:56322) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gDQP4-0000iQ-5d for 33014@debbugs.gnu.org; Fri, 19 Oct 2018 04:45:06 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gDQOv-0007Dz-Nq for 33014@debbugs.gnu.org; Fri, 19 Oct 2018 04:45:00 -0400 Original-Received: from fencepost.gnu.org ([2001:4830:134:3::e]:52072) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gDQOu-0007DF-UQ; Fri, 19 Oct 2018 04:44:57 -0400 Original-Received: from [176.228.60.248] (port=1408 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1gDQOu-0001IA-HM; Fri, 19 Oct 2018 04:44:56 -0400 In-reply-to: <87woqebx9v.fsf@runbox.com> (message from Gemini Lasswell on Thu, 18 Oct 2018 17:22:36 -0700) 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:151431 Archived-At: > From: Gemini Lasswell > Cc: 33014@debbugs.gnu.org, schwab@linux-m68k.org > Date: Thu, 18 Oct 2018 17:22:36 -0700 > > Eli Zaretskii writes: > > > Anyway, are you saying that stack marking doesn't work in optimized > > code? We've been using this technique for the last 17 years without > > problems; why would the fact that we have more than one thread change > > that? The same arguments you submit are valid for a single-threaded > > Emacs, right? > > Apparently so. I set up a single-threaded situation where I could > redefine a function while exec_byte_code was running it, and got a > segfault. I've gained some insights from debugging this version of the > bug which I will put into a separate email. If this is the case, then I think we should protect the definition of a running function from GC, in some way, either by making sure it is referenced by some stack-based Lisp object, even in heavily optimized code (e.g., by using 'volatile' qualifiers); or by some other method that will ensure that definition is marked and not swept.