From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Andreas Schwab Newsgroups: gmane.emacs.bugs Subject: bug#29066: 26.0.90; crash in gc involving buffer local symbols Date: Tue, 31 Oct 2017 07:32:14 +0100 Message-ID: <87efpjzv2p.fsf@linux-m68k.org> References: <83a808tlqp.fsf@gnu.org> <838tfst27n.fsf@gnu.org> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: blaine.gmane.org 1509431598 8966 195.159.176.226 (31 Oct 2017 06:33:18 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Tue, 31 Oct 2017 06:33:18 +0000 (UTC) User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.3 (gnu/linux) Cc: 29066@debbugs.gnu.org, Valentin Gatien-Baron , mshinwell@janestreet.com To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Tue Oct 31 07:33:14 2017 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 1e9Q6l-0001Sr-WD for geb-bug-gnu-emacs@m.gmane.org; Tue, 31 Oct 2017 07:33:08 +0100 Original-Received: from localhost ([::1]:43930 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1e9Q6t-0004is-Dw for geb-bug-gnu-emacs@m.gmane.org; Tue, 31 Oct 2017 02:33:15 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:33490) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1e9Q6k-0004if-6P for bug-gnu-emacs@gnu.org; Tue, 31 Oct 2017 02:33:07 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1e9Q6h-0008VG-21 for bug-gnu-emacs@gnu.org; Tue, 31 Oct 2017 02:33:06 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:34428) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1e9Q6g-0008VB-Us for bug-gnu-emacs@gnu.org; Tue, 31 Oct 2017 02:33:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1e9Q6g-00014C-JQ for bug-gnu-emacs@gnu.org; Tue, 31 Oct 2017 02:33:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Andreas Schwab Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 31 Oct 2017 06:33:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 29066 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 29066-submit@debbugs.gnu.org id=B29066.15094315404044 (code B ref 29066); Tue, 31 Oct 2017 06:33:02 +0000 Original-Received: (at 29066) by debbugs.gnu.org; 31 Oct 2017 06:32:20 +0000 Original-Received: from localhost ([127.0.0.1]:43109 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1e9Q60-000139-37 for submit@debbugs.gnu.org; Tue, 31 Oct 2017 02:32:20 -0400 Original-Received: from mail-out.m-online.net ([212.18.0.10]:56808) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1e9Q5y-000131-8S for 29066@debbugs.gnu.org; Tue, 31 Oct 2017 02:32:18 -0400 Original-Received: from frontend01.mail.m-online.net (unknown [192.168.8.182]) by mail-out.m-online.net (Postfix) with ESMTP id 3yR1jX51SCz1qv30; Tue, 31 Oct 2017 07:32:16 +0100 (CET) Original-Received: from localhost (dynscan1.mnet-online.de [192.168.6.70]) by mail.m-online.net (Postfix) with ESMTP id 3yR1jX3bgcz1tSmT; Tue, 31 Oct 2017 07:32:16 +0100 (CET) X-Virus-Scanned: amavisd-new at mnet-online.de Original-Received: from mail.mnet-online.de ([192.168.8.182]) by localhost (dynscan1.mail.m-online.net [192.168.6.70]) (amavisd-new, port 10024) with ESMTP id 0Fq0kq1GFG34; Tue, 31 Oct 2017 07:32:15 +0100 (CET) X-Auth-Info: hJStsnwGePhEtTsQnrxonRTzWvZTSlFtHPOtXSGCbc66+4Xb22ujzV2Jpt+xaGNi Original-Received: from localhost (ppp-188-174-147-245.dynamic.mnet-online.de [188.174.147.245]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.mnet-online.de (Postfix) with ESMTPSA; Tue, 31 Oct 2017 07:32:15 +0100 (CET) Original-Received: by localhost (Postfix, from userid 1000) id C09CA2C110B; Tue, 31 Oct 2017 07:32:14 +0100 (CET) X-Yow: I have no actual hairline... In-Reply-To: <838tfst27n.fsf@gnu.org> (Eli Zaretskii's message of "Tue, 31 Oct 2017 05:39:56 +0200") 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:139243 Archived-At: On Okt 31 2017, Eli Zaretskii wrote: >> I also checked the following works, and seems better to me (stop having dangling pointers, instead of being >> careful with them): >> >> diff --git a/src/alloc.c b/src/alloc.c >> index da0c3ad4b3..44dfa95cf5 100644 >> --- a/src/alloc.c >> +++ b/src/alloc.c >> @@ -7030,8 +7030,10 @@ sweep_symbols (void) >> { >> if (!sym->s.gcmarkbit) >> { >> - if (sym->s.redirect == SYMBOL_LOCALIZED) >> + if (sym->s.redirect == SYMBOL_LOCALIZED) { >> xfree (SYMBOL_BLV (&sym->s)); >> + sym->s.val.blv = NULL; >> + } > > That was my first attempt, but various macros like SYMBOL_BLV and > SET_SYMBOL_BLV insist on val.blv being non-NULL. SET_SYMBOL_BLV doesn't. And calling SYMBOL_BLV with a freed symbol is a bug anyway. Andreas. -- Andreas Schwab, schwab@linux-m68k.org GPG Key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5 "And now for something completely different."