On 2/19/2013 9:12 PM, Daniel Colascione wrote: > I don't know why we suddenly started seeing this behavior. Revision 111820, "Prefer `message1' over `message'.", caused us to start calling message1 instead of message in sheap.c. message1 ends up calling message_dolog, which tries to allocate a *Messages* buffer. Maybe Fdump_emacs should bind Vmessage_max_log? Anyway, I've installed the following patch to trunk, which fixes the problem. If we want to go back to using message1, let's somehow make sure it doesn't log. revno: 111830 committer: Daniel Colascione branch nick: cyg timestamp: Tue 2013-02-19 21:43:53 -0800 message: 2013-02-19 Daniel Colascione * sheap.c (report_sheap_usage): Use message, not message1, so that we don't try to create a buffer while we're in the middle of dumping Emacs. Explain why. diff: === modified file 'src/ChangeLog' --- src/ChangeLog 2013-02-19 03:29:28 +0000 +++ src/ChangeLog 2013-02-20 05:43:53 +0000 @@ -1,3 +1,9 @@ +2013-02-19 Daniel Colascione + + * sheap.c (report_sheap_usage): Use message, not message1, so + that we don't try to create a buffer while we're in the middle + of dumping Emacs. Explain why. + 2013-02-19 Eli Zaretskii * w32proc.c (new_child): Avoid leaking handles if the subprocess === modified file 'src/sheap.c' --- src/sheap.c 2013-02-17 16:49:27 +0000 +++ src/sheap.c 2013-02-20 05:43:53 +0000 @@ -91,5 +91,8 @@ char buf[200]; sprintf (buf, "Static heap usage: %d of %d bytes", bss_sbrk_ptr - bss_sbrk_buffer, STATIC_HEAP_SIZE); - message1 (buf); + /* Don't change this call to message1! message1 can log + messages, and at this point, we're not allowed to create + buffers. */ + message ("%s", buf); }