Mercurial > hg > graal-compiler
comparison src/share/vm/oops/method.cpp @ 7469:0c8717a92b2d
8001341: SIGSEGV in methodOopDesc::fast_exception_handler_bci_for(KlassHandle,int,Thread*)+0x3e9.
Summary: Use methodHandle.
Reviewed-by: coleenp, acorn, twisti, sspitsyn
author | jiangli |
---|---|
date | Tue, 08 Jan 2013 13:01:19 -0500 |
parents | 5505fbbae3d3 |
children | 18c3c3fa291b |
comparison
equal
deleted
inserted
replaced
7468:608b2e8a0063 | 7469:0c8717a92b2d |
---|---|
190 } | 190 } |
191 | 191 |
192 return buf; | 192 return buf; |
193 } | 193 } |
194 | 194 |
195 int Method::fast_exception_handler_bci_for(KlassHandle ex_klass, int throw_bci, TRAPS) { | 195 int Method::fast_exception_handler_bci_for(methodHandle mh, KlassHandle ex_klass, int throw_bci, TRAPS) { |
196 // exception table holds quadruple entries of the form (beg_bci, end_bci, handler_bci, klass_index) | 196 // exception table holds quadruple entries of the form (beg_bci, end_bci, handler_bci, klass_index) |
197 // access exception table | 197 // access exception table |
198 ExceptionTable table(this); | 198 ExceptionTable table(mh()); |
199 int length = table.length(); | 199 int length = table.length(); |
200 // iterate through all entries sequentially | 200 // iterate through all entries sequentially |
201 constantPoolHandle pool(THREAD, constants()); | 201 constantPoolHandle pool(THREAD, mh->constants()); |
202 for (int i = 0; i < length; i ++) { | 202 for (int i = 0; i < length; i ++) { |
203 //reacquire the table in case a GC happened | 203 //reacquire the table in case a GC happened |
204 ExceptionTable table(this); | 204 ExceptionTable table(mh()); |
205 int beg_bci = table.start_pc(i); | 205 int beg_bci = table.start_pc(i); |
206 int end_bci = table.end_pc(i); | 206 int end_bci = table.end_pc(i); |
207 assert(beg_bci <= end_bci, "inconsistent exception table"); | 207 assert(beg_bci <= end_bci, "inconsistent exception table"); |
208 if (beg_bci <= throw_bci && throw_bci < end_bci) { | 208 if (beg_bci <= throw_bci && throw_bci < end_bci) { |
209 // exception handler bci range covers throw_bci => investigate further | 209 // exception handler bci range covers throw_bci => investigate further |