Skip to content

Fixed detection of blocking references across multiple assemblies#425

Merged
mkaring merged 2 commits into
masterfrom
feature/cross_assembly_blocking_refs
Dec 18, 2021
Merged

Fixed detection of blocking references across multiple assemblies#425
mkaring merged 2 commits into
masterfrom
feature/cross_assembly_blocking_refs

Conversation

@mkaring

@mkaring mkaring commented Oct 16, 2021

Copy link
Copy Markdown
Owner

fixes #379

@mkaring mkaring self-assigned this Oct 16, 2021
@mkaring mkaring added the bug Something isn't working label Oct 16, 2021
@mkaring mkaring added this to the 1.6 milestone Oct 16, 2021
@mkaring

mkaring commented Oct 16, 2021

Copy link
Copy Markdown
Owner Author

@KvanTTT: Could you test this version in your projects?

@AppVeyorBot

Copy link
Copy Markdown

Build ConfuserEx 886 completed (commit f0c4f2cf47 by @mkaring)

@KvanTTT

KvanTTT commented Oct 17, 2021

Copy link
Copy Markdown

Unfortunately, another error appeared. I'm trying to figure out a reason.

@mkaring

mkaring commented Oct 17, 2021

Copy link
Copy Markdown
Owner Author

That was a pretty major change to the way the way the dependencies are resolved, because before some of the references were only "known" on one direction (the inheriting method knew about the inherited method, but not the other way around). I changed that, the tests did look good, but I am not 100% sure if that introduced some new weirdness.

The problems are mainly caused if members that are called across multiple assemblies need to be renamed. This causes all sorts of strange side effects.

@KvanTTT

KvanTTT commented Oct 17, 2021

Copy link
Copy Markdown

It seems like there is something wrong with crossreference properties renaming:

System.TypeInitializationException: The type initializer for 'XXX' threw an exception. ---> System.TypeLoadException: Method 'get_Logger' in type '_YbY95Z8ef8fZ0hNbp9Bl6R07inP' from assembly 'YYY, Version=2.0.0.0, Culture=neutral, PublicKeyToken=null' does not have an implementation.
   at _Lp1dCrrC6WtbAIfGTxJRjSwiWWb._Rq1CPdIekKPykD0eUP8zxKmKCnZ()
   at ZZZ..cctor()
   --- End of inner exception stack trace ---
   at WWW..ctor(SourceRepository , _bpohhAchrs62TGia1PpDFVZmNBn )
   at _U2UXRQIJWJL0xcUbI1mErr33wNJ.‪‌‍‍‪‪‫‬‪‫‌‭‍‫‏‌‬​​‮‭‫‎‮(SourceRepository , _bpohhAchrs62TGia1PpDFVZmNBn )
   at _U2UXRQIJWJL0xcUbI1mErr33wNJ._71mdiZBHggKw2KWOFnjdtHe8hYu()
   at _U2UXRQIJWJL0xcUbI1mErr33wNJ._mjUwxZWUtQoByzaSlmVua9N6O9A()

Moreover, this property is not being renamed. But I still can not extract minimal reproducible example :(

@KvanTTT

KvanTTT commented Oct 17, 2021

Copy link
Copy Markdown

May be somebody else can test the assembly and check if it has errors?

@wmjordan

Copy link
Copy Markdown

The artifact on appveyor has been removed. How to obtain a binary?

@KvanTTT

KvanTTT commented Dec 13, 2021

Copy link
Copy Markdown

At least it's possible to build ConfuserEx manually.

@KvanTTT

KvanTTT commented Dec 13, 2021

Copy link
Copy Markdown

Generally, I accept this patch. Also, I think it makes sense to merge that request: #385 since I was not able to extract another minimal sample for bug that prevents correct naming obfuscation.

@mkaring

mkaring commented Dec 18, 2021

Copy link
Copy Markdown
Owner Author

So I'm merging that for now. The effect of the change is that renaming across assemblies that require inheritance issues to be resolved are generally blocked. Meaning no renaming will happen.
There is no other solution for this right now, because ConfuserEx is processing each assembly at this stage individually. It solve this properly it would have to join the assemblies together to obfuscate them as a unit.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Application crashed due to Failed to rename all targeted members, because the references are blocking each other

4 participants