On Tue, 22 Feb 2022 at 11:35, Simon Josefsson <si...@josefsson.org> wrote: > > This issue should trigger only with MSVC family of compilers. Do > > you test MinGW-w64 builds? > > Yes, that is the intention at least: > > https://gitlab.com/libidn/libidn/-/jobs/2114691787 > > Why does it happens only on MSVC? If I understood correctly, 'long' is > 32 bit on Win64, and should be with MSVC as well. >
Yes, correct. I also see that it should be the same in MinGW-W64[1]. I am not sure why you don't observe similar issues on your CI, but the cast on[2] may certainly be problematic since it's casting a 64 bit pointer (gssize_t -> ssize_t -> 64 bit on Win64 as defined here[3]) to a 32 bit one. > How did you build libidn using MSVC? The windows/ project files? > Yes, windows/ project files, but I had to upgrade them to work on x64. Regards, Francesco [1] https://sourceforge.net/p/mingw-w64/support-requests/166/#423b [2] https://git.savannah.gnu.org/cgit/libidn.git/tree/lib/nfkc.c#n1019 [3] https://git.savannah.gnu.org/cgit/libidn.git/tree/windows/include/ac-stdint.h#n45