Closed samczsun closed 6 years ago
Nice to have you back. :)
This kind of issue doesn't sound too serious, but I'll try to look into it when I have the time. Glad someone's willing to do the dirty work of finding all the places the JVM forgot to verify stuff.
Thanks! I also have a completely unrelated question but since I don't have any other ways of contacting you...
Do you happen to know whether Krakatau can handle lots of small exception handlers better, or a few large exception handlers better? For files which are heavily obfuscated with handlers littered all over the place I can either automate splitting them into small individual handlers spanning a single instruction, or merging them into as big a handler as possible. However, I don't know if one has a heavier performance impact than the other.
Krakatau already merges and splits exception handlers during the initial SSA-CFG construction, so it is unlikely to make much difference, as long as the logic is the same. I would expect larger handlers to be faster in most cases, but assuming they simplify to the same SSA-CFG, then the only part that will be affected is the initial bytecode parsing and verification, which is usually dwarfed by the later passes.
I get a linkage error when I try to run your examples. Presumably, this is another place where Java 9 added verification that wasn't verified before. Given this, I don't think it's worth the effort to fix.
I'm back!
In the default verification mode (e.g not
-Xverify:all
), it looks like the JVM doesn't verify certain class names. Specifically, a descriptor of[I;
will be treated as a regular object type (for example, when parsingcom/foobar/Name
instead ofLcom/foobar/Name;
) even though it ends with a semicolon. This means that aNoClassDefFoundError
will be thrown at runtime instead of aVerifyError
at linktime.Sample:
Krakatau:
Output:
Edit: swapping
anewarray [I;
withnew I;
will cause the following assertion error:This variation causes a different error: