From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#29040: Emacs 25 hangs on windows arbitrarily during search of a unicode file Date: Sat, 28 Oct 2017 18:58:28 +0300 Message-ID: <83a80b5knv.fsf@gnu.org> References: <837evrerok.fsf@gnu.org> <83mv4b5x0y.fsf@gnu.org> <83inez5uta.fsf@gnu.org> <83fua35tem.fsf@gnu.org> <83d1575phl.fsf@gnu.org> Reply-To: Eli Zaretskii NNTP-Posting-Host: blaine.gmane.org X-Trace: blaine.gmane.org 1509206382 23667 195.159.176.226 (28 Oct 2017 15:59:42 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Sat, 28 Oct 2017 15:59:42 +0000 (UTC) Cc: 29040@debbugs.gnu.org To: rcopley@gmail.com Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sat Oct 28 17:59:37 2017 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1e8TWF-0004wJ-8L for geb-bug-gnu-emacs@m.gmane.org; Sat, 28 Oct 2017 17:59:31 +0200 Original-Received: from localhost ([::1]:33177 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1e8TWM-0006i9-Jh for geb-bug-gnu-emacs@m.gmane.org; Sat, 28 Oct 2017 11:59:38 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:57044) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1e8TVs-0006UM-3F for bug-gnu-emacs@gnu.org; Sat, 28 Oct 2017 11:59:09 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1e8TVn-0000R0-8Y for bug-gnu-emacs@gnu.org; Sat, 28 Oct 2017 11:59:08 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:58924) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1e8TVn-0000Qq-5J for bug-gnu-emacs@gnu.org; Sat, 28 Oct 2017 11:59:03 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1e8TVm-0007ua-LW for bug-gnu-emacs@gnu.org; Sat, 28 Oct 2017 11:59:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 28 Oct 2017 15:59:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 29040 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 29040-submit@debbugs.gnu.org id=B29040.150920633230383 (code B ref 29040); Sat, 28 Oct 2017 15:59:02 +0000 Original-Received: (at 29040) by debbugs.gnu.org; 28 Oct 2017 15:58:52 +0000 Original-Received: from localhost ([127.0.0.1]:39371 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1e8TVc-0007tz-49 for submit@debbugs.gnu.org; Sat, 28 Oct 2017 11:58:52 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:37786) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1e8TVa-0007tk-A1 for 29040@debbugs.gnu.org; Sat, 28 Oct 2017 11:58:50 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1e8TVQ-00008P-CX for 29040@debbugs.gnu.org; Sat, 28 Oct 2017 11:58:45 -0400 Original-Received: from fencepost.gnu.org ([2001:4830:134:3::e]:50037) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1e8TVQ-00007z-8B; Sat, 28 Oct 2017 11:58:40 -0400 Original-Received: from [176.228.60.248] (port=1059 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1e8TVO-0000Km-2v; Sat, 28 Oct 2017 11:58:39 -0400 In-reply-to: <83d1575phl.fsf@gnu.org> (message from Eli Zaretskii on Sat, 28 Oct 2017 17:14:14 +0300) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 208.118.235.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" Xref: news.gmane.org gmane.emacs.bugs:139112 Archived-At: > Date: Sat, 28 Oct 2017 17:14:14 +0300 > From: Eli Zaretskii > Cc: 29040@debbugs.gnu.org > > I'm not saying that this is a GCC bug. But maybe you are right, and > the changes in d7038020 exposed this problem. Actually, I think it was caused by 015f0bb. Does the patch below fix the problem? Please actually check the alignment of getcjmp, not just that the crashes went away. diff --git a/src/thread.c b/src/thread.c index 6f12d79..2520771 100644 --- a/src/thread.c +++ b/src/thread.c @@ -26,7 +26,11 @@ along with GNU Emacs. If not, see . */ #include "coding.h" #include "syssignal.h" -static struct thread_state alignas (GCALIGNMENT) main_thread; +#define COMMON_MULTIPLE(a, b) \ + ((a) % (b) == 0 ? (a) : (b) % (a) == 0 ? (b) : (a) * (b)) +#define THREAD_ALIGNMENT COMMON_MULTIPLE (alignof (max_align_t), GCALIGNMENT) + +static struct thread_state alignas (THREAD_ALIGNMENT) main_thread; struct thread_state *current_thread = &main_thread;