unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Paul Eggert <eggert@cs.ucla.edu>
To: Eli Zaretskii <eliz@gnu.org>
Cc: 29040@debbugs.gnu.org
Subject: bug#29040: Emacs 25 hangs on windows arbitrarily during search of a unicode file
Date: Fri, 3 Nov 2017 02:25:17 -0700	[thread overview]
Message-ID: <367b0f8e-a575-7230-055e-88594d9ff356@cs.ucla.edu> (raw)
In-Reply-To: <83bmkjwxsx.fsf@gnu.org>

[-- Attachment #1: Type: text/plain, Size: 291 bytes --]

Eli Zaretskii wrote:
>    globals.h:1095:10: error: requested alignment is not an integer constant
>       struct Lisp_Symbol GCALIGNED s;
> 	    ^


Ouch, I had thought that only older MSVC had the problem. Sorry about that. I 
installed the attached into emacs-26 and merged it to master.

[-- Attachment #2: 0001-Change-GCALIGNMENT-back-to-an-integer-literal.patch --]
[-- Type: text/x-patch, Size: 1438 bytes --]

From c911b27aff8dd15cd47a063dc958e6dae74dde06 Mon Sep 17 00:00:00 2001
From: Paul Eggert <eggert@cs.ucla.edu>
Date: Fri, 3 Nov 2017 02:20:15 -0700
Subject: [PATCH] Change GCALIGNMENT back to an integer literal

* src/lisp.h (GCALIGNMENT): Change it back to a macro
that expands to a literal integer constant, for older GCC.
I had mistakenly thought that only MSVC had the problem.
Problem repored by Eli Zaretskii (Bug#29040#69).
---
 src/lisp.h | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/src/lisp.h b/src/lisp.h
index a71ba22..4dd4720 100644
--- a/src/lisp.h
+++ b/src/lisp.h
@@ -233,7 +233,9 @@ extern bool suppress_checking EXTERNALLY_VISIBLE;
 
 enum Lisp_Bits
   {
-    GCALIGNMENT = 1 << GCTYPEBITS,
+    /* 2**GCTYPEBITS.  This must be a macro that expands to a literal
+       integer constant, for older versions of GCC (through at least 4.9).  */
+#define GCALIGNMENT 8
 
     /* Number of bits in a Lisp_Object value, not counting the tag.  */
     VALBITS = EMACS_INT_WIDTH - GCTYPEBITS,
@@ -245,6 +247,10 @@ enum Lisp_Bits
     FIXNUM_BITS = VALBITS + 1
   };
 
+#if GCALIGNMENT != 1 << GCTYPEBITS
+# error "GCALIGNMENT and GCTYPEBITS are inconsistent"
+#endif
+
 /* The maximum value that can be stored in a EMACS_INT, assuming all
    bits other than the type bits contribute to a nonnegative signed value.
    This can be used in #if, e.g., '#if USE_LSB_TAG' below expands to an
-- 
2.7.4


  reply	other threads:[~2017-11-03  9:25 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-10-28 13:40 bug#29040: emacs-26 crash due to misaligned longjmp buffer in 64-bit MSYS2/MinGW-W64 build Richard Copley
2017-10-28 13:55 ` Eli Zaretskii
2017-10-28 14:10 ` bug#29040: Trouble with misaligned jmp_buf in 64-bit MinGW-64 runtime, in Emacs 26 Richard Copley
2017-11-02  6:02 ` bug#29040: Emacs 25 hangs on windows arbitrarily during search of a unicode file Paul Eggert
2017-11-02  7:43   ` Richard Copley
2017-11-02 11:10     ` Noam Postavsky
2017-11-02 15:50   ` Eli Zaretskii
2017-11-02 20:35     ` Paul Eggert
2017-11-02 20:46       ` Eli Zaretskii
2017-11-03  5:03         ` Paul Eggert
2017-11-03  8:37           ` Eli Zaretskii
2017-11-03  8:48             ` Paul Eggert
2017-11-03  8:50           ` Eli Zaretskii
2017-11-03  9:25             ` Paul Eggert [this message]
2017-11-03 10:02               ` Eli Zaretskii
     [not found] <CAGdT1gr9mOiB7Vcx+adyknAfpvTiUSZuxZzAXJo7ivh91HMgww@mail.gmail.com>
     [not found] ` <837evrerok.fsf@gnu.org>
     [not found]   ` <CAPM58ojq+XSimHbAF8kt=0GBPTfX+9XkWdkfj0cJ_EPz-=Y_-A@mail.gmail.com>
     [not found]     ` <83mv4b5x0y.fsf@gnu.org>
     [not found]       ` <CAPM58oj0xajqLUowznia7z=d6yL7Qk4AqbaL9KzKnJw7EXPY=w@mail.gmail.com>
     [not found]         ` <83inez5uta.fsf@gnu.org>
     [not found]           ` <CAPM58oj9AnC90N+NiS4z_wP3EO5Xz3QtgdZUONqXLyhYR94NPA@mail.gmail.com>
     [not found]             ` <CAPM58oj6HBWkv0K=M0iy1xVPqQ0JTtFCEAZG8oW2SMrO8-XkcA@mail.gmail.com>
     [not found]               ` <83fua35tem.fsf@gnu.org>
2017-10-28 13:56                 ` Richard Copley
2017-10-28 14:14                   ` Eli Zaretskii
2017-10-28 15:58                     ` Eli Zaretskii
2017-10-28 16:16                       ` Richard Copley
2017-10-28 16:41                         ` Eli Zaretskii
2017-10-29 18:10                           ` Richard Copley
2017-11-01 19:16                             ` Richard Copley
2017-11-02  7:39                               ` Richard Copley

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=367b0f8e-a575-7230-055e-88594d9ff356@cs.ucla.edu \
    --to=eggert@cs.ucla.edu \
    --cc=29040@debbugs.gnu.org \
    --cc=eliz@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).