[Soot-list] Possible bug in Typing.java

Devin Mahoney devin.mahoney at kyrus-tech.com
Wed Sep 3 08:53:05 EDT 2014


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