https://bugs.winehq.org/show_bug.cgi?id=43871
Bug ID: 43871 Summary: Programs compiled with winegcc SEGFAULT if using __atribute__((constructor)) gcc extension Product: Wine Version: 2.18 Hardware: x86-64 OS: Linux Status: UNCONFIRMED Severity: normal Priority: P2 Component: tools Assignee: wine-bugs@winehq.org Reporter: lorenzofer@live.it Distribution: ---
Created attachment 59472 --> https://bugs.winehq.org/attachment.cgi?id=59472 minimal repro
Hi
When I try to compile an executable with winegcc, and the executable is using __atribute__((constructor)) extension, the resulting executable SEGFAULT.
I attach a minimal code that is causing my issue (derived from the original code that was giving the issue).
The wine stdout/stderr: fixme:winediag:start_process Wine Staging 2.18 is a testing version containing experimental patches. fixme:winediag:start_process Please mention your exact version when filing bug reports on winehq.org. zsh: segmentation fault (core dumped) ./main.exe
The executable was compiled with winegcc main.c -o main.exe -lws2_32
Thanks for the help
https://bugs.winehq.org/show_bug.cgi?id=43871
Lorenzo Ferrillo lorenzofer@live.it changed:
What |Removed |Added ---------------------------------------------------------------------------- Summary|Programs compiled with |Programs compiled with |winegcc SEGFAULT if using |winegcc SEGFAULT if using |__atribute__((constructor)) |__attribute__((constructor) |gcc extension |) gcc extension
https://bugs.winehq.org/show_bug.cgi?id=43871
--- Comment #1 from Lorenzo Ferrillo lorenzofer@live.it --- Created attachment 59473 --> https://bugs.winehq.org/attachment.cgi?id=59473 minimal repro 2
Another small piece of code that cause this ill beheviour.
Note that in this case the SEGFAULT happen only when compiling with -mno-cygwin flag. If not compiling using -mno-cygwin flag the program works.
https://bugs.winehq.org/show_bug.cgi?id=43871
Lorenzo Ferrillo lorenzofer@live.it changed:
What |Removed |Added ---------------------------------------------------------------------------- Summary|Programs compiled with |Some Programs compiled with |winegcc SEGFAULT if using |winegcc SEGFAULT if using |__attribute__((constructor) |__attribute__((constructor) |) gcc extension |) gcc extension