RFR(XS): 8054530: C2: assert(res == old_res) failed: Inconsistency between old and new

David Chase david.r.chase at oracle.com
Wed Aug 13 17:20:20 UTC 2014

Minor nit, would you consider moving the assignment to “res” up above the #ifdef ASSERT,
and then sucking the assert(res == old_res) inside the #ifdef ASSERT/#endif ?
That way the apparent reference to “old_res” occurs within the same ifdef that defines it,
even though we know that (right now, at least) assert is a macro that makes its first
parameter go away if ASSERT is not defined.

And could HeapWordsPerOop also be unsigned?


On 2014-08-13, at 12:48 PM, Morris Meyer <morris.meyer at oracle.com> wrote:

> Folks,
> Could I get a review for this issue?  On Linux-SparcV9 7u72 with Gcc 4.4 compilers (circa 2010), the asserted calculation leaves the high order bit set in the variable old_res, which causes the bug. align_size_up() calls for size_t and fixing array_size(int length) to properly pass unsigned ints fixes this issue.
> This patch has been tested with JPRT against 7u-dev repositories.
> Thanks,
>        --morris
> WEBREV - http://cr.openjdk.java.net/~morris/8054530.01/
> JBS - http://bugs.openjdk.java.net/browse/JDK-8054530

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 801 bytes
Desc: Message signed with OpenPGP using GPGMail
URL: <http://mail.openjdk.java.net/pipermail/hotspot-compiler-dev/attachments/20140813/9f5876a8/signature.asc>

More information about the hotspot-compiler-dev mailing list