[11u] RFR (XS) 8259049: Uninitialized variable after JDK-8257513

Vladimir Kozlov vladimir.kozlov at oracle.com
Wed Jan 6 19:03:02 UTC 2021


Good.

Vladimir K

On 1/6/21 10:43 AM, Aleksey Shipilev wrote:
> 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
> 


More information about the jdk-updates-dev mailing list