Hi Thomas,

Is it possible that the value of the second argument depends on whether
SJLJ or SEH handling is used?

FWIW, we (a team trying to prepare a MinGW toolchain for R) were bumping
into longjmp crashes using a 64bit version of the toolchain with SJLJ
exceptions; however, we don't encounter such crashes when using an SEH
version of the toolchain.

It would be excellent to have a minimal, reproducible example that
exercises the longjmp crash -- while I was able to get a reproducible
example, it was not quite minimal. However, the 'parameters' that lead to a
crash on longjmp in C++ code seemed to be:

    1) Having 'stuff' on the stack,
    2) Calling a C++ function that throws an exception,
    3) Catching said exception,
    4) Attempting to longjmp after catching said exception.

Of course, one should not normally mix SJLJ with C++ exceptions. However,
in our case, we have C++ code that interfaces with a C library (the R
runtime); the goal is to ensure that C library can safely longjmp (ie, it's
done at the top level, with no C++ destructors on the stack).

It sounds like you had a reproducible case when using only C code; is that
correct?

Kevin

On Tue, Sep 29, 2015 at 12:57 AM, Thomas Bickel <[email protected]> wrote:

>
>  > Did `setjmp` macro take two parameters?
>  >
>  > ------------------
>  > lh_mouse
>  > 2015-09-29
>
>
> This is about the undocumented second argument to setjump.
>
> see:
> http://sourceforge.net/p/mingw-w64/mailman/message/34450916/
>
> http://sourceforge.net/p/mingw-w64/mingw-w64/ci/master/tree/mingw-w64-headers/crt/setjmp.h#l180
>
>
>
> ------------------------------------------------------------------------------
> _______________________________________________
> Mingw-w64-public mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/mingw-w64-public
>
------------------------------------------------------------------------------
_______________________________________________
Mingw-w64-public mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mingw-w64-public

Reply via email to