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#12774: 24.2.50; EMACS 24.2.50.1 =?UTF-8?Q?crashing=E2=80=8F?= Date: Sun, 04 Nov 2012 18:44:51 +0200 Message-ID: <83ip9l48sc.fsf@gnu.org> References: <807gq5sxq9.fsf@gmail.com> <834nl974ml.fsf@gnu.org> <831ugd6oq3.fsf@gnu.org> <83wqy558r8.fsf@gnu.org> <83vcdp58ha.fsf@gnu.org> <834nl66ace.fsf@gnu.org> <83txt64fiz.fsf@gnu.org> Reply-To: Eli Zaretskii NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=windows-1256 Content-Transfer-Encoding: QUOTED-PRINTABLE X-Trace: ger.gmane.org 1352047569 936 80.91.229.3 (4 Nov 2012 16:46:09 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sun, 4 Nov 2012 16:46:09 +0000 (UTC) Cc: 12774@debbugs.gnu.org To: Vincent =?UTF-8?Q?Bela=C3=AFche?= Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sun Nov 04 17:46:18 2012 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 1TV3Ky-0002dc-1C for geb-bug-gnu-emacs@m.gmane.org; Sun, 04 Nov 2012 17:46:16 +0100 Original-Received: from localhost ([::1]:49255 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TV3Kp-0003Gv-CI for geb-bug-gnu-emacs@m.gmane.org; Sun, 04 Nov 2012 11:46:07 -0500 Original-Received: from eggs.gnu.org ([208.118.235.92]:50595) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TV3Kl-0003BH-Ro for bug-gnu-emacs@gnu.org; Sun, 04 Nov 2012 11:46:04 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TV3Kk-0002Dq-IR for bug-gnu-emacs@gnu.org; Sun, 04 Nov 2012 11:46:03 -0500 Original-Received: from debbugs.gnu.org ([140.186.70.43]:38943) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TV3Kk-0002Dl-DO for bug-gnu-emacs@gnu.org; Sun, 04 Nov 2012 11:46:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.72) (envelope-from ) id 1TV3Ne-0000rg-H7 for bug-gnu-emacs@gnu.org; Sun, 04 Nov 2012 11:49:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 04 Nov 2012 16:49:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 12774 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 12774-submit@debbugs.gnu.org id=B12774.13520476843255 (code B ref 12774); Sun, 04 Nov 2012 16:49:02 +0000 Original-Received: (at 12774) by debbugs.gnu.org; 4 Nov 2012 16:48:04 +0000 Original-Received: from localhost ([127.0.0.1]:49194 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TV3Mh-0000qR-Ne for submit@debbugs.gnu.org; Sun, 04 Nov 2012 11:48:04 -0500 Original-Received: from mtaout23.012.net.il ([80.179.55.175]:53277) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TV3Mf-0000q2-1M for 12774@debbugs.gnu.org; Sun, 04 Nov 2012 11:48:02 -0500 Original-Received: from conversion-daemon.a-mtaout23.012.net.il by a-mtaout23.012.net.il (HyperSendmail v2007.08) id <0MCZ000002G8P000@a-mtaout23.012.net.il> for 12774@debbugs.gnu.org; Sun, 04 Nov 2012 18:44:59 +0200 (IST) Original-Received: from HOME-C4E4A596F7 ([87.69.4.28]) by a-mtaout23.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0MCZ000LE2IYM410@a-mtaout23.012.net.il>; Sun, 04 Nov 2012 18:44:59 +0200 (IST) In-reply-to: X-012-Sender: halo1@inter.net.il X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.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:66437 Archived-At: > From: Vincent Bela=EFche > Date: Sat, 3 Nov 2012 23:24:15 +0100 >=20 > The crash can happen without my doing anything special previously e= xcept opening that attached file USING_CEDET_FROM_BZR which causes lo= ading orgmode. Also it seems that it has to do with the size of my in= it.el file --- and not only to its content. OK. Here's what I'm asking you to do. Start Emacs under GDB, like this: c:\Documents and Settings\Vincent>gdb C:/Programme/GNU/Emacs/bin/ema= cs.exe (Note: do NOT invoke Emacs via the --exec=3D switch, since that does = not load the symbol table and other debugging info from emacs.exe.) Once GDB shows its prompt, type these commands: (gdb) break ralloc.c:353 (gdb) break w32heap.c:141 (gdb) break w32heap.c:155 (gdb) run Please verify that the 3 source lines where you set breakpoints are the ones marked below: ralloc.c: if ((*real_morecore) (- excess) =3D=3D 0) =09{ =09 /* If the system didn't want that much memory back, adjust the end of the last heap to reflect that. This can occu= r if break_value is still within the original data segment= . */ >>>>>>> last_heap->end =3D (char *) last_heap->end + excess; =09 /* Make sure that the result of the adjustment is accurate. It should be, for the else clause above; the other case, which returns the entire last heap to the system, seems unlikely to trigger this mode of failure. */ =09 if (last_heap->end !=3D (*real_morecore) (0)) =09 emacs_abort (); =09} w32heap.c: /* Sanity checks. */ if ((data_region_end - size) < data_region_base) >>>>>=09return NULL; /* We can only decommit full pages, so allow for =09 partial deallocation [cga]. */ new_data_region_end =3D (data_region_end - size); new_data_region_end =3D (unsigned char *) =09((DWORD_PTR) (new_data_region_end + syspage_mask) & ~syspage_mask)= ; new_size =3D real_data_region_end - new_data_region_end; real_data_region_end =3D new_data_region_end; if (new_size > 0) =09{ =09 /* Decommit size bytes from the end of the heap. */ =09 if (using_dynamic_heap =09 && !VirtualFree (real_data_region_end, new_size, MEM_DECOMMI= T)) >>>>>=09 return NULL; =09} If your sources are different, adjust the line numbers in the "break" commands accordingly. Now do whatever you usually do to get Emacs to crash, and wait for on= e of the breakpoints to break (they will break before the crash, so don't expect the abort dialog). Then please tell which of the breakpoints on the 2 "return NULL" in w32heap.c breaks. If it's the second one, the one after the call to VirtualFree, please type this command: (gdb) print w32_last-error() (note the parentheses: they are important) and tell what it prints. Then please type "continue", which should stop at the breakpoint in ralloc.c, and tell what do the following commands produce: (gdb) print last_heap->end (gdb) print last_heap->bloc_start (gdb) print excess (gdb) print sbrk(0) Also, please type "xbacktrace" and post the Lisp-level backtrace this produces. If you don't invoke GDB from the src directory, you may need to type "source /path/to/emacs/src/.gdbinit" to make "xbacktrace= " work. Thanks.