修复 EvalStackCalculator::SimulateRunAllBlocks 计算返回值包含`creq`的函数(如`int XXX{ init;}`的setter函数)的进出栈参数时由于没有对method.ReturnType RemovePinnedAndModifiers,导致错误地判定为methodHasReturnValue,导致进出栈错误的bug
parent
2572841e59
commit
72d0b292c5
|
@ -253,7 +253,7 @@ namespace Obfuz.Emit
|
|||
private void SimulateRunAllBlocks()
|
||||
{
|
||||
Dictionary<BasicBlock, EvalStackState> blockEvalStackStates = _basicBlocks.Blocks.ToDictionary(b => b, b => new EvalStackState());
|
||||
bool methodHasReturnValue = _method.ReturnType.ElementType != ElementType.Void;
|
||||
bool methodHasReturnValue = _method.ReturnType.RemovePinnedAndModifiers().ElementType != ElementType.Void;
|
||||
|
||||
CilBody body = _method.Body;
|
||||
if (body.HasExceptionHandlers)
|
||||
|
|
Loading…
Reference in New Issue