http://bugzilla.opensuse.org/show_bug.cgi?id=1166141
http://bugzilla.opensuse.org/show_bug.cgi?id=1166141#c3
--- Comment #3 from Ralf Habacker ---
(In reply to Ismail Dönmez from comment #2)
This is a wine bug, it doesn't crash here:
wine ./test.exe
constructor
*00403004 -> 004027a4
*00403008 -> ffffffff
Compared with the time where this bug was reported, something has been changed
in the .dtors section, where destructers are collected.
This test code
#include
__attribute__((constructor))
static void constructor()
{
fprintf(stderr, "constructor\n");
int *p = (int *)0x403004;
fprintf(stderr, "*%p -> %08x\n", p, *p);
fprintf(stderr, "*%p -> %08x\n", p+1, *(p+1));
}
__attribute__((destructor))
static void destructor() {
fprintf(stderr, "destructor\n");
}
int main()
{
fprintf(stderr, "main\n");
return 0;
}
now do not crash and prints
main
destructor
where 004027a4 points to
004027a4 <.dtors>:
4027a4: d7 xlat %ds:(%ebx)
4027a5: 15 40 00 00 00 adc $0x40,%eax
which is exactly the destructor function
004015d7 <_destructor>:
4015d7: 55 push %ebp
4015d8: 89 e5 mov %esp,%ebp
4015da: 83 ec 18 sub $0x18,%esp
checked with wine version 4.1
I'm going to check on some other platform, where I had the issue too.
BTW: I reported that with wine because it is the easist way to reproduce.
Initial I recognized that issue by running umbrello cross builds on native
Windows.
--
You are receiving this mail because:
You are on the CC list for the bug.