From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: "Juanma Barranquero" Newsgroups: gmane.emacs.devel Subject: Crash displaying byte-code Date: Tue, 5 Aug 2008 13:35:48 +0200 Message-ID: NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1217936192 22947 80.91.229.12 (5 Aug 2008 11:36:32 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 5 Aug 2008 11:36:32 +0000 (UTC) To: "Emacs Development" Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue Aug 05 13:37:23 2008 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1KQKqa-00050N-Hi for ged-emacs-devel@m.gmane.org; Tue, 05 Aug 2008 13:37:00 +0200 Original-Received: from localhost ([127.0.0.1]:54930 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KQKpe-0005Ta-W4 for ged-emacs-devel@m.gmane.org; Tue, 05 Aug 2008 07:36:03 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1KQKpU-0005QD-Of for emacs-devel@gnu.org; Tue, 05 Aug 2008 07:35:52 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1KQKpT-0005OF-7Y for emacs-devel@gnu.org; Tue, 05 Aug 2008 07:35:51 -0400 Original-Received: from [199.232.76.173] (port=56587 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KQKpS-0005Nf-Iz for emacs-devel@gnu.org; Tue, 05 Aug 2008 07:35:50 -0400 Original-Received: from nf-out-0910.google.com ([64.233.182.184]:37788) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1KQKpS-0003bH-31 for emacs-devel@gnu.org; Tue, 05 Aug 2008 07:35:50 -0400 Original-Received: by nf-out-0910.google.com with SMTP id c7so892892nfi.26 for ; Tue, 05 Aug 2008 04:35:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to :subject:mime-version:content-type:content-transfer-encoding :content-disposition; bh=bz1Eq51FwtYdZgDPIsJ8ky17fW1c5CzWyJ43Cs4HO7Q=; b=hg16lg24TY+zUEnRG+/J9hyqrMjWeySjNBt+EUXUMhtKfdZRaRRAv/LKERvtq25nbN /NSnWIM4OT+cKUx1/l+b1zcYKOW2JlOMlif1sKmvNUtmbRmnBtim34lydoRSqmjAypKR chakrdgz9v3S4UH4/G/Gmcbrk6llSLWyJmPjQ= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:mime-version:content-type :content-transfer-encoding:content-disposition; b=s51Bi7o84bJQ95pD5DIgATWBI169+qasTGhhxu4JnFiZYJ4Mx5ZuF4H3od9OrbVktS Pk0D7zFwXKjy0JUR/l01Q+TxqkSP4GjZe0A1I67JWr9moDKrOnKQk6is9hZz/MREP3QL lXuJMVIUocbK0gsIu7ZrL+AXtBiiueGZb0OCk= Original-Received: by 10.210.143.11 with SMTP id q11mr904063ebd.61.1217936148801; Tue, 05 Aug 2008 04:35:48 -0700 (PDT) Original-Received: by 10.210.71.14 with HTTP; Tue, 5 Aug 2008 04:35:48 -0700 (PDT) Content-Disposition: inline X-detected-kernel: by monty-python.gnu.org: Linux 2.6 (newer, 2) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:102081 Archived-At: I can consistently reproduce this crash, though it is perhaps a bit specific to my compiler setup, etc. emacs -Q M-x ielm then type (let ((standard-output (current-buffer))) (setq unibyte-display-via-language-environment t) (set-buffer-multibyte nil) (backtrace)) Now, the catches: - If Emacs is run from inside GDB, it "hangs" for a while and finally crashes with the attached backtrace 1. - If run from the command-line, after doing the above it crashes immediately; the DrMingw backtrace is a bit different (backtrace 2). - It only happens with an optimized build. - All the above steps are required, including executing the `let' from inside IELM. In fact, the crash happens while IELM is trying to display byte-code("...") This is on Windows XP (Pro and Home) Spanish Edition, Emacs compiled with gcc "(GCC) 4.3.0 20080305 (alpha-testing) mingw-20080502", -DENABLE_CHECKING=1 and -fno-crossjumping. Juanma ------------------------------------------------------------------------- ------------------------------ backtrace 1 ------------------------------ ------------------------------------------------------------------------- Program received signal SIGSEGV, Segmentation fault. 0x011f45c7 in x_draw_glyph_string_foreground (s=0x82ea60) at w32term.c:1327 1327 font->driver->draw (s, 0, s->nchars, x, y, 0); (gdb) bt #0 0x011f45c7 in x_draw_glyph_string_foreground (s=0x82ea60) at w32term.c:1327 #1 0x011f59d7 in x_draw_glyph_string (s=0x82ea60) at w32term.c:2282 #2 0x01056300 in draw_glyphs (w=0x2f77000, x=208, row=0x2dae688, area=TEXT_AREA, start=1, end=19, hl=DRAW_NORMAL_TEXT, overlaps=0) at xdisp.c:20475 #3 0x01059319 in x_write_glyphs (start=0x2e08020, len=18) at xdisp.c:21819 #4 0x0115c449 in update_window_line (w=0x2f77000, vpos=11, mouse_face_overwritten_p=0x82f0ec) at dispnew.c:4593 #5 0x0115ca7c in update_window (w=0x2f77000, force_p=0) at dispnew.c:4309 #6 0x0115f136 in update_window_tree (w=0x2f77000, force_p=0) at dispnew.c:4002 #7 0x01160924 in update_frame (f=0x2dda800, force_p=0, inhibit_hairy_id_p=0) at dispnew.c:3930 #8 0x01047481 in redisplay_internal (preserve_echo_area=) at xdisp.c:11854 #9 0x0108a5b9 in read_char (commandflag=1, nmaps=2, maps=0x82fb70, prev_event=47519745, used_mouse_menu=0x82fc34, end_time=0x0) at keyboard.c:2652 #10 0x0108ec0a in read_key_sequence (keybuf=0x82fcd4, bufsize=30, prompt=47519745, dont_downcase_last=0, can_return_switch_frame=1, fix_current_buffer=1) at keyboard.c:9349 #11 0x01091d7d in command_loop_1 () at keyboard.c:1620 #12 0x01019006 in internal_condition_case (bfun=0x1091aef , handlers=47583497, hfun=0x1088d56 ) at eval.c:1511 #13 0x0108806b in command_loop_2 () at keyboard.c:1338 #14 0x010190b0 in internal_catch (tag=47579569, func=0x1088048 , arg=47519745) at eval.c:1247 #15 0x01088b9b in command_loop () at keyboard.c:1317 #16 0x01088eef in recursive_edit_1 () at keyboard.c:942 #17 0x0108905a in Frecursive_edit () at keyboard.c:1004 #18 0x01002c41 in main (argc=2, argv=0xa841e0) at emacs.c:1688 ------------------------------------------------------------------------- ------------------------------ backtrace 2 ------------------------------ ------------------------------------------------------------------------- Call stack: 011EEEB2 emacs.exe:011EEEB2 x_draw_glyph_string_background w32term.c:1265 ... else #endif > if (FONT_HEIGHT (s->font) < s->height - 2 * box_line_width || s->font_not_found_p || s->extends_to_end_of_line_p ... 011F6111 emacs.exe:011F6111 x_draw_glyph_string w32term.c:2252 ... x_set_glyph_string_clipping (s); x_draw_glyph_string_background (s, 1); > x_draw_glyph_string_box (s); x_set_glyph_string_clipping (s); relief_drawn_p = 1; ... 01056300 emacs.exe:01056300 draw_glyphs xdisp.c:20474 ... /* Draw all strings. */ > for (s = head; s; s = s->next) FRAME_RIF (f)->draw_glyph_string (s); ... 01059319 emacs.exe:01059319 x_write_glyphs xdisp.c:21819 ... hpos = start - updated_row->glyphs[updated_area]; > x = draw_glyphs (updated_window, output_cursor.x, updated_row, updated_area, hpos, hpos + len, ... 0115C449 emacs.exe:0115C449 update_window_line dispnew.c:4593 ... { rif->cursor_to (vpos, i, desired_row->y, x); > rif->write_glyphs (desired_glyph, desired_row->used[TEXT_AREA] - i); changed_p = 1; } ... 0115CA7C emacs.exe:0115CA7C update_window dispnew.c:4309 ... detect_input_pending_ignore_squeezables (); #endif > changed_p |= update_window_line (w, vpos, &mouse_face_overwritten_p); ... 0115F136 emacs.exe:0115F136 update_window_tree dispnew.c:4002 ... paused_p |= update_window_tree (XWINDOW (w->vchild), force_p); else if (w->must_be_updated_p) > paused_p |= update_window (w, force_p); w = NILP (w->next) ? 0 : XWINDOW (w->next); ... 01160924 emacs.exe:01160924 update_frame dispnew.c:3930 ... /* Update windows. */ > paused_p = update_window_tree (root_window, force_p); update_end (f); ... 01047481 emacs.exe:01047481 redisplay_internal xdisp.c:11854 ... /* Update the display. */ set_window_update_flags (XWINDOW (f->root_window), 1); > pause |= update_frame (f, 0, 0); #if 0 /* Exiting the loop can leave the wrong value for buffer_shared. */ if (pause) ... 0108A5B9 emacs.exe:0108A5B9 read_char keyboard.c:2652 ... redisplay_preserve_echo_area (5); else > redisplay (); if (!input_pending) ... 0108EC0A emacs.exe:0108EC0A read_key_sequence keyboard.c:9349 ... KBOARD *interrupted_kboard = current_kboard; struct frame *interrupted_frame = SELECTED_FRAME (); > key = read_char (NILP (prompt), nmaps, (Lisp_Object *) submaps, last_nonmenu_event, &used_mouse_menu, NULL); ... 01091D7D emacs.exe:01091D7D command_loop_1 keyboard.c:1620 ... /* Read next key sequence; i gets its length. */ > i = read_key_sequence (keybuf, sizeof keybuf / sizeof keybuf[0], Qnil, 0, 1, 1); ... 01019006 emacs.exe:01019006 internal_condition_case eval.c:1511 ... handlerlist = &h; > val = (*bfun) (); catchlist = c.next; handlerlist = h.next; ... 0108806B emacs.exe:0108806B command_loop_2 keyboard.c:1339 ... do val = internal_condition_case (command_loop_1, Qerror, cmd_error); > while (!NILP (val)); return Qnil; ... 010190B0 emacs.exe:010190B0 internal_catch eval.c:1247 ... /* Call FUNC. */ if (! _setjmp (c.jmp)) > c.val = (*func) (arg); /* Throw works by a longjmp that comes right here. */ ... 01088B9B emacs.exe:01088B9B command_loop keyboard.c:1318 ... #endif internal_catch (Qtop_level, command_loop_2, Qnil); > executing_kbd_macro = Qnil; /* End of file in -batch run causes exit here. */ ... 01088EEF emacs.exe:01088EEF recursive_edit_1 keyboard.c:942 ... redisplaying_p = 0; > val = command_loop (); if (EQ (val, Qt)) Fsignal (Qquit, Qnil); ... 0108905A emacs.exe:0108905A Frecursive_edit keyboard.c:1005 ... recursive_edit_1 (); > return unbind_to (count, Qnil); } ... 01002C41 emacs.exe:01002C41 main emacs.c:1691 ... /* NOTREACHED */ return 0; > } /* Sort the args so we can find the most important ones ... 0100124B emacs.exe:0100124B 01001298 emacs.exe:01001298 7C816FD7 kernel32.dll:7C816FD7 RegisterWaitForInputIdle