Re: gai_strerror() is not thread-safe on Windows
vignesh C <vignesh21@gmail.com>
From: vignesh C <vignesh21@gmail.com>
To: Thomas Munro <thomas.munro@gmail.com>
Cc: pgsql-hackers <pgsql-hackers@postgresql.org>
Date: 2024-01-26T02:55:29Z
Lists: pgsql-hackers
On Tue, 5 Dec 2023 at 00:57, Thomas Munro <thomas.munro@gmail.com> wrote: > > On second thoughts, I guess it would make more sense to use the exact > messages Windows' own implementation would return instead of whatever > we had in the past (probably cribbed from some other OS or just made > up?). I asked CI to spit those out[1]. Updated patch attached. Will > add to CF. CFBot shows that the patch does not apply anymore as in [1]: === Applying patches on top of PostgreSQL commit ID 376c216138c75e161d39767650ea30536f23b482 === === applying patch ./v2-0001-Fix-gai_strerror-thread-safety-on-Windows.patch patching file configure Hunk #1 succeeded at 16388 (offset 34 lines). patching file configure.ac Hunk #1 succeeded at 1885 (offset 7 lines). patching file src/include/port/win32/sys/socket.h patching file src/port/meson.build patching file src/port/win32gai_strerror.c can't find file to patch at input line 134 Perhaps you used the wrong -p or --strip option? The text leading up to this was: -------------------------- |diff --git a/src/tools/msvc/Mkvcbuild.pm b/src/tools/msvc/Mkvcbuild.pm |index 46df01cc8d..c51296bdb6 100644 |--- a/src/tools/msvc/Mkvcbuild.pm |+++ b/src/tools/msvc/Mkvcbuild.pm -------------------------- No file to patch. Skipping patch. 1 out of 1 hunk ignored Please have a look and post an updated version. [1] - http://cfbot.cputube.org/patch_46_4682.log Regards, Vignesh
Commits
-
Fix gai_strerror() thread-safety on Windows.
- 0460e4ecc0fa 16.3 landed
- 65f438471b76 17.0 landed
-
Update comment, generation mem contexts have a "keeper" block
- 376c216138c7 17.0 cited
-
Remove replacement code for getaddrinfo.
- 5579388d2dda 16.0 cited