Wine, Windows.Forms on Linux, GC and segfaults.
Marcus Meissner
marcus at jet.franken.de
Wed Dec 11 07:26:14 CST 2002
On Tue, Dec 10, 2002 at 08:41:34PM -0500, Miguel de Icaza wrote:
> Hello,
>
> With the help of Hans Boehm, I have been tracking the problems we
> have to run the Windows.Forms code with GC enabled. Turns out that the
> problem is not the Boehm code at all, it just exposes a problem that
> might be happening elsewhere.
>
> The problem is that by the time that Wine has been initialized,
> using setjmp/longjmp will always lead to a crash. The code in pthreads
> that performs the longjmp will first try to invoke the pthread cleanup
> routines, and then invoke longjmp. This never happens.
>
> In the particular case of Mono, I added a small bit of code before
> calling into Boehm's GC, and then I run my app like this:
>
> wine monostub.exe.so
>
> The code snippet is:
>
> jmp_buf buf;
>
> printf ("Here\n");
> if (setjmp (buf) == 0){
> printf ("before\n");
> longjmp (buf, 1);
> } else {
> printf ("after\n");
> }
>
> The code should display:
>
> Here
> before
> after
>
> But with Wine, I get a crash inside longjmp, after the "before" is
> printed out. I get the Wine Console with the stack trace, but I can not
> copy/paste from it, so I have included a screenshot of it.
You currently cannot use the wine libraries together with -lpthread.
WINE already overwrites and reimplements several pthread_ functions
which probably leads to internal confusion and the crash above.
Difficult to solve :/
Ciao, Marcus
More information about the wine-devel
mailing list