Menu

#685 Error: java.lang.IllegalArgumentException: Value "i" is not a reference value

v5.3.3
open-later
None
5
2018-02-01
2018-01-29
Tianxiao Gu
No

There is something wrong with an optimization.
The following exception can be reproduced with default optimization options.

ProGuard, version 6.0 beta2
Reading program jar [/home/t/Projects/JVMTesting/proguard-bugs/proguard-20180126082222/C0-injars.jar]
Reading library jar [/usr/lib/jvm/java-8-openjdk-amd64/jre/lib/rt.jar]
Note: you're ignoring all warnings!
Unexpected error while evaluating instruction:
  Class       = [C0]
  Method      = [main([Ljava/lang/String;)V]
  Instruction = [58] ifacmpeq +17 (target=75)
  Exception   = [java.lang.IllegalArgumentException] (Value "i" is not a reference value [proguard.evaluation.value.UnknownIntegerValue])
Unexpected error while performing partial evaluation:
  Class       = [C0]
  Method      = [main([Ljava/lang/String;)V]
  Exception   = [java.lang.IllegalArgumentException] (Value "i" is not a reference value [proguard.evaluation.value.UnknownIntegerValue])
Error: java.lang.IllegalArgumentException: Value "i" is not a reference value [proguard.evaluation.value.UnknownIntegerValue]

The exception is disappeared when all of the following optimizations are disabled.

field/removal/writeonly
method/marking/static
method/removal/parameter
code/removal/advanced
1 Attachments

Discussion

  • Eric Lafortune

    Eric Lafortune - 2018-02-01

    Thankx again for this detailed report. The artificially generated code contains some unusual constructs that confuse the optimizer. 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