From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Noam Postavsky Newsgroups: gmane.emacs.devel Subject: Re: Certain numbers of special forms cause changing behaviour on function calls in --batch Date: Sun, 10 Jul 2016 12:23:17 -0400 Message-ID: References: <8760stvwzp.fsf@web.de> <834m8cvu9p.fsf@gnu.org> <87h9cbpw61.fsf@web.de> <83wpl7v1sg.fsf@gnu.org> <87a8i2dfe3.fsf@web.de> <83poqyvh58.fsf@gnu.org> <87shvu1ixp.fsf@web.de> <8360spvn6i.fsf@gnu.org> <8760sjn5me.fsf@web.de> <871t37n51y.fsf@web.de> <8337nmon4l.fsf@gnu.org> <87mvluomaz.fsf@web.de> <83mvlun6zc.fsf@gnu.org> <83bn25fst6.fsf@gnu.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 X-Trace: ger.gmane.org 1468167816 25193 80.91.229.3 (10 Jul 2016 16:23:36 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sun, 10 Jul 2016 16:23:36 +0000 (UTC) Cc: Michael Heerdegen , Yasushi SHOJI , me@wilfred.me.uk, Emacs developers To: Eli Zaretskii Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sun Jul 10 18:23:34 2016 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 1bMHW1-0004v6-Tb for ged-emacs-devel@m.gmane.org; Sun, 10 Jul 2016 18:23:34 +0200 Original-Received: from localhost ([::1]:55867 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bMHW1-0001v3-7f for ged-emacs-devel@m.gmane.org; Sun, 10 Jul 2016 12:23:33 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:54284) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bMHVr-0001t9-4L for emacs-devel@gnu.org; Sun, 10 Jul 2016 12:23:24 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bMHVp-00013Y-0y for emacs-devel@gnu.org; Sun, 10 Jul 2016 12:23:22 -0400 Original-Received: from mail-oi0-x235.google.com ([2607:f8b0:4003:c06::235]:36332) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bMHVn-00011V-6S; Sun, 10 Jul 2016 12:23:19 -0400 Original-Received: by mail-oi0-x235.google.com with SMTP id n8so17255779oif.3; Sun, 10 Jul 2016 09:23:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc; bh=Fpkk6RVyEohn25sTlt+I3GeCnxnxnXUUZdNVslFGV7s=; b=X4QCDDzYxkMCqqXmSmUytk49Y+5dEW9w2QZ0JRnYf399pdYidsi89N+1knkRLWQ5Kg qZBcGyy/zpAj3q5hA9Irkx7pxaejLDZC2tO5PKNTD+UeBzJSjmQ86yy1QnPsTLXrnQM2 4dWgnySckcpfCPTCRw486C2+fzKX3PIynfv43J7w/PyV52o5Tpzd8a5RQ3F2b7srftW4 1McXilDZpieGyFllc28wHf1xrQT+bvhB0pU2RDi2gOo23yRU6+EHe85Ggu1+35npq3XX b3ww6Rp7Z7IDdKx+/8580eO9goa2YSMaBZ1kOQ5YBYbaPPUiciMue5drPtunHHBKrLO6 v2og== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:sender:in-reply-to:references:from :date:message-id:subject:to:cc; bh=Fpkk6RVyEohn25sTlt+I3GeCnxnxnXUUZdNVslFGV7s=; b=g1raFCbL2EvSMbKX7UFXID6DgWXioJCMiHr6nJnfJLWza1kxjEvMpLaechTOb9rvZZ xS94731xUpO1D946BUq8+Ba84WrygNEyNi8MPiEM0DsbOzhVO5z2ZRX9KdeftQGMTEhp vvm8/AD4oSPcYMFDlKoerfcdlW00aFNkurmKQQCPNhCxQzpMAvT/MZmDCU3ggvdEvZaj 9DKID9WBlGKIhwT82KgCNIF+OyiUTXDCA3NG5J/Ul7/Dqg8ti6Giaax8JVYlg5S6tSY2 jEqytlj7ZlIX387XJSi32R1M85l74yfVTPnZN5TxS9NI8Y2hb3Ofuk9kOVqk/IUEJn5y q1cg== X-Gm-Message-State: ALyK8tKCIoDYQqnu64QJs9lhUjOxhdz1BKxIkwtj/zHBJpBHiJni40Ys1yzguMi+TG4SdGyiz7OhYOupQhLhyQ== X-Received: by 10.157.36.227 with SMTP id z90mr8756114ota.124.1468167798732; Sun, 10 Jul 2016 09:23:18 -0700 (PDT) Original-Received: by 10.157.4.197 with HTTP; Sun, 10 Jul 2016 09:23:17 -0700 (PDT) In-Reply-To: <83bn25fst6.fsf@gnu.org> X-Google-Sender-Auth: QmVduBCeAo4RF9IifajUEX6tq4I X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2607:f8b0:4003:c06::235 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:205510 Archived-At: On Sun, Jul 10, 2016 at 10:53 AM, Eli Zaretskii wrote: >> From: Noam Postavsky >> Date: Sun, 10 Jul 2016 07:33:47 -0400 >> Cc: Eli Zaretskii , Michael Heerdegen , me@wilfred.me.uk, >> Emacs developers >> >> I have gcc 5.3.0 here, and I get 10 (correct) when I compile Emacs >> 24.5 configured with --enable-checking, but 20 (incorrect) without >> that flag. > > I've just built 24.5 with GCC 5.3.0 and without --enable-checking, and > I still don't see the problem in the resulting binary. Hmm, that's annoying. >> valgrind emacs-24.5/src/temacs -Q --batch -l nasty-move-end-of-line-batch.el >> [...] >> ==6167== Conditional jump or move depends on uninitialised value(s) >> ==6167== at 0x55E74E: CHECK_NUMBER_OR_FLOAT (lisp.h:2627) >> ==6167== by 0x5EC762: Fzerop (data.c:2387) > > I don't understand these errors. Please show the macro-expanded > source of Fzerop with that compiler and configuration options. I don't think Fzerop is especially relevant, AFAICT, the error just means Fzerop received an unitialized value as its first argument. The Emacs-25 error doesn't include Fzerop (because zerop is optimized to (= 0) I think). Lisp_Object Fzerop (Lisp_Object) ; static struct Lisp_Subr # 2383 "data.c" 3 4 _Alignas # 2383 "data.c" (8) Szerop = { { PVEC_SUBR << PSEUDOVECTOR_AREA_BITS }, { .a1 = Fzerop }, 1, 1, "zerop", 0, 0}; Lisp_Object Fzerop (register Lisp_Object number) { CHECK_NUMBER_OR_FLOAT (number); //// <<<<---- this is line 2387 if ((((enum Lisp_Type) ((number) & ~( # 2389 "data.c" 3 4 1 # 2389 "data.c" ? - (1 << 3) : (0x7fffffffffffffffL >> (3 - 1))))) == Lisp_Float)) { if (XFLOAT_DATA (number) == 0.0) return Qt; return Qnil; } if (!((number) >> INTTYPEBITS)) return Qt; return Qnil; }