From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Ken Brown Newsgroups: gmane.emacs.bugs Subject: bug#18438: 24.4.50; assertion failed in bidi.c Date: Sun, 19 Oct 2014 11:37:54 -0400 Message-ID: <5443DAD2.6090007@cornell.edu> References: <4745242cd3e424a6c4d5db0e8d3e33d0@amuri.net> <83h9zrlzc8.fsf@gnu.org> <54297FDB.6090606@cornell.edu> <837g0mmkf3.fsf@gnu.org> <6b19fab333f3d362ae61b30b299d7206@amuri.net> <83iok5ku74.fsf@gnu.org> <88ccbe34bf58322ae4b2a5657390c041@amuri.net> <83ppe1itu9.fsf@gnu.org> <837g08bdcy.fsf@gnu.org> <1c93d571dbd64d473e8c53ba59063425@amuri.net> <83k3416hlf.fsf@gnu.org> <02fd9e39e5724b113eb47ecef0408ae5@amuri.net> <83mw8w4gp6.fsf@gnu.org> <543FC3F6.9010101@cornell.edu> <83mw8scedk.fsf@gnu.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1413733166 22774 80.91.229.3 (19 Oct 2014 15:39:26 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sun, 19 Oct 2014 15:39:26 +0000 (UTC) Cc: 18438@debbugs.gnu.org, aidalgol@amuri.net To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sun Oct 19 17:39:20 2014 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1XfsZj-00078P-0k for geb-bug-gnu-emacs@m.gmane.org; Sun, 19 Oct 2014 17:39:19 +0200 Original-Received: from localhost ([::1]:40399 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XfsZi-0008Av-Db for geb-bug-gnu-emacs@m.gmane.org; Sun, 19 Oct 2014 11:39:18 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:59528) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XfsZZ-0008Ap-4B for bug-gnu-emacs@gnu.org; Sun, 19 Oct 2014 11:39:15 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XfsZT-0003IZ-7Z for bug-gnu-emacs@gnu.org; Sun, 19 Oct 2014 11:39:09 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:35568) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XfsZT-0003IU-3d for bug-gnu-emacs@gnu.org; Sun, 19 Oct 2014 11:39:03 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1XfsZS-0003Jw-D7 for bug-gnu-emacs@gnu.org; Sun, 19 Oct 2014 11:39:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Ken Brown Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 19 Oct 2014 15:39:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 18438 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: moreinfo Original-Received: via spool by 18438-submit@debbugs.gnu.org id=B18438.141373309812704 (code B ref 18438); Sun, 19 Oct 2014 15:39:02 +0000 Original-Received: (at 18438) by debbugs.gnu.org; 19 Oct 2014 15:38:18 +0000 Original-Received: from localhost ([127.0.0.1]:55899 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XfsYk-0003Iq-2F for submit@debbugs.gnu.org; Sun, 19 Oct 2014 11:38:18 -0400 Original-Received: from limerock01.mail.cornell.edu ([128.84.13.241]:44003) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XfsYh-0003Ib-K5 for 18438@debbugs.gnu.org; Sun, 19 Oct 2014 11:38:16 -0400 X-CornellRouted: This message has been Routed already. Original-Received: from authusersmtp.mail.cornell.edu (granite4.serverfarm.cornell.edu [10.16.197.9]) by limerock01.mail.cornell.edu (8.14.4/8.14.4_cu) with ESMTP id s9JFbuPJ006105; Sun, 19 Oct 2014 11:37:56 -0400 Original-Received: from [192.168.1.4] (cpe-67-249-176-138.twcny.res.rr.com [67.249.176.138]) (authenticated bits=0) by authusersmtp.mail.cornell.edu (8.14.4/8.12.10) with ESMTP id s9JFbtNG026898 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES128-SHA bits=128 verify=NOT); Sun, 19 Oct 2014 11:37:55 -0400 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:31.0) Gecko/20100101 Thunderbird/31.2.0 In-Reply-To: <83mw8scedk.fsf@gnu.org> X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x 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:94772 On 10/19/2014 10:39 AM, Eli Zaretskii wrote: > The rest of what the comments in w32_wnd_proc say is correct, but > again unrelated, for the same reasons. OK, thanks for checking. > In fact, I cannot explain to > myself at all how _any_ code that is not thread-safe could cause such > a phenomenon. I can think of no other explanations for what we see > except some code that somehow modifies the CPU flags between the > compare instruction and the following jump instruction. Otherwise, > how can it be that the value is valid, but Emacs still aborts? Any > other ideas? What about your earlier suggestion (from http://debbugs.gnu.org/cgi/bugreport.cgi?bug=18438#139) to force a 64-bit compare instruction for 'type', with the latter in a 64-bit register: === modified file 'src/bidi.c' --- src/bidi.c 2014-04-06 15:56:01 +0000 +++ src/bidi.c 2014-10-10 07:12:01 +0000 @@ -326,7 +326,14 @@ bidi_get_type (int ch, bidi_dir_t overri static void bidi_check_type (bidi_type_t type) { - eassert (UNKNOWN_BT <= type && type <= NEUTRAL_ON); + volatile ptrdiff_t qtype = type; + + if (!(suppress_checking || (UNKNOWN_BT <= qtype && qtype <= NEUTRAL_ON))) + { + fprintf (stderr, "\r\n%s:%d: bidi type %d is not in [%d..%d]\r\n", + __FILE__, __LINE__, type, UNKNOWN_BT, NEUTRAL_ON); + emacs_abort (); + } } /* Given a bidi TYPE of a character, return its category. */ Aidan, have you tried this yet? Ken