RFR: 8262092: vmTestbase/nsk/jvmti/scenarios/hotswap/HS102/hs102t001/TestDescription.java SIGSEGV in memmove_ssse3
Alex Menkov
amenkov at openjdk.java.net
Wed May 5 22:11:50 UTC 2021
On Wed, 5 May 2021 20:59:01 GMT, Leonid Mesnik <lmesnik at openjdk.org> wrote:
>> Class loading can happen on different threads, but HotSwap agent is not ready to this - classCount variable is used without any synchronization.
>> The fix adds synchronization for ClassFileLoadHook.
>
> test/hotspot/jtreg/vmTestbase/nsk/share/jvmti/hotswap/HotSwap.cpp line 71:
>
>> 69: static int classCount = 0;
>> 70: /* lock to access classCount */
>> 71: static jrawMonitorID classLoadLock = NULL;
>
> I think it would simpler to use an atomic counter rather than monitors for this fix.
Do you mean use <atomic> from STL?
I'm not sure it would be simpler as we need logic like "get the value, if the value is less than max_classes, increment it"
-------------
PR: https://git.openjdk.java.net/jdk/pull/3889
More information about the serviceability-dev
mailing list