Menu

#1388 DataflowAnalysisException: not enough values on stack

3.x
closed-rejected
None
5
2017-10-22
2015-06-05
Arsene Lee
No

1343

I'm trying to write a Findbugs plugin.

I hit the same issue as #1343.

Exception:

edu.umd.cs.findbugs.ba.DataflowAnalysisException: not enough values on stack: access=0, avail=0
    at edu.umd.cs.findbugs.ba.Frame.getStackValue(Frame.java:247)
    at edu.umd.cs.findbugs.ba.Hierarchy.resolveMethodCallTargets(Hierarchy.java:745)
    at

Below is the code:

for (Iterator<Location> i = cfg.locationIterator(); i.hasNext();) {
            Location location = i.next();
            Instruction ins = location.getHandle().getInstruction();

            if (ins instanceof InvokeInstruction) {

                Set<JavaClassAndMethod> tmpSet = Hierarchy.resolveMethodCallTargets((InvokeInstruction) ins,
                        classContext.getTypeDataflow(method).getFactAtLocation(location), classContext.getConstantPoolGen());

I want to get all the related Java classes and methodes of a method. Other than using resolveMethodCallTargets is there another way?

Discussion

  • Tagir Valeev

    Tagir Valeev - 2015-10-08

    Please provide more context. The best would be to have runnable simple plugin and test class which reveals the problem. Current description is too vague to investigate. The code you are writing should work in general.

     
  • Tagir Valeev

    Tagir Valeev - 2015-10-08
    • status: open --> pending
    • assigned_to: Tagir Valeev
     
  • Andrey Loskutov

    Andrey Loskutov - 2017-10-22
    • Status: pending --> closed-rejected
     

Log in to post a comment.