From 1b6ae2059b0475ec78559d2d6612f3b6ec68309f Mon Sep 17 00:00:00 2001 From: Matias Saavedra Silva Date: Mon, 2 Jun 2025 15:29:30 +0000 Subject: [PATCH] 8357576: FieldInfo::_index is not initialized by the constructor Reviewed-by: coleenp, dholmes --- src/hotspot/share/oops/fieldInfo.hpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/hotspot/share/oops/fieldInfo.hpp b/src/hotspot/share/oops/fieldInfo.hpp index d2fd79332a9..8740d539c8f 100644 --- a/src/hotspot/share/oops/fieldInfo.hpp +++ b/src/hotspot/share/oops/fieldInfo.hpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2011, 2023, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2011, 2025, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -137,7 +137,8 @@ class FieldInfo { public: - FieldInfo() : _name_index(0), + FieldInfo() : _index(0), + _name_index(0), _signature_index(0), _offset(0), _access_flags(AccessFlags(0)), @@ -147,6 +148,7 @@ class FieldInfo { _contention_group(0) { } FieldInfo(AccessFlags access_flags, u2 name_index, u2 signature_index, u2 initval_index, FieldInfo::FieldFlags fflags) : + _index(0), _name_index(name_index), _signature_index(signature_index), _offset(0),