Mercurial > hg > truffle
comparison 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 |
comparison
equal
deleted
inserted
replaced
18098:853a5158a1e2 | 18099:077483254bf6 |
---|---|
28 #include "classfile/verificationType.hpp" | 28 #include "classfile/verificationType.hpp" |
29 #include "memory/gcLocker.hpp" | 29 #include "memory/gcLocker.hpp" |
30 #include "oops/klass.hpp" | 30 #include "oops/klass.hpp" |
31 #include "oops/method.hpp" | 31 #include "oops/method.hpp" |
32 #include "runtime/handles.hpp" | 32 #include "runtime/handles.hpp" |
33 #include "utilities/growableArray.hpp" | |
33 #include "utilities/exceptions.hpp" | 34 #include "utilities/exceptions.hpp" |
34 | 35 |
35 // The verifier class | 36 // The verifier class |
36 class Verifier : AllStatic { | 37 class Verifier : AllStatic { |
37 public: | 38 public: |
300 | 301 |
301 void verify_invoke_init( | 302 void verify_invoke_init( |
302 RawBytecodeStream* bcs, u2 ref_index, VerificationType ref_class_type, | 303 RawBytecodeStream* bcs, u2 ref_index, VerificationType ref_class_type, |
303 StackMapFrame* current_frame, u4 code_length, bool* this_uninit, | 304 StackMapFrame* current_frame, u4 code_length, bool* this_uninit, |
304 constantPoolHandle cp, TRAPS); | 305 constantPoolHandle cp, TRAPS); |
306 | |
307 // Used by ends_in_athrow() to push all handlers that contain bci onto | |
308 // the handler_stack, if the handler is not already on the stack. | |
309 void push_handlers(ExceptionTable* exhandlers, | |
310 GrowableArray<u4>* handler_stack, | |
311 u4 bci); | |
312 | |
313 // Returns true if all paths starting with start_bc_offset end in athrow | |
314 // bytecode or loop. | |
315 bool ends_in_athrow(u4 start_bc_offset); | |
305 | 316 |
306 void verify_invoke_instructions( | 317 void verify_invoke_instructions( |
307 RawBytecodeStream* bcs, u4 code_length, StackMapFrame* current_frame, | 318 RawBytecodeStream* bcs, u4 code_length, StackMapFrame* current_frame, |
308 bool* this_uninit, VerificationType return_type, | 319 bool* this_uninit, VerificationType return_type, |
309 constantPoolHandle cp, TRAPS); | 320 constantPoolHandle cp, TRAPS); |