RFR (XS/T) 8237847: Zero builds fail after JDK-8237637 (Remove dubious type conversions from oop)

Daniel D. Daugherty daniel.daugherty at oracle.com
Sat Jan 25 13:52:52 UTC 2020


Thumbs up. I agree that this is a trivial change.

Dan


On 1/25/20 4:46 AM, Aleksey Shipilev wrote:
> Bug:
>    https://bugs.openjdk.java.net/browse/JDK-8237847
>
> Seems like JDK-8237637 missed the spot there.
>
> Fix:
>
> diff -r d3cdf4b2b45b src/hotspot/share/interpreter/bytecodeInterpreter.cpp
> --- a/src/hotspot/share/interpreter/bytecodeInterpreter.cpp     Fri Jan 24 21:57:19 2020 +0000
> +++ b/src/hotspot/share/interpreter/bytecodeInterpreter.cpp     Sat Jan 25 10:18:22 2020 +0100
> @@ -2171,11 +2171,11 @@
>               }
>   #endif
>               if (result != NULL) {
>                 // Initialize object (if nonzero size and need) and then the header
>                 if (need_zero ) {
> -                HeapWord* to_zero = (HeapWord*) result + sizeof(oopDesc) / oopSize;
> +                HeapWord* to_zero = cast_from_oop<HeapWord*>(result) + sizeof(oopDesc) / oopSize;
>                   obj_size -= sizeof(oopDesc) / oopSize;
>                   if (obj_size > 0 ) {
>                     memset(to_zero, 0, obj_size * HeapWordSize);
>                   }
>                 }
>
>
> Testing: Linux x86_64 zero {fastdebug,release} build
>



More information about the hotspot-dev mailing list