Skip to content

Template mode: Infinite loop detected while resolving name references  #342

@Anthony-GitHub

Description

@Anthony-GitHub

Hi,

I'm using the template mode and it failed with the error "Infinite loop detected while resolving name references".

Full log:

 [INFO] Confuser.Core 1.6.0-alpha+bb5ce7b9bd Copyright c 2014 Ki, 2018 - 2021 Martin Karing
 [INFO] Running on Microsoft Windows NT 6.2.9200.0, .NET Framework v4.0.30319.42000, 64 bits
[DEBUG] Discovering plugins...
 [INFO] Discovered 13 protections, 1 packers.
[DEBUG] Resolving component dependency...
 [INFO] Loading input modules...
 [INFO] Loading '.\ConfuserExInfiniteLoopBug.dll'...
 [INFO] Initializing...
[DEBUG] Building pipeline...
[DEBUG] Executing 'Type scanner' phase...
 [INFO] Resolving dependencies...
[DEBUG] Checking Strong Name...
[DEBUG] Creating global .cctors...
[DEBUG] Executing 'Name analysis' phase...
[DEBUG] Building VTables & identifier list...
[DEBUG] Analyzing...
 [INFO] Processing module 'ConfuserExInfiniteLoopBug.dll'...
[DEBUG] Executing 'Invalid metadata addition' phase...
[DEBUG] Executing 'Renaming' phase...
[DEBUG] Renaming...
[ERROR] Infinite loop detected while resolving name references.
Processed definition: Original Name: ConfuserExInfiniteLoopBug.inner.ClassA::TestEvent; Name Hash: D82C2349
Assembly: ConfuserExInfiniteLoopBug.dll
Faulty References:
 - Member Override Reference(This Referenced Method(Original Name: ConfuserExInfiniteLoopBug.inner.ClassA::TestEvent; Name Hash: D82C2349); Base Referenced Method(Original Name: ConfuserExInfiniteLoopBug.inner.AEvents::TestEvent; Name Hash: FF497F66))
 - Member Override Reference(This Referenced Method(Original Name: ConfuserExInfiniteLoopBug.inner.ClassA::TestEvent; Name Hash: D82C2349); Base Referenced Method(Original Name: ConfuserExInfiniteLoopBug.inner.BEvents::TestEvent; Name Hash: C182C948))
Failed at 2:27 PM, 0:00 elapsed.

I upload a simple demo project to reproduce this:
ConfuserExInfiniteLoopBug.zip

Steps to Reproduce:

  1. Build the project
  2. run _test.bat in cmd
  • confuserex.crproj
<project outputDir=".\dotfus" baseDir="." xmlns="http://confuser.codeplex.com">
    <rule preset="none" pattern="true" >
        <protection id="anti debug" action="remove" />
        <protection id="anti dump" action="remove" />
        <protection id="anti ildasm" action="remove" />
        <protection id="anti tamper" action="remove" />
        <protection id="constants" action="remove" />
        <protection id="ctrl flow" action="remove" />
        <protection id="invalid metadata" action="remove" />
        <protection id="ref proxy" action="remove" />
        <protection id="rename" action="add">
          <argument name="mode" value="sequential" />
          <argument name="renPublic" value="true" />
          <argument name="flatten" value="false" />
        </protection>
        <protection id="watermark" action="remove" />
        <protection id="resources" action="remove" />
    </rule>
  <module path=".\ConfuserExInfiniteLoopBug.dll" snKey=".\test.snk">
    <rule preset="none" pattern="namespace('ConfuserExInfiniteLoopBug.Public')" >
        <protection id="rename" action="remove"/>
    </rule>
  </module>
  </project>

Thanks
Anthony

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions