From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Paul Eggert Newsgroups: gmane.emacs.bugs Subject: bug#10780: 24.0.93 fails to build with 'Invalid function: "DEAD"' Date: Mon, 20 Feb 2012 15:14:39 -0800 Organization: UCLA Computer Science Department Message-ID: <4F42D3DF.7010303@cs.ucla.edu> References: <4F3B5DA0.8090309@cs.ucla.edu> <1329291553.3029.10.camel@eagle.danny.cz> <4F3B77B1.4010000@cs.ucla.edu> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Trace: dough.gmane.org 1329779698 6382 80.91.229.3 (20 Feb 2012 23:14:58 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Mon, 20 Feb 2012 23:14:58 +0000 (UTC) Cc: 10780@debbugs.gnu.org, Andreas Schwab To: Dan =?UTF-8?Q?Hor=C3=A1k?= Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Tue Feb 21 00:14:55 2012 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([140.186.70.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1RzcRb-0006Ds-D1 for geb-bug-gnu-emacs@m.gmane.org; Tue, 21 Feb 2012 00:14:55 +0100 Original-Received: from localhost ([::1]:58748 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RzcRa-00061g-EE for geb-bug-gnu-emacs@m.gmane.org; Mon, 20 Feb 2012 18:14:54 -0500 Original-Received: from eggs.gnu.org ([140.186.70.92]:38766) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RzcRW-00061Q-Vq for bug-gnu-emacs@gnu.org; Mon, 20 Feb 2012 18:14:52 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RzcRV-0001yk-OW for bug-gnu-emacs@gnu.org; Mon, 20 Feb 2012 18:14:50 -0500 Original-Received: from debbugs.gnu.org ([140.186.70.43]:44224) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RzcRV-0001yZ-J8 for bug-gnu-emacs@gnu.org; Mon, 20 Feb 2012 18:14:49 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.72) (envelope-from ) id 1RzcTe-0004Cs-8X for bug-gnu-emacs@gnu.org; Mon, 20 Feb 2012 18:17:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Paul Eggert Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 20 Feb 2012 23:17:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 10780 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 10780-submit@debbugs.gnu.org id=B10780.132977979516128 (code B ref 10780); Mon, 20 Feb 2012 23:17:02 +0000 Original-Received: (at 10780) by debbugs.gnu.org; 20 Feb 2012 23:16:35 +0000 Original-Received: from localhost ([127.0.0.1]:47847 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1RzcTC-0004C5-OL for submit@debbugs.gnu.org; Mon, 20 Feb 2012 18:16:35 -0500 Original-Received: from smtp.cs.ucla.edu ([131.179.128.62]:39037) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1RzcT9-0004Br-RG for 10780@debbugs.gnu.org; Mon, 20 Feb 2012 18:16:33 -0500 Original-Received: from localhost (localhost.localdomain [127.0.0.1]) by smtp.cs.ucla.edu (Postfix) with ESMTP id AFF5D39E800A; Mon, 20 Feb 2012 15:14:12 -0800 (PST) X-Virus-Scanned: amavisd-new at smtp.cs.ucla.edu Original-Received: from smtp.cs.ucla.edu ([127.0.0.1]) by localhost (smtp.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id SEi-Klh7ygjC; Mon, 20 Feb 2012 15:14:12 -0800 (PST) Original-Received: from [192.168.1.10] (pool-71-189-109-235.lsanca.fios.verizon.net [71.189.109.235]) by smtp.cs.ucla.edu (Postfix) with ESMTPSA id DF03339E8008; Mon, 20 Feb 2012 15:14:11 -0800 (PST) User-Agent: Mozilla/5.0 (X11; Linux i686; rv:10.0.2) Gecko/20120216 Thunderbird/10.0.2 In-Reply-To: X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) X-Received-From: 140.186.70.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:57036 Archived-At: On 02/15/2012 02:09 AM, Andreas Schwab wrote: > What about local variables in registers? They are split between two > registers, but mark_stack does not handle that. True. Teerrroooo. Thanks for diagnosing that. I pushed the following fix into the trunk. It's needed regardless of this particular bug. Dan, can you please check whether it indeed fixes the bug for you? Thanks. Fix crash due to non-contiguous EMACS_INT (Bug#10780). * lisp.h (VALBITS): Move definition up, so that USE_LSB_TAG can use it. (USE_LSB_TAG): Do not define if UINTPTR_MAX >> VALBITS =3D=3D 0. It's useless in that case, and it can cause problems on hosts that allocate halves of EMACS_INT values separately. Reported by Dan Hor=C3=A1k. Diagnosed by Andreas Schwab in . * mem-limits.h (EXCEEDS_LISP_PTR): Define to 0 on hosts where UINTPTR_MAX >> VALBITS =3D=3D 0. This is required by the above change; it avoids undefined behavior on hosts where shifting right by more than the word width has undefined behavior. =3D=3D=3D modified file 'src/lisp.h' --- src/lisp.h 2012-01-19 07:21:25 +0000 +++ src/lisp.h 2012-02-20 16:27:49 +0000 @@ -168,6 +168,10 @@ #define GCTYPEBITS 3 #endif +#ifndef VALBITS +#define VALBITS (BITS_PER_EMACS_INT - GCTYPEBITS) +#endif + #ifndef NO_DECL_ALIGN # ifndef DECL_ALIGN # if HAVE_ATTRIBUTE_ALIGNED @@ -191,7 +195,15 @@ || defined DARWIN_OS || defined __sun) /* We also need to be able to specify mult-of-8 alignment on static vars= . */ # if defined DECL_ALIGN -# define USE_LSB_TAG +/* mark_maybe_object assumes that EMACS_INT values are contiguous, + but this is not true on some hosts where EMACS_INT is wider than a po= inter, + as they may allocate the halves of an EMACS_INT separately. + On these hosts USE_LSB_TAG is not needed because the top bits of an + EMACS_INT are unused, so define USE_LSB_TAG only on hosts where it + might be useful. */ +# if UINTPTR_MAX >> VALBITS !=3D 0 +# define USE_LSB_TAG +# endif # endif #endif @@ -309,11 +321,6 @@ Lisp_Fwd_Kboard_Obj, /* Fwd to a Lisp_Object field of kboards. */ }; -/* These values are overridden by the m- file on some machines. */ -#ifndef VALBITS -#define VALBITS (BITS_PER_EMACS_INT - GCTYPEBITS) -#endif - #ifdef USE_LISP_UNION_TYPE #ifndef WORDS_BIGENDIAN =3D=3D=3D modified file 'src/mem-limits.h' --- src/mem-limits.h 2012-01-19 07:21:25 +0000 +++ src/mem-limits.h 2012-02-20 22:53:46 +0000 @@ -34,7 +34,7 @@ #endif extern char *start_of_data (void); -#if defined USE_LSB_TAG +#if defined USE_LSB_TAG || UINTPTR_MAX >> VALBITS =3D=3D 0 #define EXCEEDS_LISP_PTR(ptr) 0 #elif defined DATA_SEG_BITS #define EXCEEDS_LISP_PTR(ptr) \