Mercurial > hg > truffle
diff src/share/vm/classfile/verifier.hpp @ 18099:077483254bf6
8050485: super() in a try block in a ctor causes VerifyError
Summary: Parse catch clause paths to ensure they end in throws
Reviewed-by: dlong, acorn, kamg, ctornqvi, lfoltan
author | hseigel |
---|---|
date | Tue, 12 Aug 2014 20:29:25 -0400 |
parents | 2993491d47df |
children | 4b26b980ec8d |
line wrap: on
line diff
--- a/src/share/vm/classfile/verifier.hpp Wed Aug 20 15:32:00 2014 -0700 +++ b/src/share/vm/classfile/verifier.hpp Tue Aug 12 20:29:25 2014 -0400 @@ -30,6 +30,7 @@ #include "oops/klass.hpp" #include "oops/method.hpp" #include "runtime/handles.hpp" +#include "utilities/growableArray.hpp" #include "utilities/exceptions.hpp" // The verifier class @@ -303,6 +304,16 @@ StackMapFrame* current_frame, u4 code_length, bool* this_uninit, constantPoolHandle cp, TRAPS); + // Used by ends_in_athrow() to push all handlers that contain bci onto + // the handler_stack, if the handler is not already on the stack. + void push_handlers(ExceptionTable* exhandlers, + GrowableArray<u4>* handler_stack, + u4 bci); + + // Returns true if all paths starting with start_bc_offset end in athrow + // bytecode or loop. + bool ends_in_athrow(u4 start_bc_offset); + void verify_invoke_instructions( RawBytecodeStream* bcs, u4 code_length, StackMapFrame* current_frame, bool* this_uninit, VerificationType return_type,