emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: valgrind warnings [Re: Emacs bzr memory footprint]


From: Dan Nicolaescu
Subject: Re: valgrind warnings [Re: Emacs bzr memory footprint]
Date: Fri, 28 Oct 2011 14:52:35 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.3 (gnu/linux)

Eli Zaretskii <address@hidden> writes:

>> From: Dan Nicolaescu <address@hidden>
>> Cc: address@hidden,  address@hidden
>> Date: Fri, 28 Oct 2011 12:34:07 -0400
>> 
>> A quick hack to initialize part with -42 and then abort if it's still -42 
>> before
>>  "part != ON_TEXT && part != ON_MODE_LINE && part != ON_HEADER_LINE"
>> does indeed call abort... 
>
> That's okay because window_from_coordinates is explicitly documented
> to not touch "part" if the the position is not on any window.  Can you
> show me the exact code that you used for the above test?

=== modified file 'src/xdisp.c'
--- src/xdisp.c   2011-10-19 11:46:17 +0000
+++ src/xdisp.c   2011-10-28 16:29:15 +0000
@@ -26801,7 +26801,7 @@ void
 note_mouse_highlight (struct frame *f, int x, int y)
 {
   Mouse_HLInfo *hlinfo = MOUSE_HL_INFO (f);
-  enum window_part part;
+  enum window_part part = -42;
   Lisp_Object window;
   struct window *w;
   Cursor cursor = No_Cursor;
@@ -26838,7 +26838,7 @@ note_mouse_highlight (struct frame *f, i
   /* If we were displaying active text in another window, clear that.
      Also clear if we move out of text area in same window.  */
   if (! EQ (window, hlinfo->mouse_face_window)
-      || (part != ON_TEXT && part != ON_MODE_LINE && part != ON_HEADER_LINE
+      || ((part == -42 ? exit (1),1: 1) &&  part != ON_TEXT && part != 
ON_MODE_LINE && part != ON_HEADER_LINE
         && !NILP (hlinfo->mouse_face_window)))
     clear_mouse_face (hlinfo);
 

This is before Yidong's fix.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]