[prev in list] [next in list] [prev in thread] [next in thread] 

List:       openjdk-serviceability-dev
Subject:    Re: RFR (XS) 8068162: jvmtiRedefineClasses.cpp: guarantee(false) failed: OLD and/or OBSOLETE method(
From:       "serguei.spitsyn () oracle ! com" <serguei ! spitsyn () oracle ! com>
Date:       2014-12-31 18:50:10
Message-ID: 54A44562.3090207 () oracle ! com
[Download RAW message or body]

Colleen,

Thank you for a quick review.
You are right, this is a good catch!
I need to rework my fix as it is incorrect in general.


On 12/31/14 10:40 AM, Coleen Phillimore wrote:
>
> The adjustment should be in klassItable::adjust_method_entries() not 
> the checking function.  I don't think check_no_old_or_obsolete_entries 
> is called in product mode.
>
> I still don't see how the first klassItable::adjust_method_entries() 
> missed this function.

The Unsafe::throw_illegal_access is added to other itables, not to the 
one that belongs to the class Unsafe.

Thanks,
Serguei


>
> Coleen
>
> On 12/31/14, 12:42 PM, serguei.spitsyn@oracle.com wrote:
>> Please, review the fix for:
>>   https://bugs.openjdk.java.net/browse/JDK-8068162
>>
>>
>> Open webrev:
>> http://cr.openjdk.java.net/~sspitsyn/webrevs/2014/hotspot/8068162-JVMTI-old.1/ 
>>
>>
>>
>> Summary:
>>
>>    The sun.misc.Unsafe:throwIllegalAccessError() method is used in 
>> place of a default
>>    interface method in the itable if a default method was not defined 
>> in the interface.
>>
>>    This approach creates a problem when the class sun.misc.Unsafe is 
>> retransformed.
>>    The Method* pointer to the old (redefined) method in the itable 
>> triggers an assert
>>    (see the hs_err log in the bug report).
>>
>>    The fix is to replace the old method in the itable with the latest 
>> method version.
>>
>>
>> Testing:
>>   In progress: nsk.jdi.testlist, JTREG java/lang/instrument tests
>>
>>
>> Thanks,
>> Serguei
>>
>


[Attachment #3 (text/html)]

<html>
  <head>
    <meta content="text/html; charset=utf-8" http-equiv="Content-Type">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    <div class="moz-cite-prefix">Colleen,<br>
      <br>
      Thank you for a quick review.<br>
      You are right, this is a good catch!<br>
      I need to rework my fix as it is incorrect in general.<br>
      <br>
      <br>
      On 12/31/14 10:40 AM, Coleen Phillimore wrote:<br>
    </div>
    <blockquote cite="mid:54A44300.4010801@oracle.com" type="cite">
      <br>
      The adjustment should be in klassItable::adjust_method_entries()
      not the checking function.   I don't think
      check_no_old_or_obsolete_entries is called in product mode.
      <br>
      <br>
      I still don't see how the first
      klassItable::adjust_method_entries() missed this function.
      <br>
    </blockquote>
    <br>
    <meta http-equiv="content-type" content="text/html; charset=utf-8">
    The Unsafe::throw_illegal_access is added to other itables, not to
    the one that belongs to the class Unsafe.<br>
    <br>
    Thanks,<br>
    Serguei<br>
    <br>
    <br>
    <blockquote cite="mid:54A44300.4010801@oracle.com" type="cite">
      <br>
      Coleen
      <br>
      <br>
      On 12/31/14, 12:42 PM, <a class="moz-txt-link-abbreviated" \
href="mailto:serguei.spitsyn@oracle.com">serguei.spitsyn@oracle.com</a> wrote:  <br>
      <blockquote type="cite">Please, review the fix for:
        <br>
           <a class="moz-txt-link-freetext" \
href="https://bugs.openjdk.java.net/browse/JDK-8068162">https://bugs.openjdk.java.net/browse/JDK-8068162</a>
  <br>
        <br>
        <br>
        Open webrev:
        <br>
        <a class="moz-txt-link-freetext" \
href="http://cr.openjdk.java.net/~sspitsyn/webrevs/2014/hotspot/8068162-JVMTI-old.1/"> \
http://cr.openjdk.java.net/~sspitsyn/webrevs/2014/hotspot/8068162-JVMTI-old.1/</a>  \
<br>  <br>
        <br>
        Summary:
        <br>
        <br>
             The sun.misc.Unsafe:throwIllegalAccessError() method is used
        in place of a default
        <br>
             interface method in the itable if a default method was not
        defined in the interface.
        <br>
        <br>
             This approach creates a problem when the class
        sun.misc.Unsafe is retransformed.
        <br>
             The Method* pointer to the old (redefined) method in the
        itable triggers an assert
        <br>
             (see the hs_err log in the bug report).
        <br>
        <br>
             The fix is to replace the old method in the itable with the
        latest method version.
        <br>
        <br>
        <br>
        Testing:
        <br>
           In progress: nsk.jdi.testlist, JTREG java/lang/instrument
        tests
        <br>
        <br>
        <br>
        Thanks,
        <br>
        Serguei
        <br>
        <br>
      </blockquote>
      <br>
    </blockquote>
    <br>
  </body>
</html>



[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic