RFR: JDK-8160361: SEGV occurred at JNIHandleBlock::oops_do(OopClosure*)

Kim Barrett kim.barrett at oracle.com
Mon Jun 27 21:49:53 UTC 2016


> On Jun 27, 2016, at 5:41 PM, Coleen Phillimore <coleen.phillimore at oracle.com> wrote:
> 350    void JNIHandleBlock::oops_do(OopClosure* f) {
> (gdb)
> 351      JNIHandleBlock* current_chain = this;
> (gdb)
> 354      while (current_chain != NULL) {
> (gdb)
> 375    }
> 
> 
> The change is still an improvement, but now the question is why does it crash with GCC 6.

“this” cannot be NULL, as to get there would require invoking undefined behavior.
So the test can be elided on the first iteration…

Thanks for tracking that down.

Another one that I think would have been suppressed by the missing gcc6 options.

So I think Yasumasa’s fix is good.

> 
> thanks,
> Coleen
> 
>> 
>>> Coleen
>>> 
>>>>> Thanks,
>>>>>  Thomas




More information about the hotspot-dev mailing list