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

David Chase david.r.chase at oracle.com
Sat Dec 7 19:12:32 PST 2013

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 {

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.


-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 801 bytes
Desc: Message signed with OpenPGP using GPGMail
Url : http://mail.openjdk.java.net/pipermail/hotspot-runtime-dev/attachments/20131207/3ed93183/signature.asc 

More information about the hotspot-runtime-dev mailing list