<html dir="ltr">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=Windows-1252">
<style>
<!--
@font-face
        {font-family:Helvetica}
@font-face
        {font-family:Helvetica}
@font-face
        {font-family:Calibri}
@font-face
        {font-family:Tahoma}
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0cm;
        margin-bottom:.0001pt;
        font-size:12.0pt;
        font-family:"Times New Roman","serif"}
a:link, span.MsoHyperlink
        {color:blue;
        text-decoration:underline}
a:visited, span.MsoHyperlinkFollowed
        {color:purple;
        text-decoration:underline}
p.p2, li.p2, div.p2
        {margin-right:0cm;
        margin-left:0cm;
        font-size:12.0pt;
        font-family:"Times New Roman","serif"}
p.p1, li.p1, div.p1
        {margin-right:0cm;
        margin-left:0cm;
        font-size:12.0pt;
        font-family:"Times New Roman","serif"}
span.E-MailFormatvorlage21
        {font-family:"Calibri","sans-serif";
        color:#1F497D}
.MsoChpDefault
        {font-size:10.0pt}
@page WordSection1
        {margin:70.85pt 70.85pt 2.0cm 70.85pt}
-->
</style><style type="text/css" id="owaParaStyle"></style>
</head>
<body lang="DE" link="blue" vlink="purple" fpstyle="1" ocsi="0">
<div style="direction: ltr;font-family: Tahoma;color: #000000;font-size: 10pt;">Hi Steven,
<div><br>
</div>
<div>thanks for getting back to me. <span style="font-size: 10pt;">If I run the transformed executable (APK) I get a
<font face="Courier New">java.lang.VerifyError</font> exception and this is the root cause:</span></div>
<div><br>
</div>
<div>
<div><font face="Courier New">02-02 15:49:39.170: W/dalvikvm(19074): VFY: register1 v7 holds uninitialized ref</font></div>
<div><font face="Courier New">02-02 15:49:39.170: W/dalvikvm(19074): VFY: bad arg 1 (into Ljava/net/Proxy$Type;)</font></div>
<div><font face="Courier New">02-02 15:49:39.170: W/dalvikvm(19074): VFY: rejecting call to Ljava/net/Proxy;.<init> (Ljava/net/Proxy$Type;Ljava/net/SocketAddress;)V</font></div>
<div><font face="Courier New">02-02 15:49:39.170: W/dalvikvm(19074): VFY: rejecting opcode 0x70 at 0x0015</font></div>
<div><font face="Courier New">02-02 15:49:39.170: W/dalvikvm(19074): VFY: rejected </font></div>
<div><br>
</div>
<div>Please notice that I'm trying to init a Proxy instance:</div>
<div><font face="Courier New">specialinvoke $r5.<java.net.Proxy: void <init>(java.net.Proxy$Type,java.net.SocketAddress)>($r6, $r7);</font></div>
<div><br>
</div>
<div><br>
</div>
<div>If I run the driver class on this transformed APK (so I can print the body to check my transformation), I get this error:</div>
<div>
<p class="p1"><font face="Courier New" size="2">local type not allowed in final code: bottom_type local: $r6</font></p>
</div>
<div><br>
</div>
<div>In fact, if I check the body I see "<span style="font-size: 12pt;"><font face="Courier New">bottom_type $r6;</font></span><span style="font-size: 10pt;">" instead of "</span><font face="Courier New" style="font-size: 10pt;">java.net.Proxy$Type $r6;</font><span style="font-size: 10pt;">"
as expected.</span></div>
<div><br>
</div>
<div><br>
</div>
<div>Thanks again,</div>
<div>Daniele</div>
<div><br>
</div>
<div>
<div>
<div style="font-family:Tahoma; font-size:13px"></div>
</div>
<div style="font-family: Times New Roman; color: #000000; font-size: 16px">
<hr tabindex="-1">
<div id="divRpF872551" style="direction: ltr;"><font face="Tahoma" size="2" color="#000000"><b>From:</b> Steven Arzt [Steven.Arzt@cased.de]<br>
<b>Sent:</b> Monday, February 02, 2015 5:16 PM<br>
<b>To:</b> Daniele Altomare; soot-list@CS.McGill.CA<br>
<b>Subject:</b> AW: [Soot-list] Generating code for enumaration<br>
</font><br>
</div>
<div></div>
<div>
<div class="WordSection1">
<p class="MsoNormal"><span style="font-size:11.0pt; font-family:"Calibri","sans-serif"; color:#1F497D">Hi Daniele,</span></p>
<p class="MsoNormal"><span style="font-size:11.0pt; font-family:"Calibri","sans-serif"; color:#1F497D"> </span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt; font-family:"Calibri","sans-serif"; color:#1F497D">To answer this question, we would need more information. What do you mean by “does not work”? The code you wrote should give you a new local
of the correct type – but it’s hard to tell what else may be wrong if one does not know how you use this local and where the problem shows up.</span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt; font-family:"Calibri","sans-serif"; color:#1F497D"> </span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt; font-family:"Calibri","sans-serif"; color:#1F497D">Best regards,</span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt; font-family:"Calibri","sans-serif"; color:#1F497D"> Steven</span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt; font-family:"Calibri","sans-serif"; color:#1F497D"> </span></p>
<p class="MsoNormal"><span style="font-size:11.0pt; font-family:"Calibri","sans-serif"; color:#1F497D"> </span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:13.5pt; font-family:"Courier New"; color:black">M.Sc. M.Sc. Steven Arzt</span><span lang="EN-US" style="font-size:11.0pt; font-family:"Helvetica","sans-serif"; color:#1F497D"></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:10.0pt; font-family:"Courier New"; color:black">Secure Software Engineering Group (SSE)</span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:10.0pt; font-family:"Courier New"; color:black">European Center for Security and Privacy by Design (EC SPRIDE)
</span></p>
<p class="MsoNormal"><span style="font-size:10.0pt; font-family:"Courier New"; color:black">Rheinstraße 75</span></p>
<p class="MsoNormal"><span style="font-size:10.0pt; font-family:"Courier New"; color:black">D-64293 Darmstadt</span></p>
<p class="MsoNormal"><span style="font-size:10.0pt; font-family:"Courier New"; color:black">Phone: +49 61 51 869-336</span></p>
<p class="MsoNormal"><span style="font-size:10.0pt; font-family:"Courier New"; color:black">Fax: +49 61 51 16-72118</span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:10.0pt; font-family:"Courier New"; color:black">eMail:
</span><span style="font-size:10.0pt; font-family:"Courier New"; color:black"><a href="mailto:steven.arzt@ec-spride.de" target="_blank"><span lang="EN-US" style="color:blue">steven.arzt@ec-spride.de</span></a></span><span lang="EN-US" style="font-size:10.0pt; font-family:"Courier New"; color:black"></span></p>
<p class="MsoNormal"><span style="font-size:10.0pt; font-family:"Courier New"; color:black">Web:
<a href="http://sse.ec-spride.de/" target="_blank"><span style="color:blue">http://sse.ec-spride.de</span></a></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt; font-family:"Calibri","sans-serif"; color:#1F497D"> </span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt; font-family:"Calibri","sans-serif"; color:#1F497D"> </span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt; font-family:"Calibri","sans-serif"; color:#1F497D"> </span></p>
<div>
<div style="border:none; border-top:solid #B5C4DF 1.0pt; padding:3.0pt 0cm 0cm 0cm">
<p class="MsoNormal"><b><span style="font-size:10.0pt; font-family:"Tahoma","sans-serif"">Von:</span></b><span style="font-size:10.0pt; font-family:"Tahoma","sans-serif""> soot-list-bounces@CS.McGill.CA [mailto:soot-list-bounces@CS.McGill.CA]
<b>Im Auftrag von </b>Daniele Altomare<br>
<b>Gesendet:</b> Montag, 2. Februar 2015 17:14<br>
<b>An:</b> soot-list@CS.McGill.CA<br>
<b>Betreff:</b> [Soot-list] Generating code for enumaration</span></p>
</div>
</div>
<p class="MsoNormal"> </p>
<div>
<div>
<p class="MsoNormal"><span style="font-size:10.0pt; font-family:"Tahoma","sans-serif"; color:black">Hi all,
</span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:10.0pt; font-family:"Tahoma","sans-serif"; color:black"> </span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:10.0pt; font-family:"Tahoma","sans-serif"; color:black">I'm getting stuck at generating code for an enum in a BodyTransformer.</span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:10.0pt; font-family:"Tahoma","sans-serif"; color:black"> </span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:10.0pt; font-family:"Tahoma","sans-serif"; color:black">I have to pass the the proxy type to a method and that's defined by an enum.</span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:10.0pt; font-family:"Tahoma","sans-serif"; color:black">If I run the driver class for a java program where I define the proxy (so I can see the Jimple code) I get this for the method body:</span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:10.0pt; font-family:"Tahoma","sans-serif"; color:black"> </span></p>
</div>
<div>
<p class="p2"><span style="font-size:10.0pt; font-family:"Tahoma","sans-serif"; color:black">$r6 = <java.net.Proxy$Type: java.net.Proxy$Type HTTP>;</span></p>
<p class="p2"><span style="font-size:10.0pt; font-family:"Tahoma","sans-serif"; color:black"> </span></p>
<p class="p2"><span style="font-size:10.0pt; font-family:"Tahoma","sans-serif"; color:black"> </span></p>
<p class="p2"><span style="font-size:10.0pt; font-family:"Tahoma","sans-serif"; color:black">I've tried in this way but it doesn't work:</span></p>
<p class="p1"><span style="font-size:10.0pt; font-family:"Tahoma","sans-serif"; color:black">SootClass clsProxyType = Scene.v().getSootClass(<span class="s1">"java.net.Proxy$Type"</span>);</span></p>
<p class="p1"><span style="font-size:10.0pt; font-family:"Tahoma","sans-serif"; color:black">Local proxyType = Jimple.v().newLocal(<span class="s1">"proxyType"</span>, RefType.v(clsProxyType));</span></p>
<p class="p1"><span style="font-size:10.0pt; font-family:"Tahoma","sans-serif"; color:black">b.getLocals().add(proxyType);</span></p>
<p class="p1"><span style="font-size:10.0pt; font-family:"Tahoma","sans-serif"; color:black"> </span></p>
<p class="p1"><span style="font-size:10.0pt; font-family:"Tahoma","sans-serif"; color:black"> </span></p>
<p class="p1"><span style="font-size:10.0pt; font-family:"Tahoma","sans-serif"; color:black">Can someone help me with this?</span></p>
<p class="p1"><span style="font-size:10.0pt; font-family:"Tahoma","sans-serif"; color:black"> </span></p>
<p class="p1"><span style="font-size:10.0pt; font-family:"Tahoma","sans-serif"; color:black"> </span></p>
<p class="p1"><span style="font-size:10.0pt; font-family:"Tahoma","sans-serif"; color:black">Thanks!</span></p>
<p class="p1"><span style="font-size:10.0pt; font-family:"Tahoma","sans-serif"; color:black">Daniele</span></p>
<p class="p1"><span style="font-size:10.0pt; font-family:"Tahoma","sans-serif"; color:black"> </span></p>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</body>
</html>