[9] RFR(S): 8049043: Load variable through a pointer of an incompatible type in hotspot/src/share/vm/runtime/sharedRuntimeMath.hpp

Vladimir Kozlov vladimir.kozlov at oracle.com
Wed Jul 23 17:58:32 UTC 2014


Tobias, why you are creating local copy 'conv' of a variable in all places?

Vladimir

On 7/23/14 4:12 AM, Tobias Hartmann wrote:
> Hi,
>
> please review the following patch for JDK- 8049043 (Parfait warning).
>
> Bug: https://bugs.openjdk.java.net/browse/JDK-8049043
> Webrev: http://cr.openjdk.java.net/~thartmann/8049043/webrev.01/
>
> Problem:
> Parfait issues 6 warnings " Load variable through a pointer of an
> incompatible type" because of the __HI(x) and __LO(x) macros used in
> copysignA and scalbnA (share/vm/runtime/sharedRuntimeMath.hpp) to cast
> between double* and int*.
>
> Solution:
> A union 'DoubleIntConv' is used to access the high and low 32 bits of a
> double.
> The '# pragma warning( disable: 4748 )' in sharedRuntimeTrans.cpp is
> necessary because otherwise the VS compiler fails with the following
> warning: "/GS can not protect parameters and local variables from local
> buffer overrun because optimizations are disabled in function". There
> exists a bug to fix this [1].
>
> Testing:
> JPRT, Parfait (all 6 warnings removed)
>
> Thanks,
> Tobias
>
> [1] https://bugs.openjdk.java.net/browse/JDK-8046696


More information about the hotspot-compiler-dev mailing list