Proguard Core Versions Save

Library to read, write, analyze, and process java bytecode

v9.0.3

1 year ago

Java support

  • Update maximum supported Java class version to 63.65535 (Java 19 ea). (PGD-247)

Improved

  • Add utility to produce dot-graphs for control flow automatons (CfaUtil.toDot(cfa), example VisualizeCfa).
  • Add support for heap slicing on call sites and heap reconstruction on return sites in dataflow analysis heap tree model. (T17091)
  • Add support for differential map representation to be used in the data flow analysis. (T17090)

API Improvements

  • Split ProgramLocationDependentTransferRelation into forward and backward variants.
  • Add ClassPoolClassLoader utility for loading ProGuardCORE classes.

v9.0.2

1 year ago

Improvements to Kotlin metadata initialization

Several improvements to Kotlin metadata initialization now allow building the Kotlin metadata model for library classes (LibraryClass):

  • KotlinMetadataInitializer provides a new public method initialize(Clazz, int, int[], String[], String[], int, String, String) to initialize the Kotlin metadata model for a given class.
  • ClassReader can now build the Kotlin metadata model by setting includeKotlinMetadata to true.
  • LibraryClassReader can now read the Kotlin metadata annotation and provide the components to a consumer.
  • An UnsupportedKotlinMetadata type is now assigned by the KotlinMetadataInitializer if the Kotlin metadata model could not be initialized correctly.

v9.0.1

1 year ago

Improved

  • ExecutingInvocationUnit now loads values from static final fields.
  • Initialize Kotlin lambda method references when the JVM method name is <anonymous>. (T16483)
  • Add the possibility of limiting the number of CodeAttributes contributing into CFA.
  • Add the possibility of limiting the number of CodeAttributes considered by the CallResolver.

Bug fixes

  • Fix wrong handling of array types in ExecutingIvocationUnit and ParticularReferenceValue.
  • ParticularReferenceValue sanity checks now take inheritance into consideration, improving call analysis. (T15197)
  • Prevent missing semicolon leading to an infinite loop in ClassUtil#internalMethodParameterCount.
  • Make category 2 CPA taint sources affect only the most significant byte abstract state.
  • Fix inconsistent usage of type names in the context of the PartialEvaluator that could result in trying to create an internal type string from a string that was already an internal type. (T15513)
  • Fix initialization of Kotlin callable references when using -Xno-optimized-callable-references compiler option. (T16486)

Upgrade considerations

TYPE NAME CONVENTION

PGC has different representation for type string variables:

  • External class name: com.guardsquare.SomeClass
  • Internal class name: com/guardsquare/SomeClass
  • Internal type (or just type): Lcom/guardsquare/SomeClass; (for arrays e.g. [I, [Ljava/lang/Object;)
  • Internal class type: com/guardsquare/SomeClass (for arrays this is their internal type e.g. [I, [Ljava/lang/Object;)

See proguard.classfile.util.ClassUtil for useful methods to convert between the different representations.

Since internal class name and type were used ambiguously, from version 9.0.1 the internal type is used consistently whenever we have a variable named type.

Since this was not the case, this update might cause some type variables switching from the internal class name notation to the internal type notation, potentially breaking some logic if types are used by an external application using proguard-core.

v9.0.0

2 years ago

Configurable program analysis (CPA)

CPA is a formalism for data flow analysis allowing seamless composition of various analyses and model checking techniques. Thus, it adds a framework for systematic development and extension of static analyses in a uniform structured way.

Taint analysis is the first ProGuardCORE CPA. Its goal is to detect data flow between source and sink method calls, which is useful for detecting bugs and security flaws.

The Taint Analysis manual page provides more information.

  • Add configurable program analysis (CPA) for interprocedural data flow analysis development.
  • Add taint analysis.

Bug fixes

  • Prevent linking a final method with a shadowing method in a subclass. (T14726)
  • Force Call#getArgumentCount() to be correct even if the actual argument values could not be calculated or have been cleared. (TT14632)
  • Reset ExecutingInvocationUnit parameters array even when an exception happens.

v8.0.7

2 years ago

Version 8.0.7

Java support

  • Update maximum supported Java class version to 62.65535 (Java 18 ea). (T13973)

Kotlin support

  • Update kotlinx.metadata dependency to version 0.4.1
  • Add support for Kotlin property synthetic delegate methods. (T14060)
  • Add ability to pass KotlinMetadataVersion to KotlinMetadataWriter / KotlinModuleWriter.

v8.0.6

2 years ago

Version 8.0.6

Improved

  • Add support for writing out zip64 archives. (PGC-32)
  • Improve speed for ClassPool.contains method. (T5205)

v8.0.5

2 years ago

Version 8.0.5

Improved

  • Upgrade log4j2 dependency to v2.17.1 in response to CVE-2021-44832.
  • Add support for reading and writing Kotlin 1.6 metadata (update kotlinx.metadata dependency to version 0.3).
  • Add support to MemberDescriptorReferencedClassVisitor for visiting referenced Kotlin inline class parameters. (T13653)

Bug fixes

  • Fix CallResolver erroneously creating call edges to unimplemented interface methods.
  • Make the DominatorCalculator skip methods with an empty CodeAttribute.
  • Prevent updating Kotlin function names with mangled JVM method names in ClassReferenceFixer. (PGD-208)
  • Initialize Kotlin default implementation classes of annotation classes correctly in ClassReferenceInitializer.
  • Correctly initialize Java Record component attributes in ClassReferenceInitializer. (PGC-28, PGD-194)

API changes

  • KotlinInterfaceToDefaultImplsClassVisitor replaced by KotlinClassToDefaultImplsClassVisitor.
  • Deprecate Kotlin class metadata flag IS_INLINE and replaced with IS_VALUE (T4771).
  • Convert to/from Kotlin unsigned integers in Kotlin annotation unsigned type arguments. (T5405)
  • Initialize array dimension in Kotlin annotation ClassValue type arguments. (T5406)
  • Add support for Kotlin inline class underlying type to Kotlin metadata model. (T4774)

v8.0.4

2 years ago

Version 8.0.4

Improved

  • Upgrade log4j2 dependency to v2.17 in response to CVE-2021-45105.

API Improvements

  • Add KotlinMetadataVersionFilter to filter classes based on the version of the attached metadata. (T5017)

v8.0.3

2 years ago

Improved

  • Upgrade log4j2 dependency in response to CVE-2021-45046.

v8.0.2

2 years ago

Improved

  • Upgrade log4j2 dependency in response to CVE-2021-44228.

API Improvements

  • Add call resolving and graph traversal features to enable interprocedural control flow analyses.

Bug fixes

  • Fix potential StringIndexOutOfBoundsException while trimming attribute value spaces in SignedJarWriter. (T7004)
  • Fix referencedClass of Values generated by the ExecutingInvocationUnit. (T6031)
  • Fix potential StackOverflowError when using an AttributeVisitor to visit runtime invisible type annotations. (PGD-182)
  • Fix potential StringIndexOutOfBoundsException in KotlinCallableReferenceInitializer. (T5927)
  • Fix potential NullPointerException in KotlinInterClassPropertyReferenceInitializer. (T6138)
  • Fix wrong offset for complementary branch instruction when widening branch instructions in InstructionWriter. (T5721)
  • Fix potential ClassFormatError due to adding multiple annotation attributes when processing Kotlin code.
  • Fix potential NullPointerException due to missing classes in ClassReferenceInitializer.
  • Prevent making package-private final methods that are shadowed protected. (T7056)