[11u] RFR (XS) 8259049: Uninitialized variable after JDK-8257513
Aleksey Shipilev
shade at redhat.com
Wed Jan 6 18:43:35 UTC 2021
Original bug:
https://bugs.openjdk.java.net/browse/JDK-8259049
https://git.openjdk.java.net/jdk/commit/9f151649
This is a trivial follow-up for JDK-8257513 backport. Since the original code was moved from
compile.cpp (as in JDK-8257513 as well), it does not apply cleanly.
11u variant:
diff -r ac1c8fae8707 src/hotspot/share/opto/compile.cpp
--- a/src/hotspot/share/opto/compile.cpp Mon Dec 21 08:06:48 2020 +0000
+++ b/src/hotspot/share/opto/compile.cpp Wed Jan 06 19:43:11 2021 +0100
@@ -4177,11 +4177,11 @@
}
assert((constant_addr - _masm.code()->consts()->start()) == con.offset(),
"must be: %d == %d", (int)(constant_addr - _masm.code()->consts()->start()),
(int)(con.offset()));
// Expand jump-table
- address last_addr;
+ address last_addr = NULL;
for (uint j = 1; j < n->outcnt(); j++) {
last_addr = _masm.address_constant(dummy + j);
if (last_addr == NULL) {
return false;
}
Testing: observing build warning before this patch, and no warning after
--
Thanks,
-Aleksey
More information about the jdk-updates-dev
mailing list