Request for review (S): 7141637: JSR 292: MH spread invoker crashes with NULL argument on x86_32
Volker Simonis
volker.simonis at gmail.com
Wed Feb 1 02:36:15 PST 2012
Looks good:)
Thank you,
Volker
On Wed, Feb 1, 2012 at 11:26 AM, Christian Thalinger
<christian.thalinger at oracle.com> wrote:
>
> On Jan 31, 2012, at 8:07 PM, Volker Simonis wrote:
>
>> Hi,
>>
>> as the test in the webrev demonstrates, the MH spread invoker
>> will crashes the VM if invoked with a NULL argument on x86_32
>> platforms.
>>
>> This is because nn 32-bit Intel platforms, the spread invoker
>> uses the 'rsi' register as temporary. But because 'rsi' also
>> contains the 'saved_last_sp' on x86_32 platforms, 'rsi' has to be
>> temporary saved on the stack. If this saving is done before a
>> failing 'NULL' check in the spread adapter, the following
>> excpetion handling routine will be confused by the extra value on
>> the stack, because it expects to find the return address here.
>>
>> To fix this problem, I've exchanged the usage of the temporary
>> registers 'rsi' and 'rdi' in the spread adapter such that we only
>> have to save the value of 'rsi' to the stack after the NULL check
>> was done:
>>
>> http://cr.openjdk.java.net/~simonis/SpreadNullArg/
>
> Thanks for the detailed bug report and the fix. I filed:
>
> 7141637: JSR 292: MH spread invoker crashes with NULL argument on x86_32
>
> and created and webrev just for the record:
>
> http://cr.openjdk.java.net/~twisti/7141637/
>
> The changes look good, I fixed a typo and moved the test into the right directory.
>
> -- Chris
>
>>
>> Regards,
>> Volker
>>
>> PS: please don't forget to update the test directory name after a
>> bug id was assigned to this issue.
>
More information about the hotspot-dev
mailing list