Menu

#686 Error: java.lang.IllegalArgumentException: Stacks have different current sizes [2] and [3]

v6.0
open-later
None
5
2018-02-01
2018-01-29
Tianxiao Gu
No
ProGuard, version 6.0 beta2
Reading program jar [/Users/tianxiaogu/Dropbox/ProGuard/proguard-20180126125237/C0-injars.jar]
Reading library jar [/Library/Java/JavaVirtualMachines/jdk1.8.0_131.jdk/Contents/Home/jre/lib/rt.jar]
Note: you're ignoring all warnings!
Unexpected error while performing partial evaluation:
  Class       = [C0]
  Method      = [main([Ljava/lang/String;)V]
  Exception   = [java.lang.IllegalArgumentException] (Stacks have different current sizes [2] and [3])
Error: java.lang.IllegalArgumentException: Stacks have different current sizes [2] and [3]

This issue has a similar stack trace with #681. The difference is that it cannot be resolved by disabling tail recursion but by disabling all the following optimizations (automatically reduced by delta debugging).

field/propagation/value
method/propagation/parameter
method/propagation/returnvalue
code/simplification/advanced
-optimizations !field/propagation/value,!method/propagation/parameter,!method/propagation/returnvalue,!code/simplification/advanced
1 Attachments

Discussion

  • Eric Lafortune

    Eric Lafortune - 2018-02-01

    Thanks again for this detailed report. The artificially generated code contains some unusual constructs that confuse the optimizer. The root cause is similar as before: dup / dup2_x1 / branch constructs are not simplified as they should. The problem needs to be fixed, but it has a lower priority at this point. For the time being, in ProGuard 6.0, you can exclude such code from being optimized with:

    -keep,allowshrinking,allowobfuscation,includecode class C0 { *; }
    
     
  • Eric Lafortune

    Eric Lafortune - 2018-02-01
    • status: open --> open-later
    • assigned_to: Eric Lafortune
     

Log in to post a comment.

MongoDB Logo MongoDB