Skip to content

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

@I-asked

Description

@I-asked

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…

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions