Fwd: XInitThreads in library constructor breaks Motif!

Matthieu Herrb matthieu at herrb.eu
Tue Nov 1 17:43:08 UTC 2022


On Tue, Nov 01, 2022 at 01:25:06PM -0400, Adam Jackson wrote:
> On Mon, Oct 31, 2022 at 8:46 PM Po Lu <luangruo at yahoo.com> wrote:
> 
> > Adam Jackson <ajax at redhat.com> writes:
> >
> > > Because XInitThreads only works if it is called before XOpenDisplay.
> >
> > So why not fix that?
> >
> > I think the simple fix would be to call _XInitDisplayLock in
> > XGetXCBConnection.
> >
> 
> That wouldn't be sufficient, off the top of my head there's library-global
> state that gets set up in XInitThreads too and none of the display-level
> locking will work without it.
> 
> Again, I proposed a workaround that preserves the thread-safety guarantee I
> need, and wrote the patch implementing it. Sure would be nice if someone
> tested it.
> 

Hi,

I'm trying to get it tested on OpenBSD where some people complained
after the import of libX11 1.8.1:

https://marc.infœ?l=openbsd-tech&m=166729483920618&w=2

On my small test case it seems to fix the issue.
-- 
Matthieu Herrb


More information about the xorg-devel mailing list