Skip to content
This repository has been archived by the owner on Sep 19, 2023. It is now read-only.
/ jdk19 Public archive


8289799: Build warning in methodData.cpp memset zero-length parameter
Browse files Browse the repository at this point in the history
Backport-of: cce77a7
  • Loading branch information
tstuefe committed Jul 8, 2022
1 parent 6428607 commit ea21c46
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/hotspot/share/oops/methodData.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1245,7 +1245,9 @@ void MethodData::initialize() {
int extra_size = extra_data_count * DataLayout::compute_size_in_bytes(0);

// Let's zero the space for the extra data
Copy::zero_to_bytes(((address)_data) + data_size, extra_size);
if (extra_size > 0) {
Copy::zero_to_bytes(((address)_data) + data_size, extra_size);

// Add a cell to record information about modified arguments.
// Set up _args_modified array after traps cells so that
Expand Down

1 comment on commit ea21c46

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.