Work around issues in MinGW-64's setjmp/longjmp support.
authorTom Lane <tgl@sss.pgh.pa.us>
Mon, 15 Mar 2021 16:34:17 +0000 (12:34 -0400)
committerTom Lane <tgl@sss.pgh.pa.us>
Mon, 15 Mar 2021 16:34:17 +0000 (12:34 -0400)
commit146cb3889c3ccb3fce198fe7464a1296a9e107c3
tree47c436adf7839e52a50f1535f7964ef3bbd4ee94
parenteeb60e45d82d5840b713a8741ae552238d57e8b9
Work around issues in MinGW-64's setjmp/longjmp support.

It's hard to avoid the conclusion that there is something wrong with
setjmp/longjmp on MinGW-64, as we have seen failures come and go after
entirely-unrelated-looking changes in our own code.  Other projects
such as Ruby have given up and started using gcc's setjmp/longjmp
builtins on that platform; this patch just follows that lead.

Note that this is a pretty fundamental ABI break for functions
containining either setjmp or longjmp, so we can't really consider
a back-patch.

Per reports from Regina Obe and Heath Lord, as well as recent failures
on buildfarm member walleye, and less-recent failures on fairywren.

Juan José Santamaría Flecha

Discussion: http://postgr.es/m/000401d716a0$1ed0fc70$5c72f550$@pcorp.us
Discussion: http://postgr.es/m/CA+BEBhvHhM-Bn628pf-LsjqRh3Ang7qCSBG0Ga+7KwhGqrNUPw@mail.gmail.com
Discussion: http://postgr.es/m/f1caef93-9640-022e-9211-bbe8755a56b0@2ndQuadrant.com
src/include/c.h