Skip to content

How to handle signature polymorphism with VarHandle and ClassHierarchy resolveMethod? #1508

@kevzhumba

Description

@kevzhumba

I'm using resolveMethod, as implemented in com.ibm.wala.ipa.cha.ClassHierarchy, to find the corresponding method at an invokevirtual instruction. When trying to resolve an invoke to a method in java.lang.invoke.VarHandle, resolveMethod returns null. To my understanding, this is because of the "signature polymorphism" of the methods in java.lang.invoke.VarHandle. The selector provided for the method reference at the invoke uses the types of the arguments at the invoke, whereas the selector at the method definition uses the Object array argument. I was wondering if WALA includes a way to handle this case other than to hardcode a selector each time I analyze an invoke to a VarHandle method. Thank you!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions