[Soot-list] Possible bug in Typing.java

Steven Arzt Steven.Arzt at cased.de
Wed Sep 3 08:56:18 EDT 2014


Hi Devin,

Thanks for the pointer to that issue. I have just pushed an update to the GIT repository that should fix it.

Best regards,
  Steven

-----Ursprüngliche Nachricht-----
Von: Devin Mahoney [mailto:devin.mahoney at kyrus-tech.com] 
Gesendet: Mittwoch, 3. September 2014 14:53
An: Soot-list at sable.mcgill.ca
Cc: Steven Arzt
Betreff: Possible bug in Typing.java

Hello, I really appreciate the recent fixes to the type assigner. I believe they will fix a strange edge-case I was seeing.

I wanted to draw your attention to a possible bug in the Typing compare method. I believe that the if statement requires an "else if"
instead in this line:

https://github.com/Sable/soot/blob/develop/src/soot/jimple/toolkits/typing/fast/Typing.java#L94

If type 'ta' and type 'tb' are equal, then this function sets 'cmp' to 0. However, the function call 'h.ancestor(ta, tb)' always returns 'true' in this case, so the function then incorrectly sets 'cmp' to 1.
I think this means that the compare() function can never return 0.

Regards,
Devin



More information about the Soot-list mailing list