ecpg assertion on windows

From: Andres Freund <andres(at)anarazel(dot)de>
To: pgsql-hackers(at)postgresql(dot)org, Michael Meskes <meskes(at)postgresql(dot)org>
Subject: ecpg assertion on windows
Date: 2022-08-24 03:36:55
Message-ID: 20220824033655.keezt22p2ttsegm6@awork3.anarazel.de
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi,

I occasionally

Running the ecpg regression tests interactively (to try to find a different
issue), triggered a crash on windows due to an uninitialized variable (after
pressing "ignore" in that stupid gui window that we've only disabled for the
backend).

"The variable 'replace_val' is being used without being initialized."

Child-SP RetAddr Call Site
000000b3`3bcfe140 00007ff9`03f9cd74 libpgtypes!failwithmessage(
void * retaddr = 0x00007ff9`03f96133,
int crttype = 0n1,
int errnum = 0n3,
char * msg = 0x000000b3`3bcff050 "The variable 'replace_val' is being used without being initialized.")+0x234 [d:\a01\_work\12\s\src\vctools\crt\vcstartup\src\rtc\error.cpp @ 213]
000000b3`3bcff030 00007ff9`03f96133 libpgtypes!_RTC_UninitUse(
char * varname = 0x00007ff9`03fa8a90 "replace_val")+0xa4 [d:\a01\_work\12\s\src\vctools\crt\vcstartup\src\rtc\error.cpp @ 362]
000000b3`3bcff470 00007ff9`03f94acd libpgtypes!dttofmtasc_replace(
int64 * ts = 0x000000b3`3bcff778,
long dDate = 0n0,
int dow = 0n6,
struct tm * tm = 0x000000b3`3bcff598,
char * output = 0x0000026e`9c223de0 "abc-00:00:00",
int * pstr_len = 0x000000b3`3bcff620,
char * fmtstr = 0x00007ff7`b01ae5c0 "abc-%X-def-%x-ghi%%")+0xe53 [C:\dev\postgres-meson\src\interfaces\ecpg\pgtypeslib\timestamp.c @ 759]
*** WARNING: Unable to verify checksum for C:\dev\postgres-meson\build-msbuild\src\interfaces\ecpg\test\pgtypeslib\dt_test.exe
000000b3`3bcff550 00007ff7`b01a23c9 libpgtypes!PGTYPEStimestamp_fmt_asc(
int64 * ts = 0x000000b3`3bcff778,
char * output = 0x0000026e`9c223de0 "abc-00:00:00",
int str_len = 0n19,
char * fmtstr = 0x00007ff7`b01ae5c0 "abc-%X-def-%x-ghi%%")+0xed [C:\dev\postgres-meson\src\interfaces\ecpg\pgtypeslib\timestamp.c @ 794]
000000b3`3bcff610 00007ff7`b01a4499 dt_test!main(void)+0xe59 [C:\dev\postgres-meson\src\interfaces\ecpg\test\pgtypeslib\dt_test.pgc @ 200]
000000b3`3bcff860 00007ff7`b01a433e dt_test!invoke_main(void)+0x39 [d:\a01\_work\12\s\src\vctools\crt\vcstartup\src\startup\exe_common.inl @ 79]
000000b3`3bcff8b0 00007ff7`b01a41fe dt_test!__scrt_common_main_seh(void)+0x12e [d:\a01\_work\12\s\src\vctools\crt\vcstartup\src\startup\exe_common.inl @ 288]
000000b3`3bcff920 00007ff7`b01a452e dt_test!__scrt_common_main(void)+0xe [d:\a01\_work\12\s\src\vctools\crt\vcstartup\src\startup\exe_common.inl @ 331]
000000b3`3bcff950 00007ff9`1d987034 dt_test!mainCRTStartup(
void * __formal = 0x000000b3`3bbe8000)+0xe [d:\a01\_work\12\s\src\vctools\crt\vcstartup\src\startup\exe_main.cpp @ 17]
000000b3`3bcff980 00007ff9`1f842651 KERNEL32!BaseThreadInitThunk+0x14
000000b3`3bcff9b0 00000000`00000000 ntdll!RtlUserThreadStart+0x21

I haven't analyzed this further.

CI also shows ecpg itself occasionally crashing, but I haven't managed to
catch it in the act.

Greetings,

Andres Freund

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Andres Freund 2022-08-24 04:01:18 Re: ecpg assertion on windows
Previous Message Amit Langote 2022-08-24 02:55:37 Re: SQL/JSON features for v15