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: Fri, 10 Oct 2014 21:57:24 -0400 Message-ID: <54388E84.7020403@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> <5437E50A.20108@cornell.edu> <83tx3c9cwf.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 1412992720 336 80.91.229.3 (11 Oct 2014 01:58:40 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 11 Oct 2014 01:58:40 +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 Sat Oct 11 03:58:21 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 1Xclwp-0008T8-F3 for geb-bug-gnu-emacs@m.gmane.org; Sat, 11 Oct 2014 03:58:19 +0200 Original-Received: from localhost ([::1]:51935 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Xclwo-0007rP-Jj for geb-bug-gnu-emacs@m.gmane.org; Fri, 10 Oct 2014 21:58:18 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:54867) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Xclwf-0007rE-HC for bug-gnu-emacs@gnu.org; Fri, 10 Oct 2014 21:58:15 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XclwZ-0001kj-AG for bug-gnu-emacs@gnu.org; Fri, 10 Oct 2014 21:58:09 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:49076) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XclwZ-0001kf-7E for bug-gnu-emacs@gnu.org; Fri, 10 Oct 2014 21:58:03 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1XclwY-000166-Cn for bug-gnu-emacs@gnu.org; Fri, 10 Oct 2014 21:58: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: Sat, 11 Oct 2014 01:58: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.14129926614187 (code B ref 18438); Sat, 11 Oct 2014 01:58:02 +0000 Original-Received: (at 18438) by debbugs.gnu.org; 11 Oct 2014 01:57:41 +0000 Original-Received: from localhost ([127.0.0.1]:40640 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XclwC-00015S-FQ for submit@debbugs.gnu.org; Fri, 10 Oct 2014 21:57:40 -0400 Original-Received: from limerock01.mail.cornell.edu ([128.84.13.241]:57024) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Xclw9-00015K-RB for 18438@debbugs.gnu.org; Fri, 10 Oct 2014 21:57:38 -0400 X-CornellRouted: This message has been Routed already. Original-Received: from authusersmtp.mail.cornell.edu (granite3.serverfarm.cornell.edu [10.16.197.8]) by limerock01.mail.cornell.edu (8.14.4/8.14.4_cu) with ESMTP id s9B1vNEX032580; Fri, 10 Oct 2014 21:57:24 -0400 Original-Received: from [192.168.1.10] (cpe-67-249-176-226.twcny.res.rr.com [67.249.176.226]) (authenticated bits=0) by authusersmtp.mail.cornell.edu (8.14.4/8.12.10) with ESMTP id s9B1vMCo009591 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES128-SHA bits=128 verify=NOT); Fri, 10 Oct 2014 21:57:23 -0400 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:31.0) Gecko/20100101 Thunderbird/31.1.2 In-Reply-To: <83tx3c9cwf.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:94401 On 10/10/2014 11:12 AM, Eli Zaretskii wrote: > Something vague about the upper 32 bits of the 64-bit registers. > (Yes, I'm desperate.) I'm desperate too. Here's another thought: Suppose this really is a thread-safety issue in some way that we don't understand. Then maybe the problem is that the test 'type <= 23' is not atomic in the compilation that Aidan and I have been doing. First 'type' is copied from ECX to RBP+0x10, then the latter is tested. We could make it atomic by forcing GCC to directly test ECX <= 23. We can do this by compiling with -Og instead of -O0. (Aidan and I have both been using -O0.) The resulting disassembly (based on your earlier patch, in http://debbugs.gnu.org/cgi/bugreport.cgi?bug=18438#103) is Dump of assembler code for function bidi_check_type: 0x00000001004ee9db <+0>: push %rbx 0x00000001004ee9dc <+1>: sub $0x40,%rsp 0x00000001004ee9e0 <+5>: mov %ecx,%ebx 0x00000001004ee9e2 <+7>: mov 0x543027(%rip),%rax # 0x100a31a10 <.refptr.suppress_checking> 0x00000001004ee9e9 <+14>: cmpb $0x0,(%rax) 0x00000001004ee9ec <+17>: jne 0x1004eea2f 0x00000001004ee9ee <+19>: cmp $0x17,%ecx 0x00000001004ee9f1 <+22>: jbe 0x1004eea2f 0x00000001004ee9f3 <+24>: callq 0x10069fd40 <__getreent> 0x00000001004ee9f8 <+29>: mov 0x18(%rax),%rcx 0x00000001004ee9fc <+33>: movl $0x17,0x30(%rsp) 0x00000001004eea04 <+41>: movl $0x0,0x28(%rsp) 0x00000001004eea0c <+49>: mov %ebx,0x20(%rsp) 0x00000001004eea10 <+53>: mov $0x14c,%r9d 0x00000001004eea16 <+59>: lea 0x51e713(%rip),%r8 # 0x100a0d130 0x00000001004eea1d <+66>: lea 0x51e814(%rip),%rdx # 0x100a0d238 0x00000001004eea24 <+73>: callq 0x1006a0040 0x00000001004eea29 <+78>: callq 0x10065227d 0x00000001004eea2e <+83>: nop 0x00000001004eea2f <+84>: add $0x40,%rsp 0x00000001004eea33 <+88>: pop %rbx 0x00000001004eea34 <+89>: retq End of assembler dump. Do you think this is worth trying (perhaps after Aidan tries your other suggestion, involving 64-bit registers)? Ken