[Soot-list] Fwd: Hi, Richard

smhuang at cse.ust.hk smhuang at cse.ust.hk
Tue Jul 7 21:45:29 EDT 2009


Thanks for your reply, Eric. I have figured out that problem.
But I am facing another problem when running the soot generated bytecode:

java.lang.VerifyError: (class: test/benchmarks/Shared, method: replaceNum
signature: (Ljava/lang/String;I)V) Expecting to find object/array on stack


Following is the part of the generated bytecode of the method replaceNum:

  // Method descriptor #29 (Ljava/lang/String;I)V
  // Stack: 6, Locals: 6
  public void replaceNum(java.lang.String arg0, int arg1);
      0  iconst_3
      1  anewarray java.lang.Object [22]
      4  astore 4
      6  iconst_3
      7  anewarray java.lang.String [78]
     10  astore_3
     11  iconst_3
     12  newarray boolean [4]


Any hints?

Jeff


> Jeff, apparently you generate invalid bytecode. You can try the
> -validate command line switch to have Jimple bodies checked with
> certain rules.
>
> Eric
>
> 2009/6/29 Richard L. Halpert <richardlhalpert at gmail.com>:
>>
>>
>> ---------- Forwarded message ----------
>> From: <smhuang at cse.ust.hk>
>> Date: Mon, Jun 29, 2009 at 5:47 AM
>> Subject: Hi, Richard
>> To: richardlhalpert at gmail.com
>>
>>
>> Dear Richard,
>>
>> Sorry to bother you. I am using soot to do some bytecode
>> instrumentation.
>> Whenever I insert a static method invocation at some stmt point, jasmin
>> throws out the following exception:
>>
>> Exception in thread "main" java.lang.RuntimeException: Negative Stack
>> height has been attained in :<soot.lesson2.TestInvoke: void foo()>
>> StackHeight: -1
>>
>> Could you please give me some help on this?
>>
>> Thanks,
>> Jeff
>>
>>
>>
>> _______________________________________________
>> Soot-list mailing list
>> Soot-list at sable.mcgill.ca
>> http://mailman.cs.mcgill.ca/mailman/listinfo/soot-list
>>
>>
>
>
>
> --
> Eric Bodden
> Sable Research Group, McGill University
> Montréal, Québec, Canada
>




More information about the Soot-list mailing list