United StatesChange Country, Oracle Worldwide Web Sites Communities I am a... I want to...
JDK-6629727 : assertion in set_trap_state() in methodDataOop.hpp is too strong.

Details
Type:
Bug
Submit Date:
2007-11-14
Status:
Closed
Updated Date:
2011-03-08
Project Name:
JDK
Resolved Date:
2011-03-08
Component:
hotspot
OS:
generic
Sub-Component:
runtime
CPU:
generic
Priority:
P4
Resolution:
Fixed
Affected Versions:
hs12
Fixed Versions:
hs13 (b02)

Related Reports
Backport:
Backport:

Sub Tasks

Description
In methodDataOop.hpp

  void set_trap_state(int new_state) {
    assert(ProfileTraps, "used only under +ProfileTraps");
    uint old_flags = (_header._struct._flags & flag_mask);
    _header._struct._flags = (new_state << trap_shift) | old_flags;
    assert(trap_state() == new_state, "sanity");
  } 

the assertion

assert(trap_state() == new_state, "sanity");

can fail if the trap state is being set simultaneously by another
thread.

                                    

Comments
EVALUATION

The assertion is too strong and should be removed.
                                     
2007-11-14



Hardware and Software, Engineered to Work Together