From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Chong Yidong Newsgroups: gmane.emacs.devel Subject: Re: allocate_string_data memory corruption Date: Sat, 28 Jan 2006 23:58:36 -0500 Message-ID: <87slr7k4ub.fsf@stupidchicken.com> References: <87vewha2zl.fsf@stupidchicken.com> <87zmlq6w62.fsf-monnier+emacs@gnu.org> <874q3v6a65.fsf-monnier+emacs@gnu.org> <873bjbahq6.fsf@stupidchicken.com> <87r76usumg.fsf-monnier+emacs@gnu.org> <871wyuixit.fsf@stupidchicken.com> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1138523962 5763 80.91.229.2 (29 Jan 2006 08:39:22 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Sun, 29 Jan 2006 08:39:22 +0000 (UTC) Cc: monnier@iro.umontreal.ca, emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sun Jan 29 09:39:20 2006 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1F385e-0007Pf-Bq for ged-emacs-devel@m.gmane.org; Sun, 29 Jan 2006 09:39:18 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1F388Y-0005XB-6H for ged-emacs-devel@m.gmane.org; Sun, 29 Jan 2006 03:42:18 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1F34h8-0007yJ-53 for emacs-devel@gnu.org; Sun, 29 Jan 2006 00:01:46 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1F34h5-0007xM-DF for emacs-devel@gnu.org; Sun, 29 Jan 2006 00:01:44 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1F34h4-0007wy-Ab for emacs-devel@gnu.org; Sun, 29 Jan 2006 00:01:42 -0500 Original-Received: from [18.95.5.111] (helo=localhost.localdomain) by monty-python.gnu.org with esmtp (Exim 4.52) id 1F34f5-0007Uj-CB; Sat, 28 Jan 2006 23:59:39 -0500 Original-Received: by localhost.localdomain (Postfix, from userid 1000) id 7EA9C1E4222; Sat, 28 Jan 2006 23:58:36 -0500 (EST) Original-To: rms@gnu.org In-Reply-To: (Richard M. Stallman's message of "Fri, 27 Jan 2006 17:32:16 -0500") User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.50 (gnu/linux) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:49663 Archived-At: "Richard M. Stallman" writes: > I don't see any better solution. It is non-trivial to fix the > behavior of handle_one_xevent with synched input. I, for one, don't > see any clean way to fix note_mouse_highlight and > x_handle_dnd_message. > > Could you tell us about these problems? Sure. We already discussed the note_mouse_highlight problem somewhat. Basically, it can lead to calling realize_face for a mouse face, which can call allocate_vectorlike and make_uninit_multibyte_string. I don't know how to avoid this, since the mouse face is constructed on the fly by merging overlay and text property mouse faces. As for x_handle_dnd_message, this function has to allocate a vector, recording the filename "dragged and dropped" into Emacs, that is put into the arg member of a struct input_event for later processing. We can't change the arg member from a Lisp_Object to a pointer (and use a malloc'ed block instead of a vector) because the arg member is used by other event handlers to pass stuff (e.g., the toolbar handlers). One solution is to add an additional pointer member to struct input_event, or make a global variable to store drag and drop events. But I'd rather not put any more effort into tweaking handle_one_xevent to avoid allocating Lisp structures. After the release, we can fix DSYNC_INPUT and make it the default -- DSYNC_INPUT just seems like a better design. > Would you please install your patch? Done. Can we move forward with the release now? I believe this was the main bug blocking the process.