[jdk11u-dev] RFR: 8260589: Crash in JfrTraceIdLoadBarrier::load(_jclass*)
Markus Grönlund
mgronlun at openjdk.java.net
Tue Jul 6 09:58:51 UTC 2021
On Mon, 21 Jun 2021 03:13:14 GMT, Denghui Dong <ddong at openjdk.org> wrote:
> Could I have a review of this backport that fixes a crash problem?
>
> Although there are many conflicts, I think it's necessary to backport it to 11u since the problem is very easy to reproduce.
>
> And I hope JFR's folks could review it.
>
> In addition to the different context of modified files, I think the following items we should review carefully:
>
> 1. use MaxJfrEventId + 100 instead of LAST_TYPE_ID + 1 as the klass id of void.class
> 2. jdk 11 doesn't support jfr streaming, so I removed the call `JfrTraceIdEpoch::set_changed_tag_state()` in `load_primitive`
> 3. the Class in jdk 11 doesn't have the field 'hidden', so I removed `writer->write<bool>(false);` in `write_primitive`
> 4. there are many differences in the API of JfrTraceId between 11u and tip
>
> Thanks,
> Denghui
Changes requested by mgronlun (Reviewer).
src/hotspot/share/jfr/recorder/checkpoint/types/jfrTypeSet.cpp line 306:
> 304: if (array_klass == NULL) {
> 305: // The first klass id is reserved for the void.class.
> 306: return MaxJfrEventId + 100;
101?
src/hotspot/share/jfr/recorder/checkpoint/types/jfrTypeSet.cpp line 992:
> 990: ClearKlassAndMethods clear(_writer);
> 991: _artifacts->iterate_klasses(clear);
> 992: JfrTypeSet::clear();
JfrTypeSet::clear() sets _clear_artifacts to true already. Maybe remove that call or remove the adjoining _clear_artifacts = true.
src/hotspot/share/jfr/recorder/checkpoint/types/traceid/jfrTraceId.cpp line 203:
> 201: if (tak == NULL) {
> 202: // The first klass id is reserved for the void.class
> 203: id = MaxJfrEventId + 100;
101? Because traceid class_id_counter = MaxJfrEventId + 101, letting the first dynamically assigned id start at 102.
-------------
PR: https://git.openjdk.java.net/jdk11u-dev/pull/47
More information about the jdk-updates-dev
mailing list