Hello,

Jason White, le Sun 17 Jun 2012 17:40:13 +1000, a écrit :
> Interestingly, this bug was hard to trigger under BRLTTY 4.3, but under 4.4 I
> am finding that I can reliably reproduce it - I just power down the braille
> display, ask another user to log into the machine and start an X session -
> that's enough to cause a segfault at some point soon after.

I can indeed reproduce it with the XWindow driver. Could you try the
attached patch?

The fix is making api_unlink restore the brlapi server state to what it
is on first entering api_link: while the api is unlinked, the driver
should be not constructed from the point of view of brlapi, so that
brlapi does not try to use it.

Samuel
Index: Programs/brlapi_server.c
===================================================================
--- Programs/brlapi_server.c    (révision 6571)
+++ Programs/brlapi_server.c    (copie de travail)
@@ -2586,6 +2586,7 @@
   pthread_mutex_lock(&driverMutex);
   if (!coreActive && driverConstructed)
     suspendDriver(disp);
+  driverConstructed=0;
   disp = NULL;
   pthread_mutex_unlock(&driverMutex);
 }
_______________________________________________
This message was sent via the BRLTTY mailing list.
To post a message, send an e-mail to: BRLTTY@mielke.cc
For general information, go to: http://mielke.cc/mailman/listinfo/brltty

Reply via email to