[11u] Backport 8229352: Use of an unitialized register in 32-bit ARM template interpreter

Boris Ulasevich boris.ulasevich at bell-sw.com
Tue Aug 20 14:31:56 UTC 2019


Hi Christoph,

As I can see, the patch applies cleanly to jdk11u:
/home/jdk11u$ wget -O- 
http://cr.openjdk.java.net/~bulasevich/8229352/webrev.01/jdk-jdk.patch | 
patch -p1
patching file src/hotspot/cpu/arm/templateTable_arm.cpp
Hunk #1 succeeded at 527 (offset 40 lines).

I think we can proceed without additional change review:
https://wiki.openjdk.java.net/display/JDKUpdates/How+to+contribute+a+fix

Please send me "Fix Request" comment for the issue when testing is done. 
I will update JBS for you.

thanks,
Boris

On 20.08.2019 8:53, christoph.goettschkes at microdoc.com wrote:
> Hi Boris,
> 
> could you help me with the backport of the changeset to the jdk11u
> repository too?
> 
> I already created a patch which applies cleanly to jdk11u-dev (see below).
> The only differences in the patch are the line numbers (see my first
> mail). Maybe it is easier for you to export the original changeset and
> apply it to jdk11u-dev? I am currently running the hotspot tier1 JTreg
> tests (looks good so far) and will report the results in the RFR (it takes
> some time on the small device).
> 
> Thanks,
> Christoph
> 
> --- a/src/hotspot/cpu/arm/templateTable_arm.cpp
> +++ b/src/hotspot/cpu/arm/templateTable_arm.cpp
> @@ -527,19 +527,20 @@
>   
>     __ add(Rbase, Rcpool, AsmOperand(Rindex, lsl, LogBytesPerWord));
>   
> -  Label Condy, exit;
> -#ifdef __ABI_HARD__
> -  Label Long;
>     // get type from tags
>     __ add(Rtemp, Rtags, tags_offset);
>     __ ldrb(Rtemp, Address(Rtemp, Rindex));
> +
> +  Label Condy, exit;
> +#ifdef __ABI_HARD__
> +  Label NotDouble;
>     __ cmp(Rtemp, JVM_CONSTANT_Double);
> -  __ b(Long, ne);
> +  __ b(NotDouble, ne);
>     __ ldr_double(D0_tos, Address(Rbase, base_offset));
>   
>     __ push(dtos);
>     __ b(exit);
> -  __ bind(Long);
> +  __ bind(NotDouble);
>   #endif
>   
>     __ cmp(Rtemp, JVM_CONSTANT_Long);
> 
> "jdk-updates-dev" <jdk-updates-dev-bounces at openjdk.java.net> wrote on
> 2019-08-19 18:12:06:
> 
>> From: christoph.goettschkes at microdoc.com
>> To: jdk-updates-dev at openjdk.java.net
>> Date: 2019-08-19 18:15
>> Subject: [11u] Backport 8229352: Use of an unitialized register in
> 32-bit ARM
>> template interpreter
>> Sent by: "jdk-updates-dev" <jdk-updates-dev-bounces at openjdk.java.net>
>>
>> Hello,
>>
>> I would like to backport the changset [1], which fixes the issue [2] in
>> the jdk/jdk repository to the jdk11u. I originally found the issue while
> 
>> working with the OpenJDK 11 and the first provided fix has been develop
>> using the jdk11u repository. The changeset [1] does not apply cleanly to
> 
>> jdk11u, since the jdk/jdk repository no longer contains the 64-bit arm
>> code in the "hotspot/cpu/arm" source tree (only in hotspot/cpu/aarch64).
>>
>> The backport fixes the use of an uninitialized register "Rtmep" in the
>> template interpreter for the ldc2_w bytecode instruction on 32-bit ARM
>> soft-fp platforms. The current implementation has the following two
>> issues:
>> 1. Loading a constant of type long most likely calls into the
> interpreter
>> runtime and loads the constant using the slow path.
>> 2. Loading a constant of type double could theoretically not call into
> the
>> runtime, but load the value as if it would be of type long.
>> I did not experience the second issue, only the first one.
>>
>> Could some please make the appropriate changes to the bug report? I can
>> provide a patch and test the changes.
>>
>> Thanks,
>> Christoph
>>
>> [1]: http://hg.openjdk.java.net/jdk/jdk/rev/2e58f5d927a6
>> [2]: https://bugs.openjdk.java.net/browse/JDK-8229352
>>
> 


More information about the jdk-updates-dev mailing list