RFR(S): 8029351: assert(bt != T_OBJECT) failed: Guard is incorrect in VM:defmeth

Christian Thalinger christian.thalinger at oracle.com
Sun Dec 8 17:42:20 PST 2013


If we don’t do it now we’ll never do it.  Process doesn't matter here.  If the bug was approved to be pushed into 8 it’s up to us developers how we fix it (as long as Reviewers are okay with the fix).

On Dec 8, 2013, at 1:48 PM, David Chase <david.r.chase at oracle.com> wrote:

> Do you think it's worth changing for this one?
> I'm a little mystified at how this interacts with process at this stage.
> 
> David
> 
> On 2013-12-08, at 1:25 PM, Christian Thalinger <christian.thalinger at oracle.com> wrote:
> 
>> It would only be used once but I think it would be a good idea to move the "is this an object?” test into a method in constantTag.  That way the checks would have a descriptive name and be co-located with the other tags.  Might help to avoid bugs like this in the future.
>> 
>> The fix looks good.
>> 
>> On Dec 7, 2013, at 7:12 PM, David Chase <david.r.chase at oracle.com> wrote:
>> 
>>> RT-dev CC'd because this was more of a runtime bug, except that involved methodHandles.
>>> 
>>> bug: https://bugs.openjdk.java.net/browse/JDK-8029351
>>> webrev: http://cr.openjdk.java.net/~drchase/8029351/webrev.01/
>>> 
>>> Running "defmeth", especially with -Xcomp and -XX:+AggressiveOpts, sometimes (1 in 25 to 1 in 50)
>>> causes a crash in fastdebug, that in release builds is instead a signal-ignoring infinite loop.
>>> 
>>> The cause was failure to include the method_handle_in_error and method_type_in_error
>>> cases in the "is this an object?" test.  This immediately led to a blown assertion in a debug build.
>>> Fix was to add the obvious clauses to the if:
>>> 
>>>     tag.is_unresolved_klass() ||
>>>     tag.is_string() ||
>>>     tag.is_method_handle() ||
>>> -      tag.is_method_type()) {
>>> +      tag.is_method_type() ||
>>> +      tag.is_method_handle_in_error() ||
>>> +      tag.is_method_type_in_error()) {
>>>   assert(bt == T_OBJECT, "Guard is incorrect");
>>>   cts = CellTypeState::make_line_ref(bci);
>>> } else {
>>> 
>>> Testing:
>>> defmeth, fastdebug build with bug-provoking flags , 1000 times.
>>> All ran w/o crash (i.e., only with other existing known failures), all produced the same output.
>>> 
>>> David
>>> 
>> 
> 



More information about the hotspot-compiler-dev mailing list