From c9ea56454493cf23eb15a1ce664bbf5628077a1c Mon Sep 17 00:00:00 2001 From: walon Date: Thu, 16 Oct 2025 22:28:05 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8DSplitBasicBlockGroup?= =?UTF-8?q?=E8=AE=A1=E7=AE=97=E5=B8=A6filter=E7=9A=84=E5=BC=82=E5=B8=B8han?= =?UTF-8?q?dler=E6=97=B6=EF=BC=8C=E5=85=88=E8=AE=A1=E7=AE=97=E6=95=B4?= =?UTF-8?q?=E4=B8=AA=E5=BC=82=E5=B8=B8=E5=9D=97=E5=86=8D=E8=AE=A1=E7=AE=97?= =?UTF-8?q?filter=E5=92=8Chandler=E5=9D=97=E7=9A=84=E9=A1=BA=E5=BA=8Fbug?= =?UTF-8?q?=EF=BC=8C=E6=AD=A3=E7=A1=AE=E6=96=B9=E5=BC=8F=E4=B8=BA=E5=85=88?= =?UTF-8?q?=E8=AE=A1=E7=AE=97filter=E5=92=8Chandler=EF=BC=8C=E5=86=8D?= =?UTF-8?q?=E8=AE=A1=E7=AE=97=E6=95=B4=E4=BD=93?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../MethodControlFlowCalculator.cs | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/Editor/ObfusPasses/ControlFlowObfus/MethodControlFlowCalculator.cs b/Editor/ObfusPasses/ControlFlowObfus/MethodControlFlowCalculator.cs index b4aae89..0457399 100644 --- a/Editor/ObfusPasses/ControlFlowObfus/MethodControlFlowCalculator.cs +++ b/Editor/ObfusPasses/ControlFlowObfus/MethodControlFlowCalculator.cs @@ -774,13 +774,13 @@ namespace Obfuz.ObfusPasses.ControlFlowObfus private class ExceptionHandlerWithFilterGroup : BlockGroup { public readonly ExceptionHandler exceptionHandler; - //public readonly ExceptionFilterGroup filterGroup; - //public readonly ExceptionHandlerGroup handlerGroup; - public ExceptionHandlerWithFilterGroup(ExceptionHandler exceptionHandler, List filterInstructions, List handlerInstructions, List allInstructions, Dictionary inst2group) : base(allInstructions, inst2group) + public readonly ExceptionFilterGroup filterGroup; + public readonly ExceptionHandlerGroup handlerGroup; + public ExceptionHandlerWithFilterGroup(ExceptionHandler exceptionHandler, ExceptionFilterGroup filterGroup, ExceptionHandlerGroup handlerGroup, List instructions, Dictionary inst2group) : base(instructions, inst2group) { this.exceptionHandler = exceptionHandler; - var filterGroup = new ExceptionFilterGroup(exceptionHandler, filterInstructions, inst2group); - var handlerGroup = new ExceptionHandlerGroup(exceptionHandler, handlerInstructions, inst2group); + this.filterGroup = filterGroup; + this.handlerGroup = handlerGroup; } } @@ -833,9 +833,10 @@ namespace Obfuz.ObfusPasses.ControlFlowObfus int filterEndIndex = ex.HandlerStart != null ? inst2Index[ex.HandlerStart] : inst2Index.Count; int handlerStartIndex = filterEndIndex; int handlerEndIndex = ex.HandlerEnd != null ? inst2Index[ex.HandlerEnd] : inst2Index.Count; - var filterHandlerGroup = new ExceptionHandlerWithFilterGroup(ex, - instructions.GetRange(filterStartIndex, filterEndIndex - filterStartIndex), - instructions.GetRange(handlerStartIndex, handlerEndIndex - handlerStartIndex), + + var filterGroup = new ExceptionFilterGroup(ex, instructions.GetRange(filterStartIndex, filterEndIndex - filterStartIndex), inst2blockGroup); + var handlerGroup = new ExceptionHandlerGroup(ex, instructions.GetRange(handlerStartIndex, handlerEndIndex - handlerStartIndex), inst2blockGroup); + var filterHandlerGroup = new ExceptionHandlerWithFilterGroup(ex, filterGroup, handlerGroup, instructions.GetRange(filterStartIndex, handlerEndIndex - filterStartIndex), inst2blockGroup); } else