[Soot-list] Inconsistent Line Number

Nishant Budhdev nishant.budhdev at gmail.com
Fri Apr 10 04:43:43 EDT 2015


Hi all,

I have previously tried examples where one Java line is split into multiple
Jimple lines. However, this is the first time I have seen this error.

I have sent Steven a working example to replicate the error.

Thank you all for your help.
Nishant

On Fri, Apr 10, 2015 at 3:55 PM, Bodden, Eric <eric.bodden at sit.fraunhofer.de
> wrote:

> Hi all.
>
> > These lines are occasions on which a single Java line was split into
> multiple Jimple lines. If condition in your Java code accesses a field
> which is not directly possible in Jimple. Therefore, Soot creates two lines
> from it: We first read the field value and then compare it. Apparently,
> only the first line gets the corresponding line number tag, whereas the
> second one does not. This in turn is quite strange as we have code that
> propagates on line numbers (see lines 425ff in class soot.dexpler.DexBody.
> My guess therefore is that some transformer kills the line number tag for
> some reason.
>
> This is generally a known problem in Soot. There are many transformers
> that might optimize and clean up the Jimple before it gets exposed to the
> client. Not all of them preserve line numbers faithfully. Usually, the best
> thing to do is to traverse Stmts backwards, searching for appropriate line
> numbers there. We could update getJavaSourceStartLineNumber() to do that
> automatically but that would cause it to have unpredictable runtimes, which
> I kind of dislike.
>
> The best way to deal with this, of course, would be to fix the built-in
> transformers. If you can help us in figuring out which ones are the
> culprits then we can probably look into this. The -dump-body option should
> help with this if -print-tags is enabled as well.
>
> Cheers,
> Eric
>



-- 
Nishant Shyamal Budhdev

Research Assistant
Embedded Systems and Networking Lab
School Of Computing
National University of Singapore

Contact : +65 9050 6084
-------------- next part --------------
An HTML attachment was scrubbed...
URL: https://mailman.CS.McGill.CA/pipermail/soot-list/attachments/20150410/4c818bc2/attachment-0001.html 


More information about the Soot-list mailing list