Bug fix. Local variable analysis for finally blocks was incorrect. Fixes bug #3600788.

This commit is contained in:
jfrijters 2013-01-15 09:19:01 +00:00
Родитель c2cf20fb38
Коммит 99c87eacc7
1 изменённых файлов: 3 добавлений и 3 удалений

Просмотреть файл

@ -464,8 +464,8 @@ struct LocalVarInfo
// Now we recursively analyse the handler and afterwards merge the endfault locations back to us
FindLocalVarState[] handlerState = new FindLocalVarState[instructions.Length];
handlerState[handler].changed = true;
handlerState[handler].sites = new FindLocalVarStoreSite[maxLocals];
handlerState[handler].Merge(curr);
curr = new FindLocalVarState();
FindLocalVariablesImpl(codeInfo, classFile, method, handlerState);
// Merge back to the target of our __goto_finally
@ -476,7 +476,7 @@ struct LocalVarInfo
&& VerifierTypeWrapper.IsFaultBlockException(codeInfo.GetRawStackTypeWrapper(j, 0))
&& ((VerifierTypeWrapper)codeInfo.GetRawStackTypeWrapper(j, 0)).Index == handler)
{
state[instructions[i].Arg1].Merge(handlerState[j]);
curr.Merge(handlerState[j]);
}
}
}