changeset 52516:710e5a66a64e

8213745: Don't use memset to initialize array of RegMask in matcher.cpp Reviewed-by: kvn, shade
author rkennke
date Mon, 12 Nov 2018 22:00:07 +0100
parents a609d549992a
children 52be2c714a2f
files src/hotspot/share/opto/matcher.cpp
diffstat 1 files changed, 3 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/src/hotspot/share/opto/matcher.cpp	Mon Nov 12 08:33:59 2018 -0800
+++ b/src/hotspot/share/opto/matcher.cpp	Mon Nov 12 22:00:07 2018 +0100
@@ -1209,7 +1209,9 @@
   // Allocate a private array of RegMasks.  These RegMasks are not shared.
   msfpt->_in_rms = NEW_RESOURCE_ARRAY( RegMask, cnt );
   // Empty them all.
-  memset( msfpt->_in_rms, 0, sizeof(RegMask)*cnt );
+  for (uint i = 0; i < cnt; i++) {
+    msfpt->_in_rms[i] = RegMask();
+  }
 
   // Do all the pre-defined non-Empty register masks
   msfpt->_in_rms[TypeFunc::ReturnAdr] = _return_addr_mask;