review for 7088020: SEGV in JNIHandleBlock::release_block
Vladimir Kozlov
vladimir.kozlov at oracle.com
Fri Sep 9 11:28:41 PDT 2011
In stubGenerator_sparc.cpp last ,false parameter is not removed.
Vladimir
Tom Rodriguez wrote:
> So I've backed off from changing generate_exception_throw to perform the alignment. Given that we've seen no problems with alignment in the existing callees I have to assume they are already being called properly aligned. So instead I've added alignment code in code that throws it. I'll file a separate bug for the general issue that we should have more explicitly code for checking the alignment of calls into the runtime on x64. I've updated the webrev. I kept the stubgenerator deletions since they seemed like a good thing.
>
> tom
>
> On Sep 8, 2011, at 9:29 AM, Tom Rodriguez wrote:
>
>> On Sep 8, 2011, at 3:09 AM, Christian Thalinger wrote:
>>
>>> I don't understand that comment:
>>>
>>> + // FIXME: this probably needs to alignment logic
>> It's a typo in a comment John asked me to add. The unsafe handler also needs alignment but I wasn't sure how to reproduce a failure so I didn't want to touch it.
>>
>> To be honest my whole change make me a little nervous. The current stubs all apparently work ok which suggests they are always called from contexts that are properly aligned. The only way to do alignment is to extend the caller frame, which is really only safe in some contexts. It should always be safe to adjust SP in the method handle code calls so I think I should just do some stack alignment just before jumping to the throw_WMTE_entry. Part of the problem is that we don't have any strict alignment checks when calling into the runtime. We just happen to die because the part of the JNI code was using movdqa against rbp. Anyway, I'm going to play with this a bit more.
>>
>> tom
>>
>>> -- Christian
>>>
>>> On Sep 8, 2011, at 5:40 AM, Tom Rodriguez wrote:
>>>
>>>> Strangely the WMT cases all seemed to work fine but another test was failing. Running with +WalkStackALot showed that I wasn't moving the return address so I propagated the frame adjustment outside the enter/leave.
>>>>
>>>> tom
>>>>
>>>> On Sep 7, 2011, at 2:24 PM, Vladimir Kozlov wrote:
>>>>
>>>>> Where r12 is restored? It contains coop base.
>>>>>
>>>>> Vladimir
>>>>>
>>>>> Tom Rodriguez wrote:
>>>>>> http://cr.openjdk.java.net/~never/7088020
>>>>>> 150 lines changed: 88 ins; 50 del; 12 mod; 10143 unchg
>>>>>> 7088020: SEGV in JNIHandleBlock::release_block
>>>>>> Reviewed-by:
>>>>>> The throw_WrongMethodTypeException stub on x64 needs to align the
>>>>>> stack before calling into the runtime or it might crash. I also
>>>>>> noticed that two stubs were dead which made an extra argument dead so
>>>>>> I cleaned that up at the same time. Tested on linux-amd64 with new
>>>>>> regression test and failing tests from report.
>
More information about the hotspot-compiler-dev
mailing list