You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@harmony.apache.org by gs...@apache.org on 2007/06/14 19:45:30 UTC
svn commit: r547330 -
/harmony/enhanced/drlvm/trunk/vm/vmcore/src/verifier/Verifier.cpp
Author: gshimansky
Date: Thu Jun 14 10:45:29 2007
New Revision: 547330
URL: http://svn.apache.org/viewvc?view=rev&rev=547330
Log:
Applied HARMONY-4053 [drlvm][verifier] Unexpected VerifyError is thrown if end_pc from exception table of code attribute is equal to the length of the code array
Modified:
harmony/enhanced/drlvm/trunk/vm/vmcore/src/verifier/Verifier.cpp
Modified: harmony/enhanced/drlvm/trunk/vm/vmcore/src/verifier/Verifier.cpp
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/vm/vmcore/src/verifier/Verifier.cpp?view=diff&rev=547330&r1=547329&r2=547330
==============================================================================
--- harmony/enhanced/drlvm/trunk/vm/vmcore/src/verifier/Verifier.cpp (original)
+++ harmony/enhanced/drlvm/trunk/vm/vmcore/src/verifier/Verifier.cpp Thu Jun 14 10:45:29 2007
@@ -4633,9 +4633,7 @@
handler_index, &start_pc, &end_pc,
&handler_pc, &handler_cp_index);
// check instruction range
- if ((start_pc >= len)
- || (end_pc > len)
- || (handler_pc >= len)) {
+ if ((end_pc > len) || (handler_pc >= len)) {
VF_REPORT(ctx, "Exception handler pc is out of range");
return VF_ErrorHandler;
}
@@ -4647,7 +4645,8 @@
// check that handlers point to instruction
// boundaries
if (NULL == bc[start_pc].m_instr
- || NULL == bc[end_pc].m_instr || NULL == bc[handler_pc].m_instr) {
+ || ((end_pc < len) && (NULL == bc[end_pc].m_instr))
+ || NULL == bc[handler_pc].m_instr) {
VF_REPORT(ctx,
"At least one of exception handler parameters ["
<< start_pc << ", " << end_pc << ", " <<