RFR(S) 8194271: jaotc crashes with --debug flag

classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|

RFR(S) 8194271: jaotc crashes with --debug flag

Igor Veresov
The change fixes the crash that occurs when jaotc tries to print method disassembly. The problem is that HotSpotCompiledCodeBuilder.createCompiledCode() assumes that if its method argument is null it’s a stub. And stub always has a name. The absence of a name caused the crash later on in the C++ code in CodeInstaller::install().

The solution is to pass method name to HotSpotCompiledCodeBuilder.createCompiledCode(). I also strengthened the C++ to throw an exception instead of crashing if a stub doesn’t have a name.

Webrev: http://cr.openjdk.java.net/~iveresov/8194271/webrev.00/
JBS: https://bugs.openjdk.java.net/browse/JDK-8194271


Thanks,
igor
Reply | Threaded
Open this post in threaded view
|

Re: RFR(S) 8194271: jaotc crashes with --debug flag

Tobias Hartmann-2
Hi Igor,

the fix looks good to me. Should we add --debug to our testing?

Best regards,
Tobias

On 03.01.2018 07:02, Igor Veresov wrote:

> The change fixes the crash that occurs when jaotc tries to print method disassembly. The problem is that HotSpotCompiledCodeBuilder.createCompiledCode() assumes that if its method argument is null it’s a stub. And stub always has a name. The absence of a name caused the crash later on in the C++ code in CodeInstaller::install().
>
> The solution is to pass method name to HotSpotCompiledCodeBuilder.createCompiledCode(). I also strengthened the C++ to throw an exception instead of crashing if a stub doesn’t have a name.
>
> Webrev: http://cr.openjdk.java.net/~iveresov/8194271/webrev.00/
> JBS: https://bugs.openjdk.java.net/browse/JDK-8194271
>
>
> Thanks,
> igor
>
Reply | Threaded
Open this post in threaded view
|

Re: RFR(S) 8194271: jaotc crashes with --debug flag

Vladimir Kozlov
In reply to this post by Igor Veresov
Good.

Thanks,
Vladimir

On 1/2/18 10:02 PM, Igor Veresov wrote:

> The change fixes the crash that occurs when jaotc tries to print method disassembly. The problem is that HotSpotCompiledCodeBuilder.createCompiledCode() assumes that if its method argument is null it’s a stub. And stub always has a name. The absence of a name caused the crash later on in the C++ code in CodeInstaller::install().
>
> The solution is to pass method name to HotSpotCompiledCodeBuilder.createCompiledCode(). I also strengthened the C++ to throw an exception instead of crashing if a stub doesn’t have a name.
>
> Webrev: http://cr.openjdk.java.net/~iveresov/8194271/webrev.00/
> JBS: https://bugs.openjdk.java.net/browse/JDK-8194271
>
>
> Thanks,
> igor
>
Reply | Threaded
Open this post in threaded view
|

Re: RFR(S) 8194271: jaotc crashes with --debug flag

Igor Veresov
In reply to this post by Tobias Hartmann-2
That’s a good point. We should. I added a simple test:

igor


On Jan 3, 2018, at 1:13 AM, Tobias Hartmann <[hidden email]> wrote:

Hi Igor,

the fix looks good to me. Should we add --debug to our testing?

Best regards,
Tobias

On 03.01.2018 07:02, Igor Veresov wrote:
The change fixes the crash that occurs when jaotc tries to print method disassembly. The problem is that HotSpotCompiledCodeBuilder.createCompiledCode() assumes that if its method argument is null it’s a stub. And stub always has a name. The absence of a name caused the crash later on in the C++ code in CodeInstaller::install().

The solution is to pass method name to HotSpotCompiledCodeBuilder.createCompiledCode(). I also strengthened the C++ to throw an exception instead of crashing if a stub doesn’t have a name.

Webrev: http://cr.openjdk.java.net/~iveresov/8194271/webrev.00/
JBS: https://bugs.openjdk.java.net/browse/JDK-8194271


Thanks,
igor


Reply | Threaded
Open this post in threaded view
|

Re: RFR(S) 8194271: jaotc crashes with --debug flag

Tobias Hartmann-2
Hi Igor,

On 03.01.2018 20:50, Igor Veresov wrote:
> That’s a good point. We should. I added a simple test:
> http://cr.openjdk.java.net/~iveresov/8194271/webrev.01/

Looks good to me!

Thanks,
Tobias


>> On Jan 3, 2018, at 1:13 AM, Tobias Hartmann <[hidden email] <mailto:[hidden email]>> wrote:
>>
>> Hi Igor,
>>
>> the fix looks good to me. Should we add --debug to our testing?
>>
>> Best regards,
>> Tobias
>>
>> On 03.01.2018 07:02, Igor Veresov wrote:
>>> The change fixes the crash that occurs when jaotc tries to print method disassembly. The problem is that
>>> HotSpotCompiledCodeBuilder.createCompiledCode() assumes that if its method argument is null it’s a stub. And stub
>>> always has a name. The absence of a name caused the crash later on in the C++ code in CodeInstaller::install().
>>>
>>> The solution is to pass method name to HotSpotCompiledCodeBuilder.createCompiledCode(). I also strengthened the C++
>>> to throw an exception instead of crashing if a stub doesn’t have a name.
>>>
>>> Webrev: http://cr.openjdk.java.net/~iveresov/8194271/webrev.00/
>>> JBS: https://bugs.openjdk.java.net/browse/JDK-8194271
>>>
>>>
>>> Thanks,
>>> igor
>>>
>
Reply | Threaded
Open this post in threaded view
|

Re: RFR(S) 8194271: jaotc crashes with --debug flag

Igor Veresov
Thanks Tobias and Vladimir!

igor

> On Jan 3, 2018, at 11:44 PM, Tobias Hartmann <[hidden email]> wrote:
>
> Hi Igor,
>
> On 03.01.2018 20:50, Igor Veresov wrote:
>> That’s a good point. We should. I added a simple test:
>> http://cr.openjdk.java.net/~iveresov/8194271/webrev.01/
>
> Looks good to me!
>
> Thanks,
> Tobias
>
>
>>> On Jan 3, 2018, at 1:13 AM, Tobias Hartmann <[hidden email] <mailto:[hidden email]>> wrote:
>>>
>>> Hi Igor,
>>>
>>> the fix looks good to me. Should we add --debug to our testing?
>>>
>>> Best regards,
>>> Tobias
>>>
>>> On 03.01.2018 07:02, Igor Veresov wrote:
>>>> The change fixes the crash that occurs when jaotc tries to print method disassembly. The problem is that
>>>> HotSpotCompiledCodeBuilder.createCompiledCode() assumes that if its method argument is null it’s a stub. And stub
>>>> always has a name. The absence of a name caused the crash later on in the C++ code in CodeInstaller::install().
>>>>
>>>> The solution is to pass method name to HotSpotCompiledCodeBuilder.createCompiledCode(). I also strengthened the C++
>>>> to throw an exception instead of crashing if a stub doesn’t have a name.
>>>>
>>>> Webrev: http://cr.openjdk.java.net/~iveresov/8194271/webrev.00/
>>>> JBS: https://bugs.openjdk.java.net/browse/JDK-8194271
>>>>
>>>>
>>>> Thanks,
>>>> igor
>>>>
>>