Skip to content


8289799: Build warning in methodData.cpp memset zero-length parameter
Browse files Browse the repository at this point in the history
Backport-of: cce77a700141a854bafaa5ccb33db026affcf322
  • Loading branch information
tstuefe committed Jul 8, 2022
1 parent 4f1ac63 commit 6d56b2b
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 @@ -1168,7 +1168,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 6d56b2b

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.