From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: David Kastrup Newsgroups: gmane.emacs.devel Subject: Re: [Emacs-diffs] master 8ba156f: Attempt to avoid crashes in plist-member Date: Tue, 13 Oct 2015 12:26:11 +0200 Message-ID: <87twpv83p8.fsf@fencepost.gnu.org> References: <20151012170324.17966.77@vcs.savannah.gnu.org> <83k2qro5eg.fsf@gnu.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1444732002 5410 80.91.229.3 (13 Oct 2015 10:26:42 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 13 Oct 2015 10:26:42 +0000 (UTC) Cc: Stefan Monnier , emacs-devel@gnu.org To: Eli Zaretskii Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue Oct 13 12:26:40 2015 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 1Zlwmt-0005bP-Fc for ged-emacs-devel@m.gmane.org; Tue, 13 Oct 2015 12:26:31 +0200 Original-Received: from localhost ([::1]:33543 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Zlwms-00065l-Fl for ged-emacs-devel@m.gmane.org; Tue, 13 Oct 2015 06:26:30 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:36229) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Zlwmb-0005qF-RH for emacs-devel@gnu.org; Tue, 13 Oct 2015 06:26:14 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Zlwma-0000i5-P1 for emacs-devel@gnu.org; Tue, 13 Oct 2015 06:26:13 -0400 Original-Received: from fencepost.gnu.org ([2001:4830:134:3::e]:59269) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Zlwma-0000i1-HM; Tue, 13 Oct 2015 06:26:12 -0400 Original-Received: from localhost ([127.0.0.1]:44855 helo=lola) by fencepost.gnu.org with esmtp (Exim 4.82) (envelope-from ) id 1ZlwmZ-0007TB-Py; Tue, 13 Oct 2015 06:26:12 -0400 Original-Received: by lola (Postfix, from userid 1000) id 3BDF0DF4F8; Tue, 13 Oct 2015 12:26:11 +0200 (CEST) In-Reply-To: <83k2qro5eg.fsf@gnu.org> (Eli Zaretskii's message of "Tue, 13 Oct 2015 05:42:47 +0300") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.0.50 (gnu/linux) X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2001:4830:134:3::e 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:191443 Archived-At: Eli Zaretskii writes: >> From: Stefan Monnier >> Cc: Eli Zaretskii >> Date: Mon, 12 Oct 2015 21:07:00 -0400 >> >> > Attempt to avoid crashes in plist-member >> >> > * src/fns.c (Fplist_member): Don't call QUIT between a CONSP test >> > and a call to XCDR. (Bug#21655) >> >> I have no objection to the patch itself, but I must say that I wonder >> how it can avoid crashes. IOW why would calling QUIT between a CONSP test >> and a call to XCDR be dangerous? > > QUIT could call some Lisp. Sure, but it would not return. So the XCDR should not be an issue. > How else would you explain a segfault in that loop? Have you configured with --no-thread-jumps ? '-fthread-jumps' Perform optimizations that check to see if a jump branches to a location where another comparison subsumed by the first is found. If so, the first branch is redirected to either the destination of the second branch or a point immediately following it, depending on whether the condition is known to be true or false. Enabled at levels '-O2', '-O3', '-Os'. Because when jumps/calls are threaded, most particularly to functions the compiler knows not to return, the backtraces may point to unrelated code and with nonsensical local variable settings. -- David Kastrup