<AWT Dev> [16] RFR 8232114: JVM crashed at imjpapi.dll in native code

Dmitry Markov dmitry.markov at oracle.com
Tue Aug 11 08:07:13 UTC 2020


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>

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

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

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.openjdk.java.net/pipermail/awt-dev/attachments/20200811/b98b714a/attachment.htm>

More information about the awt-dev mailing list