https://bugs.winehq.org/show_bug.cgi?id=51596
Bernhard Übelacker bernhardu@mailbox.org changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |bernhardu@mailbox.org
--- Comment #2 from Bernhard Übelacker bernhardu@mailbox.org --- Created attachment 70490 --> https://bugs.winehq.org/attachment.cgi?id=70490 Details on the debugging attempt.
I tried to debug this and think I found some details.
In function "init_builtin_dll" an array with init functions is queried and called afterwards.
Unfortunately the base address of this array is stored in register $rsi, which gets overwritten in the call to the function frame_dummy/register_tm_clones (main.exe).
I tried adding a "volatile" to the variable funcs declaration, and with that the executable did output its message without crash.
- void (**funcs)(int, char **, char **) = (void *)buffer; + void (** volatile funcs)(int, char **, char **) = (void *)buffer;
Unfortunately I can't tell if $rsi is allowed to be overwritten at that point and wineg++ has to be modified to avoid this, or if the "volatile" approach is right (and reliable).