Details
Description
I have a qt5 android program which will call JNI code in multiple threads, it will randomly crashed, I found it crashed in getCachedMethodID() in qjni.cpp through core dump.
It seems that getCachedMethodID() will access a global data structure JMethodIDHash, and it is totally un-protected from multi-threaded access. I think we should use a mutex to protect it.
Attachments
For Gerrit Dashboard: QTBUG-42755 | ||||||
---|---|---|---|---|---|---|
# | Subject | Branch | Project | Status | CR | V |
100468,2 | Android: protect global jni cache. | 5.4.0 | qt/qtbase | Status: MERGED | +2 | 0 |