XIM module does not proctect access to its global variables, so every call to XIM should be protected by a global lock. See http://bugs.winehq.org/show_bug.cgi?id=34367.
As a clarification, I first posted a bug to uim, but they said it's not a bug of theirs. Muneyuki Noguchi changed bug 68885 What Removed Added Status NEW RESOLVED Resolution --- NOTOURBUG Comment # 1 on bug 68885 from Muneyuki Noguchi This bug has nothing to do with uim, which isn't a part of libX11. In this kind of situation, either the callee protects its global variabls or the caller does it in its stead. I'm not an expert C programmer so I don't know which is the usual practise (I understand that the absense of locks in the callee makes it generally more performant, but making the odds of crashes more likely if the caller is not aware of it).
-- GitLab Migration Automatic Message -- This bug has been migrated to freedesktop.org's GitLab instance and has been closed from further activity. You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.freedesktop.org/xorg/lib/libx11/issues/31.
Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.