80 likes | 210 Views
Team meeting Sept 8, 2011. Christophe Foket. Context. Developer. Attacker. Class hierarchy flattening. Developer. Attacker. Class hierarchy flattening.
E N D
Team meetingSept 8, 2011 ChristopheFoket
Context Developer Attacker
Classhierarchyflattening Developer Attacker
Classhierarchyflattening AbstractWindow window = new ShapeWindow(...);Circle circle1 = new Circle(...);Rectangle rectangle1 = new Rectangle(...);...Circle circle2 = new Circle(...);Rectangle rectangle2 = new Rectangle(...); … window. add(circle1); window. add(rectangle1); window. add(circle2); window. add(rectangle2); Less type information? Obfuscatable window = new ShapeWindow(...);Obfuscatable circle1 = new Circle(...);Obfuscatable rectangle1 = new Rectangle(...);...Obfuscatable circle2 = new Circle(...);Obfuscatable rectangle2 = new Rectangle(...); … window. add(circle1); window. add(rectangle1); window. add(circle2); window. add(rectangle2);
Classhierarchyflattening Usepoints-toanalysis: average points-to set per localvariable, calculatedwith SPARK (soot)no extra casts wereinsertedthatwouldgiveaway type information
SPARK is bad? public <Drawable: void draw()> Drawable r0 r0 := @this: Drawable return this -> Circle+ any subtype of Object, Thread orClassLoader ? public <Circle: void draw()> Circle r0 r0 := @this: Circle specialinvoke r0.<Drawable: void draw()>() return this -> Circle+any subtype of Object, Thread orClassLoader ? public <Drawable: void draw()> Drawable r0 r0 := @this: Drawable return public <Circle: void draw()> Circle r0 r0 := @this: Circle specialinvoke r0.<Drawable: void draw()>() return public abstract classDrawable { public void draw(){} } this -> Circle public classCircle { public void draw(){ super.draw(); } } this -> Circle
SPARK is bad? public <Drawable: void draw()> Drawable r0 r0 := @this: Drawable return public <Circle: void draw()> Circle r0 r0 := @this: Circle specialinvoke r0.<Drawable: void draw()>() return public abstract classDrawable { public void draw(){} } this -> Circle public classCircle { public void draw(){ super.draw(); } } this -> Circle Observation: In some cases the points-to sets of locals in leaf-classmethods is veryprecise, whereasthoseof locals in other classes are not. Mightexplainlowersizesaftertransformation.
Schedule • Done:graded 2 lab sessionsfor compilers • Scheduled: • Contact developerson SPARK issue • Continue evaluation • Continue writing paper