JDK-6913869 : Zero assert fix
  • Type: Bug
  • Component: hotspot
  • Sub-Component: runtime
  • Affected Version: hs17
  • Priority: P5
  • Status: Closed
  • Resolution: Fixed
  • OS: generic
  • CPU: generic
  • Submitted: 2010-01-04
  • Updated: 2012-10-08
  • Resolved: 2010-01-19
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 6 JDK 7 Other
6u21Fixed 7Fixed OpenJDK6,hs17Fixed
Description
Gary Benson wrote (http://mail.openjdk.java.net/pipermail/hotspot-dev/2009-December/002516.html):

Hi all,

Zero currently won't build on zSeries or PowerPC machines with
assertions turned on.  This webrev fixes:

  http://cr.openjdk.java.net/~gbenson/zero-signedness-fix/

I haven't filed a bug for this one, it'll only get bounced by
the triage people if I file it.

Cheers,
Gary

Comments
EVALUATION http://hg.openjdk.java.net/jdk7/hotspot-comp/hotspot/rev/896da934748c
04-01-2010

SUGGESTED FIX --- old/hotspot/src/share/vm/prims/jni.cpp 2009-12-22 13:26:23.000000000 +0000 +++ new/hotspot/src/share/vm/prims/jni.cpp 2009-12-22 13:26:23.000000000 +0000 @@ -3241,7 +3241,7 @@ jint b = Atomic::xchg(0xdeadbeef, &a); void *c = &a; void *d = Atomic::xchg_ptr(&b, &c); - assert(a == 0xdeadbeef && b == (jint) 0xcafebabe, "Atomic::xchg() works"); + assert(a == (jint) 0xdeadbeef && b == (jint) 0xcafebabe, "Atomic::xchg() works"); assert(c == &b && d == &a, "Atomic::xchg_ptr() works"); } #endif // ZERO && ASSERT
04-01-2010