[PATCH] winex11.drv: Protect XOpenIM with a critical section.

Bernhard Übelacker bernhardu at mailbox.org
Wed Sep 11 10:54:10 CDT 2019


Am 11.09.19 um 17:32 schrieb Dmitry Timoshkov:
> Bernhard Übelacker <bernhardu at mailbox.org> wrote:
> 
>> Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=47366
>>
>> I could reproduce for "Far Manager v2.0 build 1807 x86"
>> that "double free or corruption (!prev)" bug.
>>
>> After some debugging and additional logging I guess this is a race
>> between two threads living in Far.exe.
>> Both run through XOpenIM at the same time, the main process by calling
>> ToUnicodeEx, the other thread by CreateWindowExW.
>> Therefore sometimes freeing the same memory. Sometimes just freezing.
>>
>> Because of this being timing related, I cannot say if this is really
>> a regression.
>>
>> A comment above open_xim reads:
>> "Should always be called with the x11 lock held"
>> Got this "x11 lock" removed in 2012?
> 
> There's no point in adding workarounds for X11 bugs:
> https://bugs.winehq.org/show_bug.cgi?id=31882
> https://bugs.winehq.org/show_bug.cgi?id=35041
> 
> It would be much better to fix X11 side instead.
> 

Thanks for the clarification, I should have queried
the bugtracker for XOpenIM.

Then is "Should always be called with the x11 lock held"
still right?

And just for the record, I found now this upstream bug,
unfortunately it got not much care in the last years:
https://bugs.freedesktop.org/show_bug.cgi?id=69088

Kind regards,
Bernhard



More information about the wine-devel mailing list