CompL-Research / stava

Stava is a static program analysis for identifying stack allocable objects of code written in Java 8
7 stars 6 forks source link

BCIs for `newarray/anewarray/*newmultiarray` etc are incorrect #8

Closed manasthakur closed 3 years ago

manasthakur commented 4 years ago

Looks like the BCIs for array allocations are being picked up from the next statement (found in moldyn/md.runiters).

Plan: Check this with a small program involving different kinds of array allocations.

Solution(s): Perhaps get the BCI of the predecessor from the control-flow graph? Else subtract correct offset based on the kind of array-alloc instruction.

dheeraj135 commented 3 years ago

Fixed by #9 .