Skip to content

Commit 2eecf15

Browse files
author
Markus Grönlund
committedMar 17, 2025
8351967: JFR: AnnotationIterator should handle num_annotations = 0
Reviewed-by: egahlin
1 parent c8913d2 commit 2eecf15

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed
 

‎src/hotspot/share/jfr/instrumentation/jfrEventClassTransformer.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -338,7 +338,7 @@ class AnnotationIterator : public StackObj {
338338
_buffer(_limit > 2 ? ar->adr_at(2) : nullptr),
339339
_current(0),
340340
_next(0) {
341-
if (_buffer != nullptr) {
341+
if (_limit >= 2) {
342342
_limit -= 2; // subtract sizeof(u2) number of annotations field
343343
}
344344
}

0 commit comments

Comments
 (0)