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.

      I can not run Wine with Valgrind because it calls modify_ldt(),
but I suspect memory corruption.

      I was wondering if it would be possible to just "link" against the
Wine library instead of having to create a stub application to run from?

Best wishes,
Miguel

<<attachment: wine-crash.png>>

Reply via email to