From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#6126: 24.0.50; Segmentation fault when w32-shell-execute try to open an unassociated file Date: Fri, 07 May 2010 12:03:06 +0300 Message-ID: <83hbmkjd85.fsf@gnu.org> References: Reply-To: Eli Zaretskii NNTP-Posting-Host: lo.gmane.org X-Trace: dough.gmane.org 1273239614 20205 80.91.229.12 (7 May 2010 13:40:14 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Fri, 7 May 2010 13:40:14 +0000 (UTC) Cc: 6126@debbugs.gnu.org To: Chunyu Wang Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Fri May 07 15:40:13 2010 connect(): No such file or directory Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1OANmm-0001KV-MX for geb-bug-gnu-emacs@m.gmane.org; Fri, 07 May 2010 15:40:13 +0200 Original-Received: from localhost ([127.0.0.1]:53626 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OANml-0005In-MR for geb-bug-gnu-emacs@m.gmane.org; Fri, 07 May 2010 09:40:11 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1OANdr-0006VF-Ux for bug-gnu-emacs@gnu.org; Fri, 07 May 2010 09:31:00 -0400 Original-Received: from [140.186.70.92] (port=58328 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OANdg-0003vJ-LQ for bug-gnu-emacs@gnu.org; Fri, 07 May 2010 09:30:57 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1OAJpX-0002zJ-3F for bug-gnu-emacs@gnu.org; Fri, 07 May 2010 05:26:48 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:54196) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OAJpX-0002z7-07 for bug-gnu-emacs@gnu.org; Fri, 07 May 2010 05:26:47 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.69) (envelope-from ) id 1OAJVS-0004FF-I5; Fri, 07 May 2010 05:06:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-To: owner@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 07 May 2010 09:06:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 6126 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 6126-submit@debbugs.gnu.org id=B6126.127322312616309 (code B ref 6126); Fri, 07 May 2010 09:06:02 +0000 Original-Received: (at 6126) by debbugs.gnu.org; 7 May 2010 09:05:26 +0000 Original-Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OAJUs-0004F0-DB for submit@debbugs.gnu.org; Fri, 07 May 2010 05:05:26 -0400 Original-Received: from mtaout21.012.net.il ([80.179.55.169]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OAJUq-0004Ev-Ea for 6126@debbugs.gnu.org; Fri, 07 May 2010 05:05:25 -0400 Original-Received: from conversion-daemon.a-mtaout21.012.net.il by a-mtaout21.012.net.il (HyperSendmail v2007.08) id <0L2100800L57NZ00@a-mtaout21.012.net.il> for 6126@debbugs.gnu.org; Fri, 07 May 2010 12:05:08 +0300 (IDT) Original-Received: from HOME-C4E4A596F7 ([84.229.0.144]) by a-mtaout21.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0L210086QL8J5G20@a-mtaout21.012.net.il>; Fri, 07 May 2010 12:05:08 +0300 (IDT) In-reply-to: X-012-Sender: halo1@inter.net.il X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list Resent-Date: Fri, 07 May 2010 05:06:02 -0400 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) 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: , Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:36766 Archived-At: > From: Chunyu Wang > Date: Fri, 7 May 2010 00:08:08 +0800 > Cc: > > emacs -Q to start > M-: (w32-shell-execute "open" "C:\\abc.ttt") > > Emacs got killed by system because of segmentation fault. The file C:/abc.ttt > is just a text file with no system default associated program, and this should > make a w32-shell-execute error in the *Message* buffer. On my system, there's no segfault, only the (expected) error thrown: Debugger entered--Lisp error: (error "ShellExecute failed: No application is associated with the specified file for this operation. ") w32-shell-execute("open" "C:\\abc.ttt") eval((w32-shell-execute "open" "C:\\abc.ttt")) eval-expression((w32-shell-execute "open" "C:\\abc.ttt") nil) call-interactively(eval-expression nil nil) And from the backtrace you show, Emacs was trying to display the same error in your case: > #4 0x0100b463 in error (m=0x1349794 "ShellExecute failed: %s", > a1=0x40008048
, > a2=0x40008048
, > a3=0x40008048
) at eval.c:2078 > used = 1073774664 > buf = "ShellExecute failed: > \236\310\000\000\000\000\000\000\020\000\000\000\000\000\000,\212~\363\314\365\210\000\304\365\210\000\000\000\000\000\244\365\210\000\000\000\000\000H\274\000\001\030\000\000\000\260\365\210\000\202\236\000\000\244\364\210\000\311\237\312t\304\377\210\000\035\004hw\235\254!\003\376\377\377\377\372\066dw\362\062dw`\236\310\000h\236\310\000H\274\067\001h\236\310\000\030\000\000\000`\236\310\000\330\365\210\000)>\275u\000\000\306\000\000\000\000\000h\236\310\000 > \001e\004\032x\275\002\002\000\000\000\030\000\364\001H\274\067\001\032\000\034\000h\236\310\000\000\000\000\000\b\366\210\000\323\377\a\001\000\000\000\000\000\000\000" > size = 200 > buffer = 0x88f520 "ShellExecute failed: \236\310" > args = { > 0x137bc48 > "\317\265\315\263\325\322\262\273\265\275\326\270\266\250\265\304\316\304\274\376\241\243\r\n", > 0x465fc78 "C:\\abc.ttt", 0x0} So I think the problem is not related to the fact that the file's extension was unassociated, but rather that the file name used some non-ASCII characters that Emacs tried to display, and crashed because some table was invalid, or something like that. Observe: > Program received signal SIGSEGV, Segmentation fault. > 0x01129096 in char_table_ref (table=47436805, c=16390349) at chartab.c:210 > 210 if (SUB_CHAR_TABLE_P (val)) > (gdb) p val > $1 = 1073774669 > (gdb) bt full > #0 0x01129096 in char_table_ref (table=47436805, c=16390349) at chartab.c:210 > tbl = 0x2d3d400 > val = 1073774669 > #1 0x011185ab in c_string_width ( > str=0x137bc48 > "\317\265\315\263\325\322\262\273\265\275\326\270\266\250\265\304\316\304\274\376\241\243\r\n", > len=24, precision=-1, nchars=0x0, > nbytes=0x0) at character.c:420 > bytes = 5 > thiswidth = 1073774664 > val = 1073774669 > c = 16390349 > i = 7 > i_byte = 18 > width = 6 > dp = 0x2db7200 > #2 0x0111870b in strwidth ( > str=0x40008048
, len=1073774664) > at character.c:453 > No locals. > #3 0x0114386d in doprnt (buffer=0x88f520 "ShellExecute failed: \236\310", So it dies inside a call to char_table_ref, evidently trying to compute the width of a string. Does this problem happen in an unoptimized build as well? If so, could you please find out what is the table it is using (the `tbl' variable in frame #0), and also what is `val' (by using the xtype command and a command to show the Lisp type printed by xtype, probably xchartable)?