Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Fixed detection of blocking references across multiple assemblies #425

Merged
merged 2 commits into from
Dec 18, 2021

Conversation

mkaring
Copy link
Owner

@mkaring mkaring commented Oct 16, 2021

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
Copy link
Owner Author

mkaring commented Oct 16, 2021

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

@AppVeyorBot
Copy link

Build ConfuserEx 886 completed (commit f0c4f2cf47 by @mkaring)

@KvanTTT
Copy link

KvanTTT commented Oct 17, 2021

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

@mkaring
Copy link
Owner Author

mkaring commented Oct 17, 2021

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
Copy link

KvanTTT commented Oct 17, 2021

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
Copy link

KvanTTT commented Oct 17, 2021

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

@wmjordan
Copy link

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

@KvanTTT
Copy link

KvanTTT commented Dec 13, 2021

At least it's possible to build ConfuserEx manually.

@KvanTTT
Copy link

KvanTTT commented Dec 13, 2021

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
Copy link
Owner Author

mkaring commented Dec 18, 2021

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.

@mkaring mkaring merged commit da64261 into master Dec 18, 2021
@mkaring mkaring deleted the feature/cross_assembly_blocking_refs branch December 18, 2021 11:55
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
bug Something isn't working
Projects
None yet
4 participants