From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Dan =?UTF-8?Q?Hor=C3=A1k?= Newsgroups: gmane.emacs.bugs Subject: bug#10780: 24.0.93 fails to build with 'Invalid function: "DEAD"' Date: Tue, 21 Feb 2012 10:32:19 +0100 Message-ID: <1329816739.3029.13.camel@eagle.danny.cz> References: <4F3B5DA0.8090309@cs.ucla.edu> <1329291553.3029.10.camel@eagle.danny.cz> <4F3B77B1.4010000@cs.ucla.edu> <4F42D3DF.7010303@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 1329816794 10714 80.91.229.3 (21 Feb 2012 09:33:14 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Tue, 21 Feb 2012 09:33:14 +0000 (UTC) Cc: 10780@debbugs.gnu.org, Andreas Schwab To: Paul Eggert Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Tue Feb 21 10:33:12 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 1Rzm5s-0002YM-AF for geb-bug-gnu-emacs@m.gmane.org; Tue, 21 Feb 2012 10:33:08 +0100 Original-Received: from localhost ([::1]:47806 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Rzm5r-0005a1-8u for geb-bug-gnu-emacs@m.gmane.org; Tue, 21 Feb 2012 04:33:07 -0500 Original-Received: from eggs.gnu.org ([140.186.70.92]:45992) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Rzm5h-0005Zo-KQ for bug-gnu-emacs@gnu.org; Tue, 21 Feb 2012 04:33:05 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Rzm5X-0000u8-Kr for bug-gnu-emacs@gnu.org; Tue, 21 Feb 2012 04:32:57 -0500 Original-Received: from debbugs.gnu.org ([140.186.70.43]:44574) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Rzm5X-0000u4-I3 for bug-gnu-emacs@gnu.org; Tue, 21 Feb 2012 04:32:47 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.72) (envelope-from ) id 1Rzm7i-0007HE-6H for bug-gnu-emacs@gnu.org; Tue, 21 Feb 2012 04:35:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Dan =?UTF-8?Q?Hor=C3=A1k?= Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 21 Feb 2012 09:35: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.132981689427950 (code B ref 10780); Tue, 21 Feb 2012 09:35:02 +0000 Original-Received: (at 10780) by debbugs.gnu.org; 21 Feb 2012 09:34:54 +0000 Original-Received: from localhost ([127.0.0.1]:48197 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1Rzm7V-0007Gc-Hs for submit@debbugs.gnu.org; Tue, 21 Feb 2012 04:34:53 -0500 Original-Received: from hroch-dve-ctyri.core.ignum.cz ([217.31.49.204]:33325) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1Rzm7P-0007GB-IP for 10780@debbugs.gnu.org; Tue, 21 Feb 2012 04:34:48 -0500 Original-Received: from freza3.core.ignum.cz (unknown [192.168.1.154]) by hroch.core.ignum.cz (Postfix) with ESMTP id 2E74A11F7E36; Tue, 21 Feb 2012 10:32:14 +0100 (CET) Original-Received: from freza3.core.ignum.cz (localhost [127.0.0.1]) by freza3.core.ignum.cz (Postfix) with ESMTP id 1DDE0A172; Tue, 21 Feb 2012 10:32:19 +0100 (CET) Original-Received: from [192.168.160.10] (72.155.broadband6.iol.cz [88.101.155.72]) by freza3.core.ignum.cz (Postfix) with ESMTPA id CA59AA14E; Tue, 21 Feb 2012 10:32:18 +0100 (CET) In-Reply-To: <4F42D3DF.7010303@cs.ucla.edu> X-Mailer: Evolution 3.2.3 (3.2.3-1.fc16) X-Virus-Scanned: ClamAV using ClamSMTP 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:57042 Archived-At: Paul Eggert p=C3=AD=C5=A1e v Po 20. 02. 2012 v 15:14 -0800:=20 > On 02/15/2012 02:09 AM, Andreas Schwab wrote: >=20 > > What about local variables in registers? They are split between two > > registers, but mark_stack does not handle that. >=20 > True. Teerrroooo. Thanks for diagnosing that. >=20 > 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. yes, this change fixed the issue for me. Thanks to all involved. >=20 > 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 >=20 > +#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 va= rs. */ > # 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 = pointer, > + 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 >=20 > @@ -309,11 +321,6 @@ > Lisp_Fwd_Kboard_Obj, /* Fwd to a Lisp_Object field of kboards. */ > }; >=20 > -/* 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 >=20 > #ifndef WORDS_BIGENDIAN >=20 > =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 >=20 > 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) \ >=20 >=20