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

Cannot create CFA due to null pointer exception from ExecutingInvocationUnit.returnsOwnInstance #125

Open
gabrielisback opened this issue Feb 4, 2024 · 1 comment

Comments

@gabrielisback
Copy link

Problem description:

  1. With IDEA on windows, when I try to run "VisualizeCfa" from proguard.examples, I got this null pointer exception.
  2. Tried master and tag 9.0.9, same result.
  3. Tried to trace into the code execution, noticed:
    3.1 This null pointer is reported by ExecutingInvocationUnit.returnsOwnInstance, where the input "method" is a null pointer but referenced.
    3.2 The input "method" is a field of an AnyMethodrefConstant object -> AnyMethodrefConstant.referencedMethod.

Below I tied to debug the issue, just for your information:
4. Tried to check how the AnyMethodrefConstant is being constructed, noticed:
4.1 It seems to be created by ProgramClassReader.createConstant
4.2 ProgramClassReader.createConstant in turn called default constructor of MethodrefConstant, where "referencedMethod" never got the chance to be initialized.
With those findings, it seems to me the VisualizeCfa example is doomed to fail. Or where did I got it wrong?

@capoz
Copy link
Contributor

capoz commented Feb 5, 2024

Hi Gabriel.

Thanks for reporting this issue. I should have some time to look into it in the next days and will comment here once I know more.

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

No branches or pull requests

2 participants