Francesco Pretto <cez...@gmail.com> writes: > 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.
Hi again. I was finally able to reproduce this using GitLab's shared Windows runner. I have committed the patch in your name, I believe the patch can be considered tiny for copyright purposes so we don't need to collect a copyright assignment. Thanks for your patience here. https://gitlab.com/libidn/libidn/-/commit/93c5b05fa86b5a815cf345a48cb091f96c423b4e Interestingly libidn build fine with MSYS that uses cygwin as libc, which may explain why our existing MinGW builds in CI/CD works fine. When using Microsoft ucrt libc, the tst_stringprep FAILs due to 201 (MALLOC) error. When using the old msvcrt libc, more tests fails. Similar errors that you reported earlier. Looks like this code was always broken on LLP64 platforms, although I can't fully explain why we have had so many succesful Windows builds that didn't hit this bug before. LLP64 isn't dependent on libc, unless I'm missing something. For references the error messages I got was: MSVCRT https://gitlab.com/jas/libidn/-/jobs/5922462369 FAIL: tst_stringprep ==================== stringprep() entry 0 failed: 201 stringprep() entry 1 failed: 201 stringprep() entry 2 failed: 201 ... stringprep() entry 72 failed: 201 stringprep() entry 73 failed: 201 FAIL tst_stringprep.exe (exit status: 1) UCRT64 https://gitlab.com/jas/libidn/-/jobs/5922462354 FAIL: tst_stringprep ==================== stringprep() entry 0 failed: 201 stringprep() entry 1 failed: 201 stringprep() entry 2 failed: 201 ... stringprep() entry 72 failed: 201 stringprep() entry 73 failed: 201 FAIL tst_stringprep.exe (exit status: 1) FAIL: tst_idna ============== IDNA entry 0 failed: 1 IDNA entry 1 failed: 1 ... IDNA entry 20 failed: 1 IDNA entry 21 failed: 1 FAIL tst_idna.exe (exit status: 1) FAIL: tst_idna2 =============== IDNA2 entry 0 failed: 1 IDNA2 entry 1 failed: 1 ... IDNA2 entry 96 failed: 1 IDNA2 entry 97 failed: 1 FAIL tst_idna2.exe (exit status: 1) FAIL: tst_idna3 =============== IDNA3[0] failed IDNA3[1] failed IDNA3[2] failed FAIL tst_idna3.exe (exit status: 1) /Simon
signature.asc
Description: PGP signature