Hello,

Could you review the fix for JDK 16, please?

        bug: https://bugs.openjdk.java.net/browse/JDK-8232114 
<https://bugs.openjdk.java.net/browse/JDK-8232114>
        webrev: http://cr.openjdk.java.net/~dmarkov/8232114/webrev.00/ 
<http://cr.openjdk.java.net/~dmarkov/8232114/webrev.00/>

Problem description:
The root cause of the crash is the lack of synchronisation in imjpapi.dll. In 
particular when IME messages are processed in the message loop and another 
message triggered through a SendMessage() call, this clears the buffer context 
so on further processing the message loop in IME context will point to invalid 
memory buffer. Microsoft article devoted to this issue: 
https://docs.microsoft.com/en-us/troubleshoot/windows/win32/ime-crash-processing-cross-thread-sent-message
 
<https://docs.microsoft.com/en-us/troubleshoot/windows/win32/ime-crash-processing-cross-thread-sent-message>

Fix: 
Replace SendMessage() with PostMessage() for IME messages and implement event 
based mechanism to notify the sender that the message processing is completed.

Testing:
mach5 client tests (jtreg headful, jck, etc.) are green.

Regards,
Dmitry

Reply via email to