[Soot-list] bug with makeAllocNode?

Eric Bodden bodden at st.informatik.tu-darmstadt.de
Tue Dec 8 03:26:34 EST 2009


Hi Peng.

Patrick is right. The hashCode cannot be the problem. Two identical
hash codes on different objects are totally fine. All this will cause
is having both objects end up in the same bucket.

>     But based on this trace, JNewExpr "new java.io.DataInputStream
> hashcode:145892892" and "new java.lang.StringBuilder145892892 " have the
> same hashCode(), I can not understand this point, because I think their
> hashCode() is assigned based on the memory address. But this really happens,
> two objects are having the same hashCode, so "e.hash==hash" returns true.
> What is more, "e.key==key" returns true too, which is reflected from the
> execution trace.

That is absolutely impossible. Two different objects can never "==" each other.

Best wishes,
Eric


More information about the Soot-list mailing list