[9] RFR(XS): 8180565: Null pointer dereferences of ConstMethod::method()

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

[9] RFR(XS): 8180565: Null pointer dereferences of ConstMethod::method()

Tobias Hartmann-2
Hi,

please review the following patch:
https://bugs.openjdk.java.net/browse/JDK-8180565
http://cr.openjdk.java.net/~thartmann/8180565/webrev.00/

ConstMethod::method() returns _constants->pool_holder()->method_with_idnum(_method_idnum) which may be NULL. We need to check for NULL before dereferencing.

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

Re: [9] RFR(XS): 8180565: Null pointer dereferences of ConstMethod::method()

Vladimir Kozlov
Good.

Vladimir


On 5/18/17 7:08 AM, Tobias Hartmann wrote:

> Hi,
>
> please review the following patch:
> https://bugs.openjdk.java.net/browse/JDK-8180565
> http://cr.openjdk.java.net/~thartmann/8180565/webrev.00/
>
> ConstMethod::method() returns _constants->pool_holder()->method_with_idnum(_method_idnum) which may be NULL. We need to check for NULL before dereferencing.
>
> Thanks,
> Tobias
>
Reply | Threaded
Open this post in threaded view
|

Re: [9] RFR(XS): 8180565: Null pointer dereferences of ConstMethod::method()

Tobias Hartmann-2
Hi Vladimir,

thanks for the review!

Best regards,
Tobias

On 18.05.2017 19:10, Vladimir Kozlov wrote:

> Good.
>
> Vladimir
>
>
> On 5/18/17 7:08 AM, Tobias Hartmann wrote:
>> Hi,
>>
>> please review the following patch:
>> https://bugs.openjdk.java.net/browse/JDK-8180565
>> http://cr.openjdk.java.net/~thartmann/8180565/webrev.00/
>>
>> ConstMethod::method() returns _constants->pool_holder()->method_with_idnum(_method_idnum) which may be NULL. We need to check for NULL before dereferencing.
>>
>> Thanks,
>> Tobias
>>
Reply | Threaded
Open this post in threaded view
|

Re: [9] RFR(XS): 8180565: Null pointer dereferences of ConstMethod::method()

Igor Ignatyev
Hi Tobias,

in ConstMethod::print_on, don't we need st->cr() when 'm' is null?

Thanks,
-- Igor

> On May 18, 2017, at 11:16 PM, Tobias Hartmann <[hidden email]> wrote:
>
> Hi Vladimir,
>
> thanks for the review!
>
> Best regards,
> Tobias
>
> On 18.05.2017 19:10, Vladimir Kozlov wrote:
>> Good.
>>
>> Vladimir
>>
>>
>> On 5/18/17 7:08 AM, Tobias Hartmann wrote:
>>> Hi,
>>>
>>> please review the following patch:
>>> https://bugs.openjdk.java.net/browse/JDK-8180565
>>> http://cr.openjdk.java.net/~thartmann/8180565/webrev.00/
>>>
>>> ConstMethod::method() returns _constants->pool_holder()->method_with_idnum(_method_idnum) which may be NULL. We need to check for NULL before dereferencing.
>>>
>>> Thanks,
>>> Tobias
>>>

Reply | Threaded
Open this post in threaded view
|

Re: [9] RFR(XS): 8180565: Null pointer dereferences of ConstMethod::method()

Tobias Hartmann-2
Hi Igor,

On 19.05.2017 23:10, Igor Ignatyev wrote:
> in ConstMethod::print_on, don't we need st->cr() when 'm' is null?

Right, thanks for catching this! I'll fix it before pushing.

Best regards,
Tobias

>> On May 18, 2017, at 11:16 PM, Tobias Hartmann <[hidden email]> wrote:
>>
>> Hi Vladimir,
>>
>> thanks for the review!
>>
>> Best regards,
>> Tobias
>>
>> On 18.05.2017 19:10, Vladimir Kozlov wrote:
>>> Good.
>>>
>>> Vladimir
>>>
>>>
>>> On 5/18/17 7:08 AM, Tobias Hartmann wrote:
>>>> Hi,
>>>>
>>>> please review the following patch:
>>>> https://bugs.openjdk.java.net/browse/JDK-8180565
>>>> http://cr.openjdk.java.net/~thartmann/8180565/webrev.00/
>>>>
>>>> ConstMethod::method() returns _constants->pool_holder()->method_with_idnum(_method_idnum) which may be NULL. We need to check for NULL before dereferencing.
>>>>
>>>> Thanks,
>>>> Tobias
>>>>
>