Skip to content

Commit 6fe1808

Browse files
author
thk123
committed
Improved error reporting on invalid constant pool index
This will allow easy deduction of whether the invalid index comes from some constant not being loaded (probably only slightly invalid) or reading an irreveant byte when trying to read a constant pool index (much larger than the constant pool size).
1 parent a619e48 commit 6fe1808

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/java_bytecode/java_bytecode_parser.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,7 @@ class java_bytecode_parsert:public parsert
7979
if(index==0 || index>=constant_pool.size())
8080
{
8181
error() << "invalid constant pool index (" << index << ")" << eom;
82+
error() << "constant pool size: " << constant_pool.size() << eom;
8283
throw 0;
8384
}
8485

0 commit comments

Comments
 (0)