title: setjmp/longjmp in x86_64-w64-mingw32
body: <p>A while ago setjmp/longjmp in mingw-w64 was known to be broken (<a href="http://www.agardner.me/golang/windows/cgo/64-bit/setjmp/longjmp/2016/02/29/go-windows-setjmp-x86.html" rel="nofollow noreferrer">http://www.agardner.me/golang/windows/cgo/64-bit/setjmp/longjmp/2016/02/29/go-windows-setjmp-x86.html</a>).</p>
  
  <p>We have a legacy code that we used to run on 32 bit Linux and 32 bit Windows, which (still) works fine. 64-bit Linux version also works fine, but 64 bit Windows version breaks down after first longjmp back to setjmp location. </p>
  
  <p>I get segfault somewhere in msvcrt!_setjmpex,msvcrt!RtlUnwindEx.</p>
  
  <p>I have looked into code and initially I can't notice any violations of rules defined for setjmp/longjmp by C (99/11) standards in our code. The workaround described above ("use gcc builtins") also does not work for me.</p>
  
  <p>I have trouble creating minimal reproducible example. Example works. Full code not. Of course I can start removing functionality from full source code, but that is not a simple task.</p>
  
  <p>So, the question here is basically, is setjmp/longjmp in mingw-w64 known to (still) be broken?</p>