[Soot-list] jdk 1.5 partial support.

Joe Pellegrino joe.pellegrino at lakota-tsi.com
Wed Jul 18 10:33:30 EDT 2007



Java version:

[jpellegr at fatboy gui]$ javac -version
javac 1.5.0_07

[jpellegr at fatboy gui]$ java -version
java version "1.5.0_07"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_07-b03)
Java HotSpot(TM) Client VM (build 1.5.0_07-b03, mixed mode, sharing)

Attached is the java source I am using to test with a jar file I created
from the compiled source and the o file is the output from the run that has
the crash below. The crash is about halfway down.

-----Original Message-----
From: Chris Pickett [mailto:chris.pickett at mail.mcgill.ca] 
Sent: Wednesday, July 18, 2007 10:25 AM
To: Joe Pellegrino
Cc: soot-list at sable.mcgill.ca
Subject: Re: [Soot-list] jdk 1.5 partial support.

Hi Joe,

Joe Pellegrino wrote:
> I noticed on the installation instructions it mentions 'partial' support
for
> jdk 1.5. What does that mean? Could that be the cause of the crash that
> produced:
> 
> 169 load.r r0     [***missing***]
> 170 jsr pop  10   [***missing***]
> java.lang.RuntimeException: Problem with stack height at: goto
specialinvoke
> <java.lang.Object: void <init>()>
> 
> Has Stack [] but is expecting []
> 
> I ask because I did get this to work on a laptop using jdk1.4 I believe;
> whereas on the machine that produced the above output was using java 
> 1.5.0_09. Anyone have some advice?

Attach a test case so that people here can reproduce your problem.

Cheers,
Chris
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Test.jar
Type: application/octet-stream
Size: 1616 bytes
Desc: not available
Url : http://mailman.CS.McGill.CA/pipermail/soot-list/attachments/20070718/75e1062c/Test.obj
-------------- next part --------------
A non-text attachment was scrubbed...
Name: o
Type: application/octet-stream
Size: 13197 bytes
Desc: not available
Url : http://mailman.CS.McGill.CA/pipermail/soot-list/attachments/20070718/75e1062c/o.obj
-------------- next part --------------
/* TestObf.java
*
* Purpose:  Test obfuscation's behavior
*
*/
public class TestObf{
        public Hello hello=new Hello();
        protected String good="";
        private int[] number=new int[10];

        public static void main(String args[]) {

                new TestObf();
        }
        public TestObf() {

                System.out.println(hello.getHello("HELLO"));
                String encrypted = "Will this string be encrypted?";
                System.out.println(encrypted);
                System.out.println(getGood());
                System.out.println("number="+getArray());
                for (int aCounter = 0;aCounter < 10;aCounter++)
                {
                        if ((aCounter % 2) != 0)
                        {
                                System.out.println("I is Odd: " + aCounter);
                        }
                        else
                        {
                                System.out.println("I is Even: " + aCounter);
                        }
                        if (aCounter >= 0)
                                System.out.println("Always Print");
                        else if (aCounter < 0)
                                System.out.println("Else IF Never Print");
                        else
                                System.out.println("Else Never Print");
                }
        }
        protected String getGood() {
                good="GOOD";
                return good;
        }
        private int getArray() {
                number[0]=1;
                return number[0];
        }
}
class Hello {
        public Hello() {
                int number=1;
        }
        public String getHello(String helloname) {
                return helloname;
        }
}


More information about the Soot-list mailing list