United StatesChange Country, Oracle Worldwide Web Sites Communities I am a... I want to...
Bug ID: JDK-6913869 Zero assert fix
JDK-6913869 : Zero assert fix

Details
Type:
Bug
Submit Date:
2010-01-04
Status:
Closed
Updated Date:
2012-10-08
Project Name:
JDK
Resolved Date:
2010-01-19
Component:
hotspot
OS:
generic
Sub-Component:
runtime
CPU:
generic
Priority:
P5
Resolution:
Fixed
Affected Versions:
hs17
Fixed Versions:
hs17 (b07)

Related Reports
Backport:
Backport:
Backport:

Sub Tasks

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
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
                                     
2010-01-04
EVALUATION

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



Hardware and Software, Engineered to Work Together