StackCounter adding extraneous slots for receiver invoke instructions

XMLWordPrintable

      StackCounter handling of invoke instructions should add slots for invoke instruction at once instead of in 2 batches: if in a method like
      int work() { return anotherInstanceMethod(); }
      The stack will be 2 currently due to this buggy logic first adding another stack, making max 2, then decrementing back to 1 and to 0.

      We need to ensure all calls to addStackInSlot should be atomic.

      Courtesy to [~winterhalter] for test cases discovering this issue.

            Assignee:
            Chen Liang
            Reporter:
            Chen Liang
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: