From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Richard Copley Newsgroups: gmane.emacs.bugs Subject: bug#29040: Emacs 25 hangs on windows arbitrarily during search of a unicode file Date: Sat, 28 Oct 2017 17:16:14 +0100 Message-ID: References: <837evrerok.fsf@gnu.org> <83mv4b5x0y.fsf@gnu.org> <83inez5uta.fsf@gnu.org> <83fua35tem.fsf@gnu.org> <83d1575phl.fsf@gnu.org> <83a80b5knv.fsf@gnu.org> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" X-Trace: blaine.gmane.org 1509207443 18672 195.159.176.226 (28 Oct 2017 16:17:23 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Sat, 28 Oct 2017 16:17:23 +0000 (UTC) Cc: 29040@debbugs.gnu.org To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sat Oct 28 18:17:17 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 1e8TnE-0002lR-Rn for geb-bug-gnu-emacs@m.gmane.org; Sat, 28 Oct 2017 18:17:05 +0200 Original-Received: from localhost ([::1]:33360 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1e8TnM-0005BC-9s for geb-bug-gnu-emacs@m.gmane.org; Sat, 28 Oct 2017 12:17:12 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:60282) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1e8TnG-0005A2-1i for bug-gnu-emacs@gnu.org; Sat, 28 Oct 2017 12:17:07 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1e8TnC-0000T5-2n for bug-gnu-emacs@gnu.org; Sat, 28 Oct 2017 12:17:06 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:58936) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1e8TnB-0000Su-VH for bug-gnu-emacs@gnu.org; Sat, 28 Oct 2017 12:17:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1e8TnB-0008NG-Lx for bug-gnu-emacs@gnu.org; Sat, 28 Oct 2017 12:17:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Richard Copley Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 28 Oct 2017 16:17:01 +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.150920741232164 (code B ref 29040); Sat, 28 Oct 2017 16:17:01 +0000 Original-Received: (at 29040) by debbugs.gnu.org; 28 Oct 2017 16:16:52 +0000 Original-Received: from localhost ([127.0.0.1]:39384 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1e8Tn2-0008Mh-0N for submit@debbugs.gnu.org; Sat, 28 Oct 2017 12:16:52 -0400 Original-Received: from mail-oi0-f44.google.com ([209.85.218.44]:54974) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1e8Tn0-0008MR-PW for 29040@debbugs.gnu.org; Sat, 28 Oct 2017 12:16:51 -0400 Original-Received: by mail-oi0-f44.google.com with SMTP id a132so15243612oih.11 for <29040@debbugs.gnu.org>; Sat, 28 Oct 2017 09:16:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=BJbpldwBY9vKLMCRrWvdhuGkHjHBzHfYDlrIC6Ue2RA=; b=JTkeBjmXXYjLGrwoXiBQ8xEznc3+scK0lYYaW9dqrqRJfEfc0cvyHQB7hZ5XMURwZO V2raab5qzs+WVL7W8zGzxMhhWNFGEkf1YHNdsT+nC2owwU9/ahmiOZiaVbaYKvdsi0UN CXbBQ5gVYQRROmkrJ843x7BQMTWm2otJuh2P3gdnQFGarBIo1v9urt4m5HOlLdOZn3P6 28PDow6uT1uPiGTUDcXVDb0uLPMg6NvLwgjEL2AqJLgHfTy7L2g2gC2u3BgdbWn7RQE3 mRoUNm9DB6HxeHohXhgb9CwAStTTcdCRTQMDoVj7v1U897TeT5r0YQDuwznYdG1p2XqN uDzQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=BJbpldwBY9vKLMCRrWvdhuGkHjHBzHfYDlrIC6Ue2RA=; b=ogOwhYoLuAv4ATw1GWDgdZvA1h6ci8V9KvzOy9d5x/OXsNeYatLBNIeBCxCk1YvMTB cV0n+Z+JwFiq7D42YV1pg9/h376ANYYkFZMJtFgTh5zmyGt7+6bj2R4zNpUw/dIoPJqv GfvXVLvkQy8oRQOE3AgK6C6LswVdP918CdEnZDCrkHz0StFuQ35Q8NEPevcENXHMj0rc OqHsyqRsBTV10HN9FrAHBjT8A4wQKTqj67PgSB2XyY3tg/sff6lAJRqJ1pj2Pqwz7lxf CbcA89riQbRtWUf9Z9sLRdL4gUyaWF1WCo6vQrq7c1xnkBw2Oj0AStql+zWfyqUIQhsU QfAA== X-Gm-Message-State: AMCzsaWhvgdtVe9UcwJ/BmY4nTLEtDCelN9QIo/V7vpyebiTxdfUK2KB QErNvU7bPbijKfINEzCvWs8FPAPsI4XjVJ468mZJghU4 X-Google-Smtp-Source: ABhQp+ScS/8wSgKdzihWPRsi5VqjrhsooIiLbXT1UhdsAeyuqf0N2DGwS7rfjDm/C3NQVsBLbVvj7SuKBXOOOqlTjCE= X-Received: by 10.157.48.124 with SMTP id w57mr2431945otd.440.1509207404739; Sat, 28 Oct 2017 09:16:44 -0700 (PDT) Original-Received: by 10.157.64.8 with HTTP; Sat, 28 Oct 2017 09:16:14 -0700 (PDT) In-Reply-To: <83a80b5knv.fsf@gnu.org> 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:139114 Archived-At: On 28 October 2017 at 16:58, Eli Zaretskii wrote: >> 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; Looks good. There's no crash and getcjmp is aligned: Thread 1 hit Breakpoint 3, quit_throw_to_read_char ( from_signal=from_signal@entry=false) at keyboard.c:10548 10548 sys_longjmp (getcjmp, 1); (gdb) p &getcjmp $1 = (sys_jmp_buf *) 0x4005cdaf0 My message to MinGW-W64 was held up for moderation. I have cancelled it. Thanks.