[10] RFR: 8171813: possible null pointer dereference defects

classic Classic list List threaded Threaded
7 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

[10] RFR: 8171813: possible null pointer dereference defects

Rahul Raghavan
Hi,

Please review following patch proposal to avoid
possible null pointer dereference warnings / errors for internal tests.

<webrev.00> - http://cr.openjdk.java.net/~rraghavan/8171813/webrev.00/


<jbs> -  https://bugs.openjdk.java.net/browse/JDK-8171813

-- Reported issue - possible null pointer dereference warnings / errors for internal tests,
due to the case that 'function CompileBroker::compiler - hotspot/src/share/vm/compiler/compileBroker.hpp, may return NULL'
 
-- Above <webrev.00> fix proposal is to add explicit check in following reported locations
  - Compile::make_vm_intrinsic - hotspot/src/share/vm/opto/library_call.cpp
  - SimpleThresholdPolicy::is_trivial - hotspot/src/share/vm/runtime/simpleThresholdPolicy.inline.hpp
  - CompileBroker::compile_method - hotspot/src/share/vm/compiler/compileBroker.cpp

-- Confirmed no issues with testing -  jprt run (-testset hotspot).

Thanks,
Rahul
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: [10] RFR: 8171813: possible null pointer dereference defects

Tobias Hartmann-2
Hi Rahul,

On 31.03.2017 17:48, Rahul Raghavan wrote:
> Please review following patch proposal to avoid
> possible null pointer dereference warnings / errors for internal tests.
>
> <webrev.00> - http://cr.openjdk.java.net/~rraghavan/8171813/webrev.00/

Please compare against NULL instead of casting to bool, i.e. use "if (compiler != NULL)" instead of "if (compiler)".

In simpleThresholdPolicy.inline.hpp:80, please move the * to the type: use "AbstractCompiler* comp" instead of "AbstractCompiler *comp".

Thanks,
Tobias
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

RE: [10] RFR: 8171813: possible null pointer dereference defects

Rahul Raghavan
Hi,

Thank you Tobias for the review comments.
Sorry for my oversight and yes now included the required changes.

<webrev.01> - http://cr.openjdk.java.net/~rraghavan/8171813/webrev.01/
Believe the changes are now okay to be committed.

Thanks,
Rahul

> -----Original Message-----
> From: Tobias Hartmann
> Sent: Monday, April 03, 2017 11:53 AM
> To: Rahul Raghavan; [hidden email]; Vladimir Kozlov; Zoltan Majo
> Subject: Re: [10] RFR: 8171813: possible null pointer dereference defects
>
> Hi Rahul,
>
> On 31.03.2017 17:48, Rahul Raghavan wrote:
> > Please review following patch proposal to avoid
> > possible null pointer dereference warnings / errors for internal tests.
> >
> > <webrev.00> - http://cr.openjdk.java.net/~rraghavan/8171813/webrev.00/
>
> Please compare against NULL instead of casting to bool, i.e. use "if (compiler != NULL)" instead of "if (compiler)".
>
> In simpleThresholdPolicy.inline.hpp:80, please move the * to the type: use "AbstractCompiler* comp" instead of "AbstractCompiler
> *comp".
>
> Thanks,
> Tobias
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: [10] RFR: 8171813: possible null pointer dereference defects

Tobias Hartmann-2
Hi Rahul,

On 06.04.2017 08:27, Rahul Raghavan wrote:
> <webrev.01> - http://cr.openjdk.java.net/~rraghavan/8171813/webrev.01/

Looks good to me!

Thanks,
Tobias
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

RE: [10] RFR: 8171813: possible null pointer dereference defects

Rahul Raghavan
Thank you Tobias.

> -----Original Message-----
> From: Tobias Hartmann
> Sent: Thursday, April 06, 2017 12:02 PM
> To: Rahul Raghavan; [hidden email]
> Subject: Re: [10] RFR: 8171813: possible null pointer dereference defects
>
> Hi Rahul,
>
> On 06.04.2017 08:27, Rahul Raghavan wrote:
> > <webrev.01> - http://cr.openjdk.java.net/~rraghavan/8171813/webrev.01/
>
> Looks good to me!
>
> Thanks,
> Tobias
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: [10] RFR: 8171813: possible null pointer dereference defects

Zoltán Majó
In reply to this post by Rahul Raghavan
Hi Rahul,


On 04/06/2017 08:27 AM, Rahul Raghavan wrote:
> Hi,
>
> Thank you Tobias for the review comments.
> Sorry for my oversight and yes now included the required changes.
>
> <webrev.01> - http://cr.openjdk.java.net/~rraghavan/8171813/webrev.01/
> Believe the changes are now okay to be committed.

your change looks good to me. Thank you!

Best regards,


Zoltan

>
> Thanks,
> Rahul
>
>> -----Original Message-----
>> From: Tobias Hartmann
>> Sent: Monday, April 03, 2017 11:53 AM
>> To: Rahul Raghavan; [hidden email]; Vladimir Kozlov; Zoltan Majo
>> Subject: Re: [10] RFR: 8171813: possible null pointer dereference defects
>>
>> Hi Rahul,
>>
>> On 31.03.2017 17:48, Rahul Raghavan wrote:
>>> Please review following patch proposal to avoid
>>> possible null pointer dereference warnings / errors for internal tests.
>>>
>>> <webrev.00> - http://cr.openjdk.java.net/~rraghavan/8171813/webrev.00/
>> Please compare against NULL instead of casting to bool, i.e. use "if (compiler != NULL)" instead of "if (compiler)".
>>
>> In simpleThresholdPolicy.inline.hpp:80, please move the * to the type: use "AbstractCompiler* comp" instead of "AbstractCompiler
>> *comp".
>>
>> Thanks,
>> Tobias

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

RE: [10] RFR: 8171813: possible null pointer dereference defects

Rahul Raghavan
Thank you Zoltan.

> -----Original Message-----
> From: Zoltán Majó
> Sent: Friday, April 07, 2017 8:08 PM
> To: Rahul Raghavan; Tobias Hartmann; [hidden email]
> Subject: Re: [10] RFR: 8171813: possible null pointer dereference defects
>
> Hi Rahul,
>
>
> On 04/06/2017 08:27 AM, Rahul Raghavan wrote:
> > Hi,
> >
> > Thank you Tobias for the review comments.
> > Sorry for my oversight and yes now included the required changes.
> >
> > <webrev.01> - http://cr.openjdk.java.net/~rraghavan/8171813/webrev.01/
> > Believe the changes are now okay to be committed.
>
> your change looks good to me. Thank you!
>
> Best regards,
>
>
> Zoltan
>
> >
> > Thanks,
> > Rahul
> >
Loading...