8145700: Uninitialised variable in macroAssembler_x86.cpp:7038
Summary: Added missing local variable initializations.
Reviewed-by: kvn, vlivanov, thartmann, mcberg
Contributed-by: Rahul Raghavan <rahul.v.raghavan@oracle.com>
--- a/hotspot/src/cpu/x86/vm/macroAssembler_x86.cpp Wed Feb 10 11:23:17 2016 -1000
+++ b/hotspot/src/cpu/x86/vm/macroAssembler_x86.cpp Thu Feb 11 11:15:13 2016 +0100
@@ -7845,7 +7845,9 @@
Label COMPARE_WIDE_VECTORS_LOOP_FAILED; // used only _LP64 && AVX3
int stride, stride2, adr_stride, adr_stride1, adr_stride2;
int stride2x2 = 0x40;
- Address::ScaleFactor scale, scale1, scale2;
+ Address::ScaleFactor scale = Address::no_scale;
+ Address::ScaleFactor scale1 = Address::no_scale;
+ Address::ScaleFactor scale2 = Address::no_scale;
if (ae != StrIntrinsicNode::LL) {
stride2x2 = 0x20;
@@ -7899,9 +7901,9 @@
stride = 8;
}
} else {
- scale = Address::no_scale; // not used
scale1 = Address::times_1;
scale2 = Address::times_2;
+ // scale not used
stride = 8;
}