adapter pushes too many parameters

John Rose John.Rose at Sun.COM
Wed Sep 16 03:25:05 PDT 2009


On Sep 16, 2009, at 3:13 AM, Christian Thalinger wrote:

> I just wanted to write a testcase with an invokedynamic that takes 6
> arguments, like:
>
>  sum += InvokeDynamic.<int>unknown(i, i, i, i, i, i);
>
> and I get:
>
>  java.lang.IllegalArgumentException: bad adapter
> (conversion=0xfffab300): adapter pushes too many parameters

I don't see why that expression must create an adapter that pushes  
lots of parameters.  It must be created by your bootstrap method?

> Increasing the MethodHandlePushLimit results in:
>
>  java.lang.InternalError: too many bound parameters

There's a limit on interpreter stack expansion in the current  
implementation, MHPL.  The rationale is that we don't want to push too  
many extra arguments without running through a method entry, with its  
associated stack overflow check.

However, this might be overcautious.  Even if you were to insert the  
maximum number (255 arguments) that probably would not render the next  
overflow check invalid.  You might try commenting out the check, if  
it's keeping you from other work.

But, I think increasing the MHPL should allow the additional number of  
bound params to be pushed.  So that final error looks like a plain bug.

-- John


More information about the mlvm-dev mailing list