From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Dan Kruchinin Newsgroups: gmane.emacs.devel Subject: [BUG][PATCH] emacs23, make bootstrap failed on x86_64 systems Date: Fri, 04 Apr 2008 11:27:15 +0400 Message-ID: <47F5D853.5070700@gmail.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1207294123 10223 80.91.229.12 (4 Apr 2008 07:28:43 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 4 Apr 2008 07:28:43 +0000 (UTC) To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri Apr 04 09:29:15 2008 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1JhgMK-0007VO-2w for ged-emacs-devel@m.gmane.org; Fri, 04 Apr 2008 09:29:12 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JhgLh-0002RX-1w for ged-emacs-devel@m.gmane.org; Fri, 04 Apr 2008 03:28:33 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1JhgLd-0002RI-Cg for emacs-devel@gnu.org; Fri, 04 Apr 2008 03:28:29 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1JhgLa-0002R6-Us for emacs-devel@gnu.org; Fri, 04 Apr 2008 03:28:28 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JhgLa-0002R3-Pp for emacs-devel@gnu.org; Fri, 04 Apr 2008 03:28:26 -0400 Original-Received: from mx20.gnu.org ([199.232.41.8]) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1JhgLa-0007XH-ET for emacs-devel@gnu.org; Fri, 04 Apr 2008 03:28:26 -0400 Original-Received: from ug-out-1314.google.com ([66.249.92.170]) by mx20.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1JhgLY-0002oz-W4 for emacs-devel@gnu.org; Fri, 04 Apr 2008 03:28:25 -0400 Original-Received: by ug-out-1314.google.com with SMTP id a2so937784ugf.48 for ; Fri, 04 Apr 2008 00:28:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:user-agent:mime-version:to:subject:content-type:content-transfer-encoding; bh=NHkcexdiMuaoOk1MbClqlr1Khw3LdIK+IMJUq4G1sRg=; b=TTmYKqVpiE4wS+4bjRAKvxs5hWuEWXopMStyBaHN5DGf09QZqw9TvZDTqm0HnCVMrrGYNMzThavdszlcok4yilKxBw2UV/IrPfv51f/kg5auBHGYvAYOOXyp30fl9NIb7I8ozrUO7zSx4g9ywAsW8r7Gw/vs8NMQAUaalcnCgl4= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:user-agent:mime-version:to:subject:content-type:content-transfer-encoding; b=tcRw8x3yyaa6FKnRPBiWQPB6Hrf6UelBd5oeFbhsUbf+TwNDLnul1oQiMXqzCWBlxAIjZqCizE/s9KQrUfIuwUHI6aVbmX3IRMhhOWDYmOJ11r/pO65bMk7KuGxIMutEe0qmu9/hwkuoKD33Y3vT11mNPTFQXMCnyyQ36jq17Q4= Original-Received: by 10.66.241.13 with SMTP id o13mr536614ugh.57.1207294101303; Fri, 04 Apr 2008 00:28:21 -0700 (PDT) Original-Received: from ?192.168.1.103? ( [77.241.34.239]) by mx.google.com with ESMTPS id j1sm8902784ugf.74.2008.04.04.00.28.19 (version=SSLv3 cipher=RC4-MD5); Fri, 04 Apr 2008 00:28:20 -0700 (PDT) User-Agent: Mozilla-Thunderbird 2.0.0.9 (X11/20080109) X-detected-kernel: by mx20.gnu.org: Linux 2.6 (newer, 2) X-detected-kernel: by monty-python.gnu.org: Linux 2.6, seldom 2.4 (older, 4) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:94304 Archived-At: Hi all. There is a problem with making bootstrap on emacs23 from cvs: Emacs hangups during the byte compilation of *.el files. The reason of this problem is an infinite loop that occurs while emacs is trying to compile calendar/cal-china.el. cal-china.el requires cal-dst.el which contains the following code: --- (defun calendar-current-time-zone () "quite long doc-string(skipped)" (unless calendar-current-time-zone-cache (setq calendar-current-time-zone-cache (calendar-dst-find-data)))) (calendar-current-time-zone) --- After emacs sees direct function call in the required file, it tries to evaluate met function. It evaluates most of code quite well except of those that was modified in the revision #1.42. It's a loop that executes until 'current-time-zone' function will not return nil. This can happen only if its arguments(integers) are too big, i.e. if lisp_time_argument function will return 'false'. But it'll never return false on _LP64 systems(on which EMACS_INT is long and sizeof(long) == 8), because it uses low bitwise operations expecting that sizeof(EMACS_INT) == 4: --- src/editfns.c: lisp_time_argument --- *result = (XINT (high) << 16) + (XINT (low) & 0xffff); return *result >> 16 == XINT (high); --- Here is a quick'n'dirty patch to fix this problem (src/editfns.c, revision #1.458): ---patch--- --- src/editfns.c 2008-04-04 11:15:28.000000000 +0400 +++ src/editfns.c.patched 2008-04-04 10:37:16.000000000 +0400 @@ -1519,6 +1519,7 @@ else { Lisp_Object high, low; + int half_word = BITS_PER_EMACS_INT >> 1; high = Fcar (specified_time); CHECK_NUMBER (high); low = Fcdr (specified_time); @@ -1542,8 +1543,8 @@ else if (usec) *usec = 0; CHECK_NUMBER (low); - *result = (XINT (high) << 16) + (XINT (low) & 0xffff); - return *result >> 16 == XINT (high); + *result = (XINT (high) << half_word) + (XINT (low) & (INTMASK >> half_word)); + return *result >> half_word == XINT (high); } } ---------------- W.B.R. Dan Kruchinin.