[8u] RFR: Fix JFR crash in WriteObjectSampleStacktrace with object has uninitialized klass
kalinshi(施慧)
kalinshi at tencent.com
Mon Nov 2 06:37:45 UTC 2020
Hi All,
Please help review crash fix in 8u JFR.
JFR ObjectSample's _object field might have uninitialized klass when it is iterated in WriteObjectSampleStacktrace. Because ObjectSample is created before post_allocation_setup.
This problem doesn't exist in 11 or master, as ObjectSample is created in MemAllocator::Allocation destruction method (notify_allocation_jfr_sampler), its klass is initialized.
Detail reproduce and analysis in JBS. Before this patch, debug version crash 17 time sin 12 hours, with this patch, no crash reproduced.
JBS: https://bugs.openjdk.java.net/browse/JDK-8255717
Webrev http://cr.openjdk.java.net/~hshi/8255717/webrev/
Regards
Hui
More information about the jdk8u-dev
mailing list