https://bugs.winehq.org/show_bug.cgi?id=57545
Bug ID: 57545 Summary: EdbMails crashes on start with assertion failure on "index < meta->heap_strings.size" Product: Wine Version: 10.0-rc2 Hardware: x86 OS: Linux Status: NEW Severity: normal Priority: P2 Component: -unknown Assignee: wine-bugs@winehq.org Reporter: alexhenrie24@gmail.com Distribution: ---
Steps to reproduce:
1. Run `wine EdbMailsSetup.exe`
2. Run `wine 'C:\Program Files (x86)\EdbMails\edbmails.exe'`
The program does not start. The following errors are printed to the terminal:
02e8:fixme:ntdll:NtQuerySystemInformation info_class SYSTEM_PERFORMANCE_INFORMATION Unknown heap type: #Schema
* Assertion at /var/hostdir/mono/mono/metadata/metadata.c:1154, condition `index < meta->heap_strings.size' not met, function:mono_metadata_string_heap, index = 0x4a990000 size = 0x00000001 meta=C:\Program Files (x86)\EdbMails\edbmails.exe
$ sha256sum EdbMailsSetup.exe 78a42bf203d626080b7033dce2375cf7871259720528b7260f5dac52eab606d7
https://bugs.winehq.org/show_bug.cgi?id=57545
Alex Henrie alexhenrie24@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- URL| |https://www.edbmails.com/se | |tup/EdbMailsSetup.exe Keywords| |download
https://bugs.winehq.org/show_bug.cgi?id=57545
Esme Povirk madewokherd@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Component|-unknown |mscoree CC| |madewokherd@gmail.com
https://bugs.winehq.org/show_bug.cgi?id=57545
--- Comment #1 from Esme Povirk madewokherd@gmail.com --- It appears to be obfuscated by something called ConfuserEx, which (oddly for an obfuscator) is open-source and indicates this with a module attribute.
https://bugs.winehq.org/show_bug.cgi?id=57545
--- Comment #2 from Esme Povirk madewokherd@gmail.com --- The image seems to have multiple "#Strings" heaps, with the first one having a reasonable size, and the second being empty. Mono uses the second one.
After fixing that, it still fails because the index is wrong.
https://bugs.winehq.org/show_bug.cgi?id=57545
--- Comment #3 from Esme Povirk madewokherd@gmail.com --- The failure happens in mono_image_load_names when reading the Assembly table. According to ILSpy, 4aaf is the blob heap offset of the public key, not the name, so not sure why Mono got that wrong.
https://bugs.winehq.org/show_bug.cgi?id=57545
--- Comment #4 from Esme Povirk madewokherd@gmail.com --- ILSpy has the explanation: Apparently there's an undocumented flag that adds an extra 4 bytes to the header of the metadata table stream (#~).
https://bugs.winehq.org/show_bug.cgi?id=57545
--- Comment #5 from Esme Povirk madewokherd@gmail.com --- Oops, I've been using dnSpy, not ILSpy, sorry for the confusion.
https://bugs.winehq.org/show_bug.cgi?id=57545
--- Comment #6 from Esme Povirk madewokherd@gmail.com --- With those errors fixed, it fails with [ERROR] FATAL UNHANDLED EXCEPTION: System.BadImageFormatException: Invalid method header format 0
https://bugs.winehq.org/show_bug.cgi?id=57545
--- Comment #7 from Esme Povirk madewokherd@gmail.com --- Made an MR for the problems so far: https://gitlab.winehq.org/mono/mono/-/merge_requests/97
https://bugs.winehq.org/show_bug.cgi?id=57545
--- Comment #8 from Esme Povirk madewokherd@gmail.com --- As for the invalid method header format: what's most likely supposed to happen is that some method is supposed to decode that method in memory before the runtime reads it. Mono is probably doing something in the wrong order.
<Module>.cctor is called first and runs to completion. Afterwards, at least one method is called that dnSpy isn't able to display, indicating that it decoded successfully. That method never returns, though.
Some of what methods Mono is compiling and why may reveal something, but this kind of investigation is time-consuming, so I'm going to set it aside for now to triage other bugs in my queue.
https://bugs.winehq.org/show_bug.cgi?id=57545
--- Comment #9 from Alex Henrie alexhenrie24@gmail.com --- Thanks for taking a look!