Package com.tonic.analysis.verifier
Enum VerificationErrorType
- java.lang.Object
-
- java.lang.Enum<VerificationErrorType>
-
- com.tonic.analysis.verifier.VerificationErrorType
-
- All Implemented Interfaces:
Serializable,Comparable<VerificationErrorType>
public enum VerificationErrorType extends Enum<VerificationErrorType>
Category of a verification finding, spanning structural, type, control-flow, and stack-map checks.
-
-
Enum Constant Summary
Enum Constants Enum Constant Description CODE_TOO_LONGA method body is longer than the 65535 bytes the class file format permits.EXCEPTION_HANDLER_OVERLAPTwo handlers cover the same type over overlapping ranges, leaving the winner ambiguous.FRAME_LOCALS_MISMATCHThe locals a declared frame promises differ from those the verifier derived at that offset.FRAME_STACK_MISMATCHThe operand stack a declared frame promises differs from the one the verifier derived.FRAME_TYPE_MISMATCHAn individual slot in a declared frame names a type incompatible with the computed one.INCOMPATIBLE_RETURN_TYPEA return opcode or returned value disagrees with the method descriptor's return type.INSTRUCTION_FALLS_OFF_ENDThe last instruction can fall through, running past the end of the method body.INVALID_ARRAY_TYPEAn array instruction is applied to a value whose element type it cannot operate on.INVALID_BRANCH_TARGETA branch aims at an offset that falls mid-instruction or outside the method body.INVALID_CATCH_TYPEA handler names a catch type that does not descend from Throwable, so it can never match.INVALID_CONSTANT_POOL_INDEXAn instruction names a constant pool slot that does not exist in the class.INVALID_CONSTANT_POOL_TYPEA constant pool reference resolves to an entry of a kind the instruction cannot use.INVALID_EXCEPTION_HANDLERA handler's protected range is malformed, such as an empty, inverted, or out-of-code span.INVALID_FRAME_OFFSETA stack map frame claims an offset that is out of range or not greater than its predecessor.INVALID_LOCAL_INDEXA load or store names a local slot outside the frame's declared range.INVALID_OPCODEA byte in the code stream is not an opcode the JVM assigns, or is one reserved for internal use.INVALID_OPERANDAn opcode is recognized but its immediate operand is out of the range that opcode accepts.INVALID_WIDE_OPCODEA WIDE prefix precedes an opcode that has no wide-index form.JSR_MISMATCHA legacy subroutine is malformed, its RET not pairing with the JSR that entered it.LOCALS_OVERFLOWThe locals a method actually uses outgrow the max_locals its Code attribute declares.MERGE_CONFLICTPaths reaching a join disagree on stack depth or on types with no common supertype.MISSING_STACKMAP_FRAMEA jump target or handler entry has no stack map frame, so its incoming state is undeclared.PATH_DOES_NOT_RETURNA reachable path reaches its end without a return or throw to terminate the method.STACK_OVERFLOWThe operand stack grows past the max_stack the Code attribute declares.STACK_UNDERFLOWAn instruction pops more operands than the stack holds at that point.TYPE_MISMATCHAn instruction is handed an operand of the wrong type, such as a reference where an int is due.UNINITIALIZED_ACCESSA freshly allocated object is used before its constructor has run.UNINITIALIZED_LOCALA local is read on a path that never wrote it, so it holds no defined value there.UNREACHABLE_CODEInstructions no path from entry can arrive at, leaving them unverifiable dead weight.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description StringgetDescription()static VerificationErrorTypevalueOf(String name)Returns the enum constant of this type with the specified name.static VerificationErrorType[]values()Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
INVALID_OPCODE
public static final VerificationErrorType INVALID_OPCODE
A byte in the code stream is not an opcode the JVM assigns, or is one reserved for internal use.
-
INVALID_OPERAND
public static final VerificationErrorType INVALID_OPERAND
An opcode is recognized but its immediate operand is out of the range that opcode accepts.
-
INVALID_CONSTANT_POOL_INDEX
public static final VerificationErrorType INVALID_CONSTANT_POOL_INDEX
An instruction names a constant pool slot that does not exist in the class.
-
INVALID_CONSTANT_POOL_TYPE
public static final VerificationErrorType INVALID_CONSTANT_POOL_TYPE
A constant pool reference resolves to an entry of a kind the instruction cannot use.
-
INVALID_BRANCH_TARGET
public static final VerificationErrorType INVALID_BRANCH_TARGET
A branch aims at an offset that falls mid-instruction or outside the method body.
-
INSTRUCTION_FALLS_OFF_END
public static final VerificationErrorType INSTRUCTION_FALLS_OFF_END
The last instruction can fall through, running past the end of the method body.
-
INVALID_WIDE_OPCODE
public static final VerificationErrorType INVALID_WIDE_OPCODE
A WIDE prefix precedes an opcode that has no wide-index form.
-
CODE_TOO_LONG
public static final VerificationErrorType CODE_TOO_LONG
A method body is longer than the 65535 bytes the class file format permits.
-
INVALID_LOCAL_INDEX
public static final VerificationErrorType INVALID_LOCAL_INDEX
A load or store names a local slot outside the frame's declared range.
-
STACK_UNDERFLOW
public static final VerificationErrorType STACK_UNDERFLOW
An instruction pops more operands than the stack holds at that point.
-
STACK_OVERFLOW
public static final VerificationErrorType STACK_OVERFLOW
The operand stack grows past the max_stack the Code attribute declares.
-
TYPE_MISMATCH
public static final VerificationErrorType TYPE_MISMATCH
An instruction is handed an operand of the wrong type, such as a reference where an int is due.
-
UNINITIALIZED_ACCESS
public static final VerificationErrorType UNINITIALIZED_ACCESS
A freshly allocated object is used before its constructor has run.
-
INCOMPATIBLE_RETURN_TYPE
public static final VerificationErrorType INCOMPATIBLE_RETURN_TYPE
A return opcode or returned value disagrees with the method descriptor's return type.
-
INVALID_ARRAY_TYPE
public static final VerificationErrorType INVALID_ARRAY_TYPE
An array instruction is applied to a value whose element type it cannot operate on.
-
LOCALS_OVERFLOW
public static final VerificationErrorType LOCALS_OVERFLOW
The locals a method actually uses outgrow the max_locals its Code attribute declares.
-
UNINITIALIZED_LOCAL
public static final VerificationErrorType UNINITIALIZED_LOCAL
A local is read on a path that never wrote it, so it holds no defined value there.
-
MERGE_CONFLICT
public static final VerificationErrorType MERGE_CONFLICT
Paths reaching a join disagree on stack depth or on types with no common supertype.
-
PATH_DOES_NOT_RETURN
public static final VerificationErrorType PATH_DOES_NOT_RETURN
A reachable path reaches its end without a return or throw to terminate the method.
-
UNREACHABLE_CODE
public static final VerificationErrorType UNREACHABLE_CODE
Instructions no path from entry can arrive at, leaving them unverifiable dead weight.
-
INVALID_EXCEPTION_HANDLER
public static final VerificationErrorType INVALID_EXCEPTION_HANDLER
A handler's protected range is malformed, such as an empty, inverted, or out-of-code span.
-
EXCEPTION_HANDLER_OVERLAP
public static final VerificationErrorType EXCEPTION_HANDLER_OVERLAP
Two handlers cover the same type over overlapping ranges, leaving the winner ambiguous.
-
INVALID_CATCH_TYPE
public static final VerificationErrorType INVALID_CATCH_TYPE
A handler names a catch type that does not descend from Throwable, so it can never match.
-
JSR_MISMATCH
public static final VerificationErrorType JSR_MISMATCH
A legacy subroutine is malformed, its RET not pairing with the JSR that entered it.
-
MISSING_STACKMAP_FRAME
public static final VerificationErrorType MISSING_STACKMAP_FRAME
A jump target or handler entry has no stack map frame, so its incoming state is undeclared.
-
FRAME_TYPE_MISMATCH
public static final VerificationErrorType FRAME_TYPE_MISMATCH
An individual slot in a declared frame names a type incompatible with the computed one.
-
FRAME_STACK_MISMATCH
public static final VerificationErrorType FRAME_STACK_MISMATCH
The operand stack a declared frame promises differs from the one the verifier derived.
-
FRAME_LOCALS_MISMATCH
public static final VerificationErrorType FRAME_LOCALS_MISMATCH
The locals a declared frame promises differ from those the verifier derived at that offset.
-
INVALID_FRAME_OFFSET
public static final VerificationErrorType INVALID_FRAME_OFFSET
A stack map frame claims an offset that is out of range or not greater than its predecessor.
-
-
Method Detail
-
values
public static VerificationErrorType[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:for (VerificationErrorType c : VerificationErrorType.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static VerificationErrorType valueOf(String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)- Parameters:
name- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException- if this enum type has no constant with the specified nameNullPointerException- if the argument is null
-
getDescription
public String getDescription()
- Returns:
- the description
-
-