RE: BUG #16920: Can't compile PostGIS with MingW64 against PostgreSQL 14 head

Regina Obe <lr@pcorp.us>

From: "Regina Obe" <lr@pcorp.us>
To: "'Tom Lane'" <tgl@sss.pgh.pa.us>
Cc: 'Juan José Santamaría Flecha' <juanjo.santamaria@gmail.com>, "'PostgreSQL mailing lists'" <pgsql-bugs@lists.postgresql.org>
Date: 2021-03-12T20:52:33Z
Lists: pgsql-bugs
> Counting the number of actual core dumps might provide some useful data
> about whether things are better or worse.
> 
> 			regards, tom lane

Yah forgot about that.

Okay the first core dump happens in the 

Copyselect test:

-- this statement
copy (select t into temp test3 from test1 where id=3) to stdout;

The backtrace of that looks like this:

#0  0x00007ffe76032136 in ntdll!RtlRaiseStatus ()
   from C:\WINDOWS\SYSTEM32\ntdll.dll
#1  0x00007ffe75f60bb3 in ntdll!RtlUnwindEx ()
   from C:\WINDOWS\SYSTEM32\ntdll.dll
#2  0x00007ffe74002eed in msvcrt!_setjmpex ()
   from C:\WINDOWS\System32\msvcrt.dll
#3  0x00000000008da31a in pg_re_throw () at elog.c:1776
#4  0x00000000008da19d in errfinish (filename=<optimized out>,
    filename@entry=0xa291a0 <BinarySignature+24> "copyto.c",
    lineno=lineno@entry=490,
    funcname=funcname@entry=0xa29980 <__func__.112127> "BeginCopyTo")
    at elog.c:589
#5  0x0000000000577f08 in BeginCopyTo (pstate=pstate@entry=0x7969920,
    rel=rel@entry=0x0, raw_query=raw_query@entry=0x7969a38,
    queryRelId=queryRelId@entry=0, filename=0x0, is_program=false,
    attnamelist=0x0, options=0x0) at copyto.c:488
#6  0x00000000005712f8 in DoCopy (pstate=0x7969920, stmt=0x79e13f8,
    stmt_location=0, stmt_len=63, processed=0x509ef38) at copy.c:306
#7  0x00000000007a4363 in standard_ProcessUtility (pstmt=0x79e14e0,
    queryString=0x79e0950 "copy (select t into temp test3 from test1 where
id=3) to stdout;", context=PROCESS_UTILITY_TOPLEVEL, params=0x0,
queryEnv=0x0,
    dest=0x79e17c0, qc=0x509f2d0) at utility.c:724
#8  0x00000000007a15e8 in PortalRunUtility (portal=0x79a84d0,
    pstmt=0x79e14e0, isTopLevel=<optimized out>,
    setHoldSnapshot=<optimized out>, dest=0x79e17c0, qc=0x509f2d0)
    at pquery.c:1159
#9  0x00000000007a213a in PortalRunMulti (portal=0x79a84d0,
    portal@entry=0x7fffffff, isTopLevel=true, isTopLevel@entry=false,
    setHoldSnapshot=setHoldSnapshot@entry=false, dest=dest@entry=0x79e17c0,
    altdest=0x79e17c0, altdest@entry=0x509f2d0, qc=0x509f2d0,
    qc@entry=0x935b00 <getopt_long>) at pquery.c:1305
#10 0x00000000007a2feb in PortalRun (portal=0x7fffffff,
    portal@entry=0x79a84d0, count=0, count@entry=2147483647,
    isTopLevel=isTopLevel@entry=true, run_once=run_once@entry=true,
    dest=dest@entry=0x79e17c0, altdest=altdest@entry=0x79e17c0,
    qc=qc@entry=0x509f2d0) at pquery.c:779
#11 0x000000000079e72b in exec_simple_query (
    query_string=0x79e0950 "copy (select t into temp test3 from test1 where
id=3) to stdout;") at postgres.c:1173
#12 0x000000000079fec0 in PostgresMain (argc=argc@entry=1,
    argv=argv@entry=0x509f980, dbname=<optimized out>,
    username=<optimized out>) at postgres.c:4327
#13 0x0000000000708858 in BackendRun (port=0x509f7c0, port=0x509f7c0)
    at postmaster.c:4464
#14 SubPostmasterMain (argc=argc@entry=3, argv=argv@entry=0x1f6ae0)
    at postmaster.c:4977
#15 0x000000000093db93 in main (argc=3, argv=0x1f6ae0) at main.c:186

I'll go thru the other tests to see which ones are crashes and provide a bt
of those too if you find it useful.
Anyway at a glance they all seem to be on tests designed to throw an error.

Thanks,
Regina






Commits

  1. Work around issues in MinGW-64's setjmp/longjmp support.