You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
DnSpyEx loads the mixed linux module (R2R crossgened) just fine.
But by saving (without any modification) generates exception:
dnlib.DotNet.Writer.ModuleWriterException: Invalid section RVA
at dnlib.DotNet.Writer.NativeModuleWriter.WriteFile()
at dnlib.DotNet.Writer.NativeModuleWriter.Write()
at dnlib.DotNet.Writer.NativeModuleWriter.WriteImpl()
at dnlib.DotNet.Writer.ModuleWriterBase.Write(Stream dest)
at dnlib.DotNet.Writer.ModuleWriterBase.Write(String fileName)
at dnlib.DotNet.ModuleDefMD.NativeWrite(String filename, NativeModuleWriterOptions options)
at dnSpy.AsmEditor.SaveModule.ModuleSaver.Save(SaveModuleOptionsVM vm) in C:\Users\admin\Desktop\dnSpy-hotfix\dnSpy\Extensions\dnSpy.AsmEditor\SaveModule\ModuleSaver.cs:line 187
at dnSpy.AsmEditor.SaveModule.ModuleSaver.SaveAll() in C:\Users\admin\Desktop\dnSpy-hotfix\dnSpy\Extensions\dnSpy.AsmEditor\SaveModule\ModuleSaver.cs:line 151
at dnSpy.AsmEditor.SaveModule.SaveMultiModuleVM.SaveAsync(SaveOptionsVM[] mods) in C:\Users\admin\Desktop\dnSpy-hotfix\dnSpy\Extensions\dnSpy.AsmEditor\SaveModule\SaveMultiModuleVM.cs:line 250
How To Reproduce
1.) Load dll
2.) Save module
Expected Behavior
Saves the module
Actual Behavior
Saving 0 bytes
Additional Context
DnSpyEx handels crossgened windows dll just fine.
Steps needed to overcome the linux burden:
Use "crossgen2.exe --compile-no-methods --targetos:windows" to strip native code and convert it to windows PE.
2.) Load dll into DnSpyEx (It still handels it as a mixed module maybe oneother bug?)
3.) Modify dll as needed (or not)
4.) Save module (because it is a windows PE now DnSpyEx able to save it.)
5.) Use "crossgen2.exe --compile-no-methods --targetos:linux" to convert it back to linux PE
The text was updated successfully, but these errors were encountered:
Hi, could you provide a .exe/.dll file using which I can reproduce the issue easily? It would make diagnosing and fixing this bug much easier :p. If you would rather send it to me directly rather than upload it to GitHub, please email me elektrokilldev@protonmail.com
Hi, this issue is not caused by dnSpy. It occurs in dnlib which is the metadata reading and writing library dnSpy uses. Please report the issue over at https://github.com/0xd4d/dnlib. The code required to reproduce it using dnlib is the following:
varmod= ModuleDefMD.Load("input.dll");
mod.NativeWrite("output.dll");// crashes here
dnSpyEx version
6.4.1
Describe the Bug
DnSpyEx loads the mixed linux module (R2R crossgened) just fine.
But by saving (without any modification) generates exception:
How To Reproduce
1.) Load dll
2.) Save module
Expected Behavior
Saves the module
Actual Behavior
Saving 0 bytes
Additional Context
DnSpyEx handels crossgened windows dll just fine.
Steps needed to overcome the linux burden:
2.) Load dll into DnSpyEx (It still handels it as a mixed module maybe oneother bug?)
3.) Modify dll as needed (or not)
4.) Save module (because it is a windows PE now DnSpyEx able to save it.)
5.) Use "crossgen2.exe --compile-no-methods --targetos:linux" to convert it back to linux PE
The text was updated successfully, but these errors were encountered: