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

Getter/setter optimizer doesn't check method arity #29

Open
I-asked opened this issue Jan 19, 2024 · 1 comment
Open

Getter/setter optimizer doesn't check method arity #29

I-asked opened this issue Jan 19, 2024 · 1 comment
Labels

Comments

@I-asked
Copy link

I-asked commented Jan 19, 2024

Hi everyone and Hi Gust, first of all, I wanted to thank you and everyone involved a lot for this awesome project!

To the point:

Say you have a method like this:

int discardAndGetX(int x) {
    return this.x;
}

The getter optimization doesn't check the arity of the method and pops the integer instead of this from the stack, resulting in say an NPE.

I am not sure how to fix this without compromising the performance, but it's a real problem with legacy libraries that expose such API's for compatibility…

@I-asked I-asked changed the title Getter/setter doesn't check method arity Getter/setter optimizer cdoesn't check method arity Jan 19, 2024
@I-asked I-asked changed the title Getter/setter optimizer cdoesn't check method arity Getter/setter optimizer doesn't check method arity Jan 19, 2024
digitalgust added a commit that referenced this issue Jan 20, 2024
@digitalgust
Copy link
Owner

Yes ,thank you , this issue fixed. the issue that missed the parameter of getter method. setter has the same issue.

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

2 participants