From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.devel Subject: Re: Certain numbers of special forms cause changing behaviour on function calls in --batch Date: Sun, 10 Jul 2016 19:45:51 +0300 Message-ID: <83vb0de91c.fsf@gnu.org> 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> Reply-To: Eli Zaretskii NNTP-Posting-Host: plane.gmane.org X-Trace: ger.gmane.org 1468169188 11603 80.91.229.3 (10 Jul 2016 16:46:28 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sun, 10 Jul 2016 16:46:28 +0000 (UTC) Cc: michael_heerdegen@web.de, yasushi.shoji@gmail.com, me@wilfred.me.uk, emacs-devel@gnu.org To: Noam Postavsky Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sun Jul 10 18:46:13 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 1bMHrv-0004rs-Ol for ged-emacs-devel@m.gmane.org; Sun, 10 Jul 2016 18:46:11 +0200 Original-Received: from localhost ([::1]:55935 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bMHrv-0005xi-0j for ged-emacs-devel@m.gmane.org; Sun, 10 Jul 2016 12:46:11 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:59751) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bMHrp-0005l6-6Q for emacs-devel@gnu.org; Sun, 10 Jul 2016 12:46:06 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bMHrj-0005lo-Ee for emacs-devel@gnu.org; Sun, 10 Jul 2016 12:46:04 -0400 Original-Received: from fencepost.gnu.org ([2001:4830:134:3::e]:58401) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bMHrj-0005lb-Az; Sun, 10 Jul 2016 12:45:59 -0400 Original-Received: from 84.94.185.246.cable.012.net.il ([84.94.185.246]:3104 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_128_CBC_SHA1:128) (Exim 4.82) (envelope-from ) id 1bMHrh-0005h5-5S; Sun, 10 Jul 2016 12:45:57 -0400 In-reply-to: (message from Noam Postavsky on Sun, 10 Jul 2016 12:23:17 -0400) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:4830:134:3::e 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:205511 Archived-At: > From: Noam Postavsky > Date: Sun, 10 Jul 2016 12:23:17 -0400 > Cc: Yasushi SHOJI , Michael Heerdegen , me@wilfred.me.uk, > Emacs developers > > 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. This whole issue is 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. Sorry, I;m not following: Fzerop is called from Ffuncall, i.e. from Lisp, so how can the value of Fzerop's argument be uninitialized? What am I missing? > 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; > } That's what I see, thanks. Very strange, this error from valgrind. And we are none the wiser.