[Soot-list] ThrowableSet comparison with "!="

Eric Bodden eric.bodden at ec-spride.de
Thu Sep 6 02:58:37 EDT 2012


Hi John.

> So if two ThrowableSets are "equals()" without also being "==",
> then something in the original design is broken. Substituting
> "! equals()" for "!=" may just be camouflaging the underlying flaw,
> rather than fixing it.

That's what I was fearing, actually, but I could not quite see this
"caching" structure in the code before. I guess I will take another
look.

> The intriguing question is how you managed to get an empty
> ThrowableSet that wasn't a reference to EMPTY, since that might
> reveal what's wrong with ThrowableSet.
>
> Have you called the private constructor, or maybe implemented an
> operation to remove exceptions from an existing ThrowableSet? (I
> was never able to come up with a workable, general implementation
> of remove().)
>
> Unfortunately, my knowledge of soot is very rusty, and I'm
> unlikely to have a chance to look at your test case until
> October, but if you will put up with tardiness,  I'd be curious
> to know how you provoke the failure.
>
> It occurs to me that back when I contributed to soot, soot was
> entirely single-threaded. Maybe it is multi-threaded now,
> exposing flaws in ThrowableSet's memoization.

I talked to Thomas yesterday, and apparently all he does is invoke
Soot twice in a row, while calling G.reset() in between. I understand
that this may cause two assignments to the non-static final variable
"EMPTY" happening (one before the reset, one after) but I do not see
why ExceptionalUnitGraph would be comparing the old to the new one.

Eric


More information about the Soot-list mailing list