Open FickoDeLux opened 9 months ago
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
Thanks in advance!
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:
var mod = ModuleDefMD.Load("input.dll");
mod.NativeWrite("output.dll"); // crashes here
I did https://github.com/0xd4d/dnlib/issues/533 Thank You
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: 1) 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