comparison src/share/vm/interpreter/bytecodeInterpreter.cpp @ 2142:8012aa3ccede

4926272: methodOopDesc::method_from_bcp is unsafe Reviewed-by: coleenp, jrose, kvn, dcubed
author never
date Thu, 13 Jan 2011 22:15:41 -0800
parents 6a2d73358ff7
children b92c45f2bc75 173926398291
comparison
equal deleted inserted replaced
2130:34d64ad817f4 2142:8012aa3ccede
1 /* 1 /*
2 * Copyright (c) 2002, 2010, Oracle and/or its affiliates. All rights reserved. 2 * Copyright (c) 2002, 2011, Oracle and/or its affiliates. All rights reserved.
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 * 4 *
5 * This code is free software; you can redistribute it and/or modify it 5 * This code is free software; you can redistribute it and/or modify it
6 * under the terms of the GNU General Public License version 2 only, as 6 * under the terms of the GNU General Public License version 2 only, as
7 * published by the Free Software Foundation. 7 * published by the Free Software Foundation.
829 // because this requires entering the vm to do the registering. While the 829 // because this requires entering the vm to do the registering. While the
830 // opcode is complete we can't advance because there are no more opcodes 830 // opcode is complete we can't advance because there are no more opcodes
831 // much like trying to deopt at a poll return. In that has we simply 831 // much like trying to deopt at a poll return. In that has we simply
832 // get out of here 832 // get out of here
833 // 833 //
834 if ( Bytecodes::code_at(pc, METHOD) == Bytecodes::_return_register_finalizer) { 834 if ( Bytecodes::code_at(METHOD, pc) == Bytecodes::_return_register_finalizer) {
835 // this will do the right thing even if an exception is pending. 835 // this will do the right thing even if an exception is pending.
836 goto handle_return; 836 goto handle_return;
837 } 837 }
838 UPDATE_PC(Bytecodes::length_at(pc)); 838 UPDATE_PC(Bytecodes::length_at(METHOD, pc));
839 if (THREAD->has_pending_exception()) goto handle_exception; 839 if (THREAD->has_pending_exception()) goto handle_exception;
840 goto run; 840 goto run;
841 } 841 }
842 case got_monitors: { 842 case got_monitors: {
843 // continue locking now that we have a monitor to use 843 // continue locking now that we have a monitor to use