United StatesChange Country, Oracle Worldwide Web Sites Communities I am a... I want to...
Bug ID: JDK-6458634 A Klass being allocated may dispatch to the wrong oop_is_parsable
JDK-6458634 : A Klass being allocated may dispatch to the wrong oop_is_parsable

Details
Type:
Bug
Submit Date:
2006-08-09
Status:
Resolved
Updated Date:
2010-04-02
Project Name:
JDK
Resolved Date:
2006-11-14
Component:
hotspot
OS:
generic
Sub-Component:
gc
CPU:
generic
Priority:
P4
Resolution:
Fixed
Affected Versions:
6
Fixed Versions:
hs10 (b03)

Related Reports
Backport:
Backport:
Backport:
Relates:

Sub Tasks

Description
During the allocation of a Klass the vtbl pointer may not be reliable.
See  comments for details

                                    

Comments
EVALUATION

See the descritpion of the problem in the comments.
                                     
2006-08-09
SUGGESTED FIX

Job ID:                 20061026145421.jmasa.gc_baseline_vtbl
Original workspace:     arches:/net/arches/export/home0/java/gc_baseline_vtbl
Submitter:              jmasa
Archived data:          /net/prt-archiver.sfbay/data/archived_workspaces/main/gc_baseline/2006/20061026145421.jmasa.gc_baseline_vtbl/
Webrev:                 http://analemma.sfbay.sun.com/net/prt-archiver.sfbay/data/archived_workspaces/main/gc_baseline/2006/20061026145421.jmasa.gc_baseline_vtbl/workspace/webrevs/webrev-2006.10.26/index.html

Fixed 6458634: A Klass being allocated may dispatch to the wrong oop_is_parsable

During the allocation of a Klass the vtbl pointer is set in the constructor of
Klass and then again in the constructor of each derived Klasses.  If the
is_parsable() method is consulted before the vtbl pointer has not reached its
final value, the wrong oop_is_parsable() may be called.

The fix is to reorganize the code so that the setting of the klass 
pointer can be delayed until after the vtable pointer has been installed.

Reviewed by: Ramki and Dave Dice

Fix verified (y/n): y

Verification testing:

The problem was detected as an asertion failure 
while running a debug build on runThese -plumhall.  That
test was run repeatedly without the occurrance of the
assertion failure. 

Other testing:
	runThese -full on a product build, solx86
	runThese -quick -testbase_vm -testbase_gc on a product and
	fastdebug builds, sparc, cms
	refworkload runs for cms and ps showed no significant differences.

Files:
update: src/share/vm/gc_interface/collectedHeap.hpp
update: src/share/vm/gc_interface/collectedHeap.inline.hpp
update: src/share/vm/oops/klass.cpp
update: src/share/vm/oops/klass.hpp

Examined files: 3884

Contents Summary:
       4   update
    3880   no action (unchanged)
                                     
2006-10-27



Hardware and Software, Engineered to Work Together