JDK-4703266 : Unsafe.setObject is missing a card mark
  • Type: Bug
  • Component: hotspot
  • Sub-Component: runtime
  • Affected Version: 1.4.1
  • Priority: P2
  • Status: Closed
  • Resolution: Fixed
  • OS: solaris_8,windows_2000
  • CPU: x86,sparc
  • Submitted: 2002-06-17
  • Updated: 2012-10-08
  • Resolved: 2002-06-27
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.
Other
1.4.1 rcFixed
Related Reports
Relates :  
Relates :  
Description
This bug is second crash found while investigating 4698522.  The code for Unsafe.setObject in unsafe.cpp is missing a card mark so the scavenger can't work correctly.  The fix is simply to modify Unsafe_SetObject to work pretty much like Unsafe_SetObject140.  The bug was introduced as part of the work for 4616656, the rewrite of the unsafe API for 64-bit.

Comments
CONVERTED DATA BugTraq+ Release Management Values COMMIT TO FIX: hopper-rc FIXED IN: hopper-rc INTEGRATED IN: hopper-rc
14-06-2004

SUGGESTED FIX *** /tmp/geta19997 Mon Jun 17 10:40:03 2002 --- unsafe.cpp Mon Jun 17 10:10:57 2002 *************** *** 157,163 **** UNSAFE_ENTRY(void, Unsafe_SetObject(JNIEnv *env, jobject unsafe, jobject obj, jlong offset, jobject x_h)) UnsafeWrapper("Unsafe_SetObject"); oop x = JNIHandles::resolve(x_h); ! SET_FIELD(obj, offset, oop, x); UNSAFE_END --- 157,165 ---- UNSAFE_ENTRY(void, Unsafe_SetObject(JNIEnv *env, jobject unsafe, jobject obj, jlong offset, jobject x_h)) UnsafeWrapper("Unsafe_SetObject"); oop x = JNIHandles::resolve(x_h); ! //SET_FIELD(obj, offset, oop, x); ! oop p = JNIHandles::resolve(obj); ! oop_store((oop*)index_oop_from_field_offset_long(p, offset), x); UNSAFE_END
11-06-2004

EVALUATION You're absolutely right Tom. ###@###.### 2002-06-17 Removed mantis from integrated in release per p-team ###@###.### 2002-10-18
17-06-2002