Subject: Re: proposed fix for XF4 crashing
To: None <matthieu.herrb@laas.fr>
From: IWAMOTO Toshihiro <iwamoto@sat.t.u-tokyo.ac.jp>
List: tech-x11
Date: 01/21/2002 14:55:59
At Wed, 9 Jan 2002 01:22:07 +0100,
Matthieu Herrb wrote:
>
> You wrote (in your message from Tuesday 8)
> >
> > My guess is that the crashes are due to race between pointer motion
> > event queueing (which happens from signal handler) and removal of
> > events from the queue.
> >
> Totally removing the SIGIO handler is not a good idea.
> The code handling the events from SIGIO is supposed to be
> safe. However, there's a bug in XFree86 4.1.0 that causes malloc/free
> to be called from the sig handler, which is bad.
The diff below seems to be related to mouse button handling, so it
doesn't seem to be related to my problem. (I don't need to touch a
mouse button to crash the X server.)
I updated my xsrc copy (only input/mouse/ and
os-support/xf86OSmouse.h, which contain the diff), and the X
server crashed again.
Personally speaking, I don't feel like to do further debugging as I
don't see any merit in handling mouse event in a signal handler.
> The following patch, by Keith Packard, form XFree86 CVS repository
> fixes this bug. Other users that have reported the same kind of
> crashes say the server doesn't crash anymore with this patch.
>
> ===================================================================
> RCS file: /home/anoncvs/cvs-public/xc/programs/Xserver/hw/xfree86/input/mouse/mouse.c,v
> retrieving revision 1.43
> retrieving revision 1.44
> diff -u -p -r1.43 -r1.44
> --- xc/programs/Xserver/hw/xfree86/input/mouse/mouse.c 2001/05/18 20:22:30 1.43
> +++ xc/programs/Xserver/hw/xfree86/input/mouse/mouse.c 2001/07/06 08:02:37 1.44
> ===================================================================
> RCS file: /home/anoncvs/cvs-public/xc/programs/Xserver/hw/xfree86/os-support/xf86OSmouse.h,v
> retrieving revision 1.14
> retrieving revision 1.15
> diff -u -p -r1.14 -r1.15
> --- xc/programs/Xserver/hw/xfree86/os-support/xf86OSmouse.h 2001/03/07 16:21:04 1.14
> +++ xc/programs/Xserver/hw/xfree86/os-support/xf86OSmouse.h 2001/07/06 08:02:39 1.15
--
IWAMOTO Toshihiro