[Top][All Lists]

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

Crash in show_busy_cursor.

From: Jason Rumney
Subject: Crash in show_busy_cursor.
Date: Wed, 29 Nov 2000 03:04:31 -0800 (PST)

Having given up on dbx and installed gdb, I found that the crash I
reported earlier occurred on the line marked "==>", with f = 0.
Since earlier lines have successfully dereferenced f, I suspect some
stack corruption has occurred, possibly due to non-reentrant system
library functions as Eli suggested.

Note though that it is possible for a NULL pointer to pass the
FRAME_X_P test if the right byte just happens to be found at that
location, so maybe (f != 0) should be added to that test (and other
similar tests).

static void
show_busy_cursor (timer)
     struct atimer *timer;
  /* The timer implementation will cancel this timer automatically
     after this function has run.  Set busy_cursor_atimer to null
     so that we know the timer doesn't have to be canceled.  */
  busy_cursor_atimer = NULL;

  if (!busy_cursor_shown_p)
      Lisp_Object rest, frame;
      FOR_EACH_FRAME (rest, frame)
        if (FRAME_X_P (XFRAME (frame)))
            struct frame *f = XFRAME (frame);
            f->output_data.x->busy_p = 1;
            if (!f->output_data.x->busy_window)
                unsigned long mask = CWCursor;
                XSetWindowAttributes attrs;
                attrs.cursor = f->output_data.x->busy_cursor;
==>             f->output_data.x->busy_window
                  = XCreateWindow (FRAME_X_DISPLAY (f),
                                   FRAME_OUTER_WINDOW (f),
                                   0, 0, 32000, 32000, 0, 0,
                                   mask, &attrs);
            XMapRaised (FRAME_X_DISPLAY (f), f->output_data.x->busy_window);
            XFlush (FRAME_X_DISPLAY (f));

      busy_cursor_shown_p = 1;

Jason Rumney <address@hidden>
AT&T Labs (Redditch, UK)

  "This message and any attachments to it contain confidential business
   information exclusively intended for the recipients. Please do not
   forward or distribute it to anyone else. If you have received this
   e-mail in error, please call +44 1527 493980 to report the
   error and then delete this message from your system."

reply via email to

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