GNU bug report logs - #11138
23.3; on Windows, message-box does not display line breaks in the message

Previous Next

Packages: emacs, w32;

Reported by: "Dino Chiesa" <dpchiesa <at> hotmail.com>

Date: Sat, 31 Mar 2012 14:56:02 UTC

Severity: wishlist

Found in version 23.3

Done: Chong Yidong <cyd <at> gnu.org>

Bug is archived. No further changes may be made.

Full log


Message #47 received at 11138 <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: Juanma Barranquero <lekktu <at> gmail.com>
Cc: 11138 <at> debbugs.gnu.org, drew.adams <at> oracle.com, dpchiesa <at> hotmail.com
Subject: Re: bug#11138: 23.3;
	on Windows, message-box does not display line breaks in the message
Date: Sun, 01 Apr 2012 19:58:43 +0300
> From: Juanma Barranquero <lekktu <at> gmail.com>
> Date: Sat, 31 Mar 2012 23:36:01 +0200
> Cc: Drew Adams <drew.adams <at> oracle.com>, 11138 <at> debbugs.gnu.org, dpchiesa <at> hotmail.com
> 
> On Sat, Mar 31, 2012 at 20:06, Eli Zaretskii <eliz <at> gnu.org> wrote:
> 
> > The Windows port doesn't really have an implementation of a message
> > box, it just pops up a menu.  And in a menu, each item is one line.
> 
> And some checking for excessive length is missing, BTW:
> 
> emacs -Q
> M-: (message-box (make-string (/ most-positive-fixnum 2) ?a) "") <RETURN>
> 
> Program received signal SIGSEGV, Segmentation fault.
> 0x754f8dd2 in strcat () from C:\Windows\syswow64\msvcrt.dll
> (gdb) bt
> #0  0x754f8dd2 in strcat () from C:\Windows\syswow64\msvcrt.dll
> #1  0x64c9000c in ?? ()
> #2  0x012b68f4 in fill_in_menu (menu=0x37640627, wv=0x9f1740) at w32menu.c:1564

This crash should be fixed in trunk revision 107723.  Now even your
crazy test case doesn't crash, just says that it ran out of memory
after a while (kids, don't try that at home).

Btw, it looks like MS-Windows menus cannot have strings longer than
64K, although I cannot find this documented anywhere.





This bug report was last modified 12 years and 272 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.