all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: "Vincent Belaïche" <vincent.b.1@hotmail.fr>
Cc: 12774@debbugs.gnu.org
Subject: bug#12774: 24.2.50; EMACS 24.2.50.1 crashing‏
Date: Sun, 04 Nov 2012 18:44:51 +0200	[thread overview]
Message-ID: <83ip9l48sc.fsf@gnu.org> (raw)
In-Reply-To: <DUB102-W4349F77D26F50F97BC2D7184660@phx.gbl>

> From: Vincent Belaïche <vincent.b.1@hotmail.fr>
> Date: Sat, 3 Nov 2012 23:24:15 +0100
> 
> The crash can happen without my doing anything special previously except opening that attached file USING_CEDET_FROM_BZR which causes loading orgmode. Also it seems that it has to do with the size of my init.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/emacs.exe

(Note: do NOT invoke Emacs via the --exec= 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) == 0)
	{
	  /* If the system didn't want that much memory back, adjust
             the end of the last heap to reflect that.  This can occur
             if break_value is still within the original data segment.  */
 >>>>>>>  last_heap->end = (char *) last_heap->end + excess;
	  /* 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.  */
	  if (last_heap->end != (*real_morecore) (0))
	    emacs_abort ();
	}

 w32heap.c:

      /* Sanity checks.  */
      if ((data_region_end - size) < data_region_base)
 >>>>>	return NULL;

      /* We can only decommit full pages, so allow for
	 partial deallocation [cga].  */
      new_data_region_end = (data_region_end - size);
      new_data_region_end = (unsigned char *)
	((DWORD_PTR) (new_data_region_end + syspage_mask) & ~syspage_mask);
      new_size = real_data_region_end - new_data_region_end;
      real_data_region_end = new_data_region_end;
      if (new_size > 0)
	{
	  /* Decommit size bytes from the end of the heap.  */
	  if (using_dynamic_heap
	      && !VirtualFree (real_data_region_end, new_size, MEM_DECOMMIT))
 >>>>>	    return NULL;
 	}

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 one
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.






  parent reply	other threads:[~2012-11-04 16:44 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-11-01  5:23 bug#12774: 24.2.50; EMACS 24.2.50.1 crashing‏ Vincent Belaïche
2012-11-01 14:57 ` Eli Zaretskii
     [not found]   ` <DUB102-W598866A2386D9F5F9BE37384600@phx.gbl>
2012-11-01 20:09     ` bug#12774: " Eli Zaretskii
2012-11-01 20:37   ` Vincent Belaïche
2012-11-01 20:40     ` bug#12774: " Eli Zaretskii
2012-11-01 20:47       ` Vincent Belaïche
2012-11-01 21:11         ` bug#12774: " Eli Zaretskii
2012-11-01 21:17           ` Eli Zaretskii
2012-11-03 13:47             ` Vincent Belaïche
2012-11-03 14:16               ` bug#12774: " Eli Zaretskii
2012-11-03 17:20                 ` Vincent Belaïche
2012-11-03 17:21                 ` Vincent Belaïche
2012-11-03 17:41                 ` Vincent Belaïche
2012-11-03 20:07                   ` bug#12774: " Eli Zaretskii
     [not found]                     ` <DUB102-W4349F77D26F50F97BC2D7184660@phx.gbl>
2012-11-04  3:46                       ` Eli Zaretskii
2012-11-04 16:44                       ` Eli Zaretskii [this message]
2012-11-01 20:51       ` Vincent Belaïche
2012-11-01 21:00       ` Vincent Belaïche
2012-11-04  8:52 ` bug#12774: RE: bug#12774: 24.2.50; EMACS 24.2.50.1 crashing Vincent Belaïche
2012-11-04 16:22   ` Eli Zaretskii
2012-11-04 19:50 ` Vincent Belaïche
2012-11-05 17:14   ` Eli Zaretskii
2012-11-07 20:40 ` Vincent Belaïche
2012-11-07 21:14   ` Eli Zaretskii

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=83ip9l48sc.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=12774@debbugs.gnu.org \
    --cc=vincent.b.1@hotmail.fr \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.