Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Method parameter indexing has problems with double parameters #18

Closed
Dagefoerde opened this issue Sep 7, 2015 · 1 comment
Closed
Labels

Comments

@Dagefoerde
Copy link
Member

Muggl's method parameter indexing differs from that of the JVM.

In the JVM, parameters are indexed by the position of their first byte.
For example, the method test.preconditions.Average#division(double a, int b) stores three parameters (index - name - type):
0 - this - Ltest/preconditions/Average
1 - a - double
3 - b - int,
where b has the index 3 because a (double) occupies 2 bytes of space.

Muggl internally manages parameters in an array, that is indexed only by the parameters. That is, b has the index 2.

Consequently, trying to get the parameter b during symbolic execution using 3 as an identifier results in a java.lang.ArrayIndexOutOfBoundsException exception.

@Dagefoerde
Copy link
Member Author

@anfuchs's description is more detailed, so #36 supersedes this one.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant