Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

class with function pointer produces wrong code #533

Open
MarcBorgers opened this issue Mar 24, 2023 · 0 comments
Open

class with function pointer produces wrong code #533

MarcBorgers opened this issue Mar 24, 2023 · 0 comments
Labels
potential-bug Something does not seem to be working triage This issue needs some initial analysis.

Comments

@MarcBorgers
Copy link

Target framework: 4.6.1

For the target framework, the version of .NET that is targetted by the assembly you are trying to obfuscate is relevant.
-->

  • ConfuserEx Version: 1.7.0 alpha and 1.6.0
  • Target Framework:
  • Operating System: win10

Steps to Reproduce:

  1. enclosed 2 source files that produce an exception when running, see the log of the exception:
    Exception : System.ArgumentException: Identifier '?????????????????????????????????????????' is not CLS-compliant.

     Parameter name: ident
    
        at System.Xml.Serialization.CodeIdentifier.CheckValidIdentifier(String ident)
    
        at System.Xml.Serialization.XmlSerializationWriterILGen.WriteStructMethod(StructMapping mapping)
    
        at System.Xml.Serialization.XmlSerializationWriterILGen.GenerateMethod(TypeMapping mapping)
    
        at System.Xml.Serialization.XmlSerializationILGen.GenerateReferencedMethods()
    
        at System.Xml.Serialization.XmlSerializationWriterILGen.GenerateEnd()
    
        at System.Xml.Serialization.TempAssembly.GenerateRefEmitAssembly(XmlMapping[] xmlMappings, Type[] types, String defaultNamespace, Evidence evidence)
    
        at System.Xml.Serialization.TempAssembly..ctor(XmlMapping[] xmlMappings, Type[] types, String defaultNamespace, String location, Evidence evidence)
    
        at System.Xml.Serialization.XmlSerializer.GenerateTempAssembly(XmlMapping xmlMapping, Type type, String defaultNamespace)
    
        at System.Xml.Serialization.XmlSerializer..ctor(Type type, String defaultNamespace)
    
        at Agfa.Licensing.LicenseServiceConfig.?????????????????????????????????????????(FileInfo )
    
        at Agfa.Licensing.Utilities.SafeFilePersister`1.Read(FileInfo fileToRead, FileInfo tempFileToRead)
    

The workaround was to exclude one class from Obfuscating (as shown in the source enclosed)

sourcesProducingError.zip

@MarcBorgers MarcBorgers added potential-bug Something does not seem to be working triage This issue needs some initial analysis. labels Mar 24, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
potential-bug Something does not seem to be working triage This issue needs some initial analysis.
Projects
None yet
Development

No branches or pull requests

1 participant