Request For Review (XS), 7077806, ARM: java.lang.InternalError: bound subword value does not fit into the subword type
Christian Thalinger
christian.thalinger at oracle.com
Wed Sep 14 04:34:05 PDT 2011
Looks good. -- Christian
On Sep 14, 2011, at 1:13 PM, Bertrand Delsart wrote:
> Small shared fix for a bug in JSR292 ports:
>
> http://cr.openjdk.java.net/~bdelsart/7077806/webrev.00/
>
> Error comes form the fact that shifting by values higher than the number of bits is undefined in standard C and C++:
> "The integer promotions are performed on each of the operands. The type of the result is that of the promoted left operand. If the value of the right operand is negative or is greater than or equal to the width of the promoted left operand, the behavior is undefined."
>
> On SPARC and x86, the high bits were ignored and the code was behaving as expected.
>
> On ARM, this is not the case. The shifts were actually resulting in 0.
>
> Ensuring that the shift is a legal C value solves the problem.
>
> Bertrand.
>
>
> --
> Bertrand Delsart, bertrand.delsart at oracle.com,
> Sun-Oracle France, 180 av. de l'Europe, ZIRST de Montbonnot,
> 38334 Saint Ismier, FRANCE
More information about the hotspot-compiler-dev
mailing list