[Soot-list] Hi all, does PAG in soot take "clone" as another source of AllocNode?

Eric Bodden bodden at st.informatik.tu-darmstadt.de
Thu Jun 16 12:14:44 EDT 2011


Hello.

I actually think the problem here may be that f2 will be null in this
code and therefore clone() will never be called. Usually, Spark does
model clone() through an alloc node.

Eric

On 16 June 2011 15:19, Xinwei Xie <xenway at gmail.com> wrote:
> Hi all,
> Thanks for your attention.
> Currently I am developing an algorithm that depends on the accuracy of
> cs-demand point-to analysis. However, I found out that the PAG the
> cs-demand pta uses doesn't take clone into account, which in fact is
> another source of allocation node in the program. I did some
> experiment:
> //**************************//
> class Element {
>        Element f2;
>        public Element get() throws CloneNotSupportedException {
>                //Element t1 = new Element();
>                Element t1 = (Element)f2.clone();
>                Element t2;
>                t1.f2 = this;
>                t2 = t1.f2;
>                if (t1 == t2)
>                        return t1;
>                else
>                        return t2;
>        }
> }
> //**************************//
> I got such points-to set result of t1:
>
> field: r1.<Element: Element f2> base: r1, points to []
>
> Is there any "simple" way to take this into account? Thanks for any
> further reply.
>
> --
> Xinwei XIE
> _______________________________________________
> Soot-list mailing list
> Soot-list at sable.mcgill.ca
> http://mailman.cs.mcgill.ca/mailman/listinfo/soot-list
>



-- 
Dr. Eric Bodden, http://bodden.de/
Principal Investigator in Secure Services at CASED
Coordinator of the CASED Advisory Board of Study Affairs
PostDoc at Software Technology Group, Technische Universität Darmstadt
Tel: +49 6151 16-5478    Fax: +49 6151 16-5410
Mailing Address: S2|02 A209, Hochschulstraße 10, 64289 Darmstadt


More information about the Soot-list mailing list