From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Daniel Colascione Newsgroups: gmane.emacs.devel Subject: Re: [Emacs-diffs] master 0a5b6e2: Fix aborts in GC under GC_CHECK_MARKED_OBJECTS Date: Wed, 21 Dec 2016 20:22:40 -0800 Message-ID: References: <20161221201813.3130.28327@vcs.savannah.gnu.org> <20161221201813.A13CA2201BA@vcs.savannah.gnu.org> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: blaine.gmane.org 1482380580 23495 195.159.176.226 (22 Dec 2016 04:23:00 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Thu, 22 Dec 2016 04:23:00 +0000 (UTC) User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.0.50 (gnu/linux) Cc: Eli Zaretskii To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu Dec 22 05:22:56 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 1cJuu5-0005Kt-Py for ged-emacs-devel@m.gmane.org; Thu, 22 Dec 2016 05:22:53 +0100 Original-Received: from localhost ([::1]:60343 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cJuuA-000271-Dv for ged-emacs-devel@m.gmane.org; Wed, 21 Dec 2016 23:22:58 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:57505) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cJuu4-00026v-Ix for emacs-devel@gnu.org; Wed, 21 Dec 2016 23:22:53 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cJuu3-0001rm-Lh for emacs-devel@gnu.org; Wed, 21 Dec 2016 23:22:52 -0500 Original-Received: from dancol.org ([2600:3c01::f03c:91ff:fedf:adf3]:33930) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1cJutz-0001r5-V4; Wed, 21 Dec 2016 23:22:48 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=dancol.org; s=x; h=Content-Type:MIME-Version:Message-ID:In-Reply-To:Date:References:Subject:Cc:To:From; bh=m421yf3b+7tkxEAHmHVy94u/L9Ooe5GPnJWgCO/4Qgs=; b=lxtXtBhZeBL4OFs5PALJB0TCoAXDQaszG+CrtxiMdhoE0F3pFHQvOJcHM9VbgR27yjvvYCzuL1L8ByDIVPwJtqDi84Q47ObzZGJqsG+X8N6dqGN72ruvw7C7PCaxC8LItejhZPguibu00gYBRizssDUqpO26W02mrwU3YuIlLjqTQ1z05wur1B6mDwXU88E1GXb0HJX9ryCs+bciViQBQKV7+8agqCQd9FMiAKhV6xwjwfqr4L0a3n2Nv5JO53Fx3I1i8PkttgSimQOloKNPI+hyTkS1xjjr7rDe98ah5oelZ8JWqgO1OR9GieWSuaphPkoI2gfYQVfjQ66rrSjffA==; Original-Received: from c-73-140-245-253.hsd1.wa.comcast.net ([73.140.245.253] helo=thule.roam.corp.google.com) by dancol.org with esmtpsa (TLS1.2:DHE_RSA_AES_128_CBC_SHA1:128) (Exim 4.84_2) (envelope-from ) id 1cJutz-0006GB-0V; Wed, 21 Dec 2016 20:22:47 -0800 In-Reply-To: <20161221201813.A13CA2201BA@vcs.savannah.gnu.org> (Eli Zaretskii's message of "Wed, 21 Dec 2016 20:18:13 +0000 (UTC)") X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2600:3c01::f03c:91ff:fedf:adf3 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:210728 Archived-At: On Wed, Dec 21 2016, Eli Zaretskii wrote: > branch: master > commit 0a5b6e28f91ff46231a768737170e39172297257 > Author: Eli Zaretskii > Commit: Eli Zaretskii > > Fix aborts in GC under GC_CHECK_MARKED_OBJECTS > > * src/alloc.c (mark_object) [GC_CHECK_MARKED_OBJECTS]: Don't abort > for thread objects. They are marked via the all_threads list, and > therefore don't need to be inserted into the red-black tree, so > mem_find will never find them. Reported by Daniel Colascione > in > http://lists.gnu.org/archive/html/emacs-devel/2016-12/msg00817.html. > --- > src/alloc.c | 6 ++++-- > 1 file changed, 4 insertions(+), 2 deletions(-) > > diff --git a/src/alloc.c b/src/alloc.c > index f2b7682..e979f36 100644 > --- a/src/alloc.c > +++ b/src/alloc.c > @@ -6406,7 +6406,7 @@ mark_object (Lisp_Object arg) > > #ifdef GC_CHECK_MARKED_OBJECTS > m = mem_find (po); > - if (m == MEM_NIL && !SUBRP (obj)) > + if (m == MEM_NIL && !SUBRP (obj) && !THREADP (obj)) This code is incorrect. The only special case is po == &primary_thread. As I mentioned in another message, all _other_ thread objects live in dynamic storage and need the usual treatment of thread objects. The reason we have SUBRP in the clause above is that *all* subr objects live in static, not dynamic, storage.