[Soot-list] Wrong line number of returned expression

Eric Bodden bodden at st.informatik.tu-darmstadt.de
Mon Oct 18 06:46:10 EDT 2010


Hi Heejong.

This may be a bug in the Java-to-Jimple frontend. If this poses a
problem to you, can you please file a bug report in our bugzilla?

Cheers,
Eric

--
Dr. Eric Bodden
Software Technology Group, Technische Universität Darmstadt, Germany
Tel: +49 6151 16-5478    Fax: +49 6151 16-5410
Mailing Address: S2|02 A209, Hochschulstraße 10, 64289 Darmstadt



On 12 October 2010 04:10, Heejong Lee <heejong at gmail.com> wrote:
> Hi, I don't understand why this happens.
> When I transform return expression to corresponding jimple statement, the
> line directive it shows goes wrong. For instance,
> 35  int intra5(Object x) {
> 36    if (x == null) {
> 37      return x.hashCode();
> 38    }
> 39    return 0;
> 40  }
>>>> (with -f jimple -print-tags)
> 256 /*[x]*/
> 257     int intra5(java.lang.Object)
> 258     {
> 259         FindBugs this;
> 260         java.lang.Object x;
> 261         int temp$0, temp$1;
> 262
> 263         this := @this: FindBugs;
> 264 /*Source Line Pos Tag: sline: 35 eline: 40 spos: 5 epos: 5 file:
> FindBugs.java*/
> 265         x := @parameter0: java.lang.Object;
> 266 /*Source Line Pos Tag: sline: 35 eline: 35 spos: 16 epos: 23 file:
> FindBugs.java*/
> 267         if x == null goto label0;
> 268 /*Source Line Pos Tag: sline: 36 eline: 36 spos: 6 epos: 14 file:
> FindBugs.java*/
> 269
> 270         goto label1;
> 271 /*Source Line Pos Tag: sline: 36 eline: 36 spos: 6 epos: 14 file:
> FindBugs.java*/
> 272
> 273      label0:
> 274         nop;
> 275 /*Source Line Pos Tag: sline: 36 eline: 36 spos: 6 epos: 14 file:
> FindBugs.java*/
> 276         temp$0 = virtualinvoke x.<java.lang.Object: int hashCode()>();
> 277 /*Source Line Pos Tag: sline: 36 eline: 36 spos: 6 epos: 14 file:
> FindBugs.java*/
> 278         return temp$0;
> 279 /*Source Line Pos Tag: sline: 37 eline: 37 spos: 6 epos: 25 file:
> FindBugs.java*/
> 280
> 281      label1:
> 282         nop;
> 283 /*Source Line Pos Tag: sline: 37 eline: 37 spos: 6 epos: 25 file:
> FindBugs.java*/
> 284         temp$1 = 0;
> 285 /*Source Line Pos Tag: sline: 37 eline: 37 spos: 6 epos: 25 file:
> FindBugs.java*/
> 286         return temp$1;
> 287 /*Source Line Pos Tag: sline: 39 eline: 39 spos: 2 epos: 10 file:
> FindBugs.java*/
> 288     }
> Does anybody know why 276 line of this jimple statement shows line number 36
> of original source? IMO, 276 and 278 lines should indicate same 36 line
> since they're decomposed from same original return expression.
> Regards,
> --
> Heejong Lee
>
> Associate Research Engineer
> Program Analysis Division
> Fasoo.com, Inc. (www.spa-arrow.com)
>
> _______________________________________________
> Soot-list mailing list
> Soot-list at sable.mcgill.ca
> http://mailman.cs.mcgill.ca/mailman/listinfo/soot-list
>
>


More information about the Soot-list mailing list