unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: Juanma Barranquero <lekktu@gmail.com>
Cc: 11138@debbugs.gnu.org, dpchiesa@hotmail.com
Subject: 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	[thread overview]
Message-ID: <83398njsn0.fsf@gnu.org> (raw)
In-Reply-To: <CAAeL0SR4OMPyKmxnhCutFdmfa4Ao14ZvRQH4pGEsoTMSa=5GiQ@mail.gmail.com>

> From: Juanma Barranquero <lekktu@gmail.com>
> Date: Sat, 31 Mar 2012 23:36:01 +0200
> Cc: Drew Adams <drew.adams@oracle.com>, 11138@debbugs.gnu.org, dpchiesa@hotmail.com
> 
> On Sat, Mar 31, 2012 at 20:06, Eli Zaretskii <eliz@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.






      reply	other threads:[~2012-04-01 16:58 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-03-31 14:53 bug#11138: 23.3; on Windows, message-box does not display line breaks in the message Dino Chiesa
2012-03-31 15:26 ` Drew Adams
2012-03-31 18:06   ` Eli Zaretskii
2012-03-31 18:14     ` Drew Adams
2012-03-31 18:30       ` Eli Zaretskii
2012-03-31 18:37         ` Drew Adams
2012-03-31 18:58           ` Eli Zaretskii
2012-03-31 19:19             ` Drew Adams
2012-03-31 19:26               ` Eli Zaretskii
2012-03-31 21:29                 ` Drew Adams
2012-04-01  3:00                   ` Eli Zaretskii
2012-03-31 19:10     ` Stefan Monnier
2012-03-31 19:19       ` Drew Adams
2012-03-31 21:36     ` Juanma Barranquero
2012-04-01 16:58       ` Eli Zaretskii [this message]

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

  List information: https://www.gnu.org/software/emacs/

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

  git send-email \
    --in-reply-to=83398njsn0.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=11138@debbugs.gnu.org \
    --cc=dpchiesa@hotmail.com \
    --cc=lekktu@gmail.com \
    /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 public inbox

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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).