From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Robert Pluim Newsgroups: gmane.emacs.devel Subject: Re: Preview: portable dumper Date: Tue, 20 Feb 2018 19:20:06 +0100 Message-ID: <87inarh6ax.fsf@gmail.com> 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> <30fe2596-0f6c-cce5-22f1-de10a538add6@dancol.org> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: blaine.gmane.org 1519151082 16179 195.159.176.226 (20 Feb 2018 18:24:42 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Tue, 20 Feb 2018 18:24:42 +0000 (UTC) User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.0.91 (gnu/linux) Cc: Paul Eggert , emacs-devel@gnu.org To: Daniel Colascione Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue Feb 20 19:24:38 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 1eoCai-0003nR-IG for ged-emacs-devel@m.gmane.org; Tue, 20 Feb 2018 19:24:36 +0100 Original-Received: from localhost ([::1]:57118 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eoCck-0003QM-LF for ged-emacs-devel@m.gmane.org; Tue, 20 Feb 2018 13:26:42 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:58153) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eoCWV-0006hU-Iz for emacs-devel@gnu.org; Tue, 20 Feb 2018 13:20:16 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1eoCWS-000490-Is for emacs-devel@gnu.org; Tue, 20 Feb 2018 13:20:15 -0500 Original-Received: from mail-wr0-x236.google.com ([2a00:1450:400c:c0c::236]:40778) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1eoCWS-00048U-C6 for emacs-devel@gnu.org; Tue, 20 Feb 2018 13:20:12 -0500 Original-Received: by mail-wr0-x236.google.com with SMTP id o76so17061282wrb.7 for ; Tue, 20 Feb 2018 10:20:12 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:references:mail-followup-to:mail-copies-to :gmane-reply-to-list:date:in-reply-to:message-id:user-agent :mime-version; bh=OGk6/11QTqQvf+54fNwERGelOdtwoqEIie5hH+nSH+A=; b=hDstlecWJrvcjc2WqTwPOLlF17DIhTggwO1LPDrTJu3IYR2ZyXSHP20UmX3+p7LU1W LXYbMjD9lF7EujDpATFegC9vbwFtGALGlPW92c7BakCeA94ROjyBvQmdPaRnhg/A7PjM X1MHoWIwEJMFR48V/A9ee+y/S8uJw/v2QAPK9l3fA7H99jmkiezK6znXl0Aziag5SAbk Ez1NZJmqxg4NJR1zWOPU3CGZDCXOyxkiVwssDj3eSMuGDrmxryIHmJAn4HrZzOz3cMk+ b0Q4MGqL0r67hBTE7yL6881AZS0VBqvaUwqLf8lhIGt+j09yiuskAqENHCDzfMhIYGy/ AehA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:references:mail-followup-to :mail-copies-to:gmane-reply-to-list:date:in-reply-to:message-id :user-agent:mime-version; bh=OGk6/11QTqQvf+54fNwERGelOdtwoqEIie5hH+nSH+A=; b=kAf6ThONAJrOIBk5he4cnGSnjw9W3ORq6xgvNd9P/lhBpxEHlnXjYTO/DN8FOTWSJK HXzrXjL1gqkZU87wclXO0eBkLfJN70WUIVg3wyzbjKifTocgval5LNACnSQvJ4uJAKSg CkTJXd20w81N92IGS/eS3GndWx84QBut+0mL2IZsW6E89j9zHKhO6vUvMqssrX/odmTz 2nIM2ezSXCFoW88sw43WSBZtsbgEzX7ad1tPgGftVafh47joOwh5N7Z0kWa8eKrl9wQk wsgitePL6PuxHnONoY0bmzu2mdrQ4dDHdcH3ZcJuUxZyJc2nrnnKeka2n0ZBbrWSuaje Y36w== X-Gm-Message-State: APf1xPBsFJkELhS2YV+UNj05bC6VsN+XAKSVySH4rFlpvJIaU040bAGL eMj8ds1+2ZweDMrfwFQxsAhRnjSIvcs= X-Google-Smtp-Source: AH8x226FkKg3H6syzf0vMT7hgAzwh1n/Vg3jirm7hnvb6wXqTUK5Hc0w/LJESgtSfDRQWNWPJ6C8+w== X-Received: by 10.28.206.67 with SMTP id e64mr934958wmg.76.1519150810901; Tue, 20 Feb 2018 10:20:10 -0800 (PST) Original-Received: from rpluim-ubuntu (vav06-1-78-207-202-134.fbx.proxad.net. [78.207.202.134]) by smtp.gmail.com with ESMTPSA id x10sm2145446wrc.64.2018.02.20.10.20.08 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 20 Feb 2018 10:20:09 -0800 (PST) Mail-Followup-To: emacs-devel@gnu.org Mail-Copies-To: never Gmane-Reply-To-List: yes In-Reply-To: <30fe2596-0f6c-cce5-22f1-de10a538add6@dancol.org> (Daniel Colascione's message of "Tue, 20 Feb 2018 10:14:18 -0800") X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:400c:c0c::236 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:222939 Archived-At: Daniel Colascione writes: > 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. > splitpatch + git bisect run can do wonders :-) > 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. $ gcc --version gcc-5.real (Ubuntu 5.4.0-6ubuntu1~16.04.6) 5.4.0 20160609 I have a gcc-8-ish somewhere that I can rev up to see if it has the same problem, but probably not soon. Robert