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: Preview: portable dumper Date: Tue, 20 Feb 2018 10:14:18 -0800 Message-ID: <30fe2596-0f6c-cce5-22f1-de10a538add6@dancol.org> References: <21ee28b4-c3cd-4664-a501-8df6b78d3e48@email.android.com> <5b0c48b5-1dc2-f220-37a2-09877c6a9dcc@cs.ucla.edu> <1a9b40c9-3e24-14c2-f152-4a1a3b00e43a@dancol.org> <87r2pfh6sr.fsf@gmail.com> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-Trace: blaine.gmane.org 1519150430 5577 195.159.176.226 (20 Feb 2018 18:13:50 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Tue, 20 Feb 2018 18:13:50 +0000 (UTC) User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.6.0 Cc: Paul Eggert , emacs-devel@gnu.org To: Robert Pluim Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue Feb 20 19:13:46 2018 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 1eoCQD-00019X-Ap for ged-emacs-devel@m.gmane.org; Tue, 20 Feb 2018 19:13:45 +0100 Original-Received: from localhost ([::1]:57031 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eoCSF-0001xt-Fc for ged-emacs-devel@m.gmane.org; Tue, 20 Feb 2018 13:15:51 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:56260) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eoCQs-0001vo-Vb for emacs-devel@gnu.org; Tue, 20 Feb 2018 13:14:27 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1eoCQs-00083y-0Y for emacs-devel@gnu.org; Tue, 20 Feb 2018 13:14:26 -0500 Original-Received: from dancol.org ([2600:3c01::f03c:91ff:fedf:adf3]:34654) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1eoCQr-00083M-N6 for emacs-devel@gnu.org; Tue, 20 Feb 2018 13:14:25 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=dancol.org; s=x; h=Content-Transfer-Encoding:Content-Type:In-Reply-To:MIME-Version:Date:Message-ID:From:References:Cc:To:Subject; bh=l5yQoqdhp89xN+zCXFAw+MBlfxh31jnkqPI3dakW0GA=; b=DbFDrd+Z5pLOEffGWdt+LZR/gp1ADpqEFHsjXXTKO/u/x9zzClxllmbL3tWdhOrchqYB3TYhWs5VWFd4uvxhGzuVP3ObZjzFA8Tm4occXnE5Ce1o6QSo3XOJCjjQTPoe0OSM1XskqJ2q92ro5pGz9vlkKIcutBcGNQPVtCGhhBtFJcAhDzpEQQVj8cyTw5vpDph3XasKf+Wq1ZpngUPf8gtl3kfnf4v+lK8glj0PpZA0ZZBJ5K8G23WPLgXcnhZ7SMp1vIC0rUhJtdzK3VeUNohYA6rE6smxj+BeDXXmJvGnVtmBVUbywrosiKBJBUu49dIOIcsgejDZfOFySRBjHQ==; Original-Received: from [2604:4080:1321:8ab0:e568:87d3:fce4:c549] by dancol.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.84_2) (envelope-from ) id 1eoCQq-0007Md-Au; Tue, 20 Feb 2018 10:14:24 -0800 In-Reply-To: <87r2pfh6sr.fsf@gmail.com> Content-Language: en-US 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:222935 Archived-At: On 02/20/2018 10:09 AM, Robert Pluim wrote: > Daniel Colascione writes: > >> On 02/20/2018 09:28 AM, Paul Eggert wrote: >>> On 02/20/2018 09:19 AM, Daniel Colascione wrote: >>>> Do you get an assertion failure if you enable assertion checking? >>>> If we're seeing this kind of problem from the compiler expectation >>>> alone, I'll definitely revert that change. >>> >>> In my experience, eassume (and 'assume') shouldn't be used for >>> complicated expressions, as GCC is too-easily confused by >>> them. eassume should be used only for expressions where the >>> assumption really does help the compiler, either by generating >>> significantly-better code or by pacifying a false alarm. >> >> I'd hoped things had gotten better, and some local testing seemed to >> suggest it was safe to use these days. Apparently it's not, which is a >> shame. It'd be nice, but not urgent, to track down which specific >> assumptions caused what I think must be miscompilations so we could >> report them upstream. > > The guilty change is: > > --- a/src/pdumper.c > +++ b/src/pdumper.c > @@ -607,7 +607,7 @@ dump_set_have_current_referrer (struct dump_context *ctx, bool have) > static void > DUMP_CLEAR_REFERRER (struct dump_context *ctx) > { > - eassert (ctx->have_current_referrer); > + eassume (ctx->have_current_referrer); > dump_set_have_current_referrer (ctx, false); > if (dump_tracking_referrers_p (ctx)) > ctx->current_referrer = Qnil; > > If I revert just that hunk, the build succeeds. Wow: thanks for tracking that down. What on earth? I mean, we're instructing the compiler to assume something that's both trivial and true. What GCC version is this? If it's recent, I think it's probably worth reporting.