unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: David Ponce <david@dponce.com>
Cc: emacs-devel@gnu.org
Subject: Re: NT Emacs crashes when selecting a menubar item
Date: Mon, 29 Jul 2002 20:16:35 +0200	[thread overview]
Message-ID: <3D458683.6050904@dponce.com> (raw)
In-Reply-To: 200207291730.g6THUL714035@aztec.santafe.edu

>
>
>Is this comment in w32menu.c inaccurate?
>
>      /* Now GC cannot happen during the lifetime of the widget_value,
>	 so it's safe to store data from a Lisp_String, as long as
>	 local copies are made when the actual menu is created.
>	 Windows takes care of this for normal string items, but
>	 not for owner-drawn items or additional item-info.  */
>
Yes I think it is inaccurate.
IMO, GC cannot happen after the build of the widget_value tree is completed.

>If it is inaccurate, why is that?  How is it that GC happens in
>between creation of the widget value and its use in add_menu_item?
>Note that GC ought to be inhibited within set_frame_menubar
>from this line
>
>      inhibit_garbage_collection ();
>
>to this line
>
>      unbind_to (specpdl_count, Qnil);
>
>Does the GC happen inside that range, or after?
>Either way, it's a bug; the question is what bug.
>
Yes GC seems to happen inside that range when building the widget_value 
tree.
When it happens it can change the address of strings (when compacting 
the string pool)
that are stored in already allocated widget_values.

I suppose it explains this comment

 "/* Don't set wv->name here; GC during the loop might relocate it.  */"

 which appears inside that range.

  reply	other threads:[~2002-07-29 18:16 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-07-24 18:55 NT Emacs crashes when selecting a menubar item David Ponce
2002-07-25 18:07 ` Richard Stallman
2002-07-26 12:30   ` David Ponce
2002-07-27 18:52     ` Richard Stallman
2002-07-28 16:56       ` David Ponce
2002-07-29 17:30         ` Richard Stallman
2002-07-29 18:16           ` David Ponce [this message]
2002-07-30 18:46             ` Richard Stallman
  -- strict thread matches above, loose matches on Subject: below --
2002-07-30 11:28 David PONCE
     [not found] <3D2A791A00A0862A@mel-rta9.wanadoo.fr>
2002-07-31 21:57 ` Richard Stallman
2002-07-31 22:37   ` David Ponce
2002-08-01  7:54 jasonr
2002-08-01 11:39 David PONCE

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=3D458683.6050904@dponce.com \
    --to=david@dponce.com \
    --cc=emacs-devel@gnu.org \
    /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).