Skip to content

[TEST] --partial-loads-ok=no, VS2019/2022 miscompile, autotools ldflags - #23347

Closed
vszakats wants to merge 41 commits into
curl:masterfrom
vszakats:testmix
Closed

vszakats wants to merge 41 commits into
curl:masterfrom
vszakats:testmix

Conversation

@vszakats

Copy link
Copy Markdown
Member

No description provided.

@github-actions github-actions Bot added cmdline tool tests CI Continuous Integration labels Oct 10, 2026
@testclutch

This comment was marked as off-topic.

@vszakats
vszakats marked this pull request as draft October 10, 2026 23:46
Seen in VS2019 Release x64 build in AppVeyor CI.

- CM VS2019, Debug  , x64, OpenSSL 3.0 + Schannel, Shared, !verbose, Build-tests: PASS
- CM VS2019, Release, x64, OpenSSL 3.0 + Schannel, Shared, !verbose, Build-tests: FAIL test1664
- CM VS2019, Release, x86, OpenSSL 3.0 + Schannel, Shared, !verbose, Build-tests: PASS

Visual Studio Community 2019 v16.11.50
```
-- Building for: Visual Studio 16 2019
-- Using CMake version 4.1.0
-- Selecting Windows SDK version 10.0.26100.0 to target Windows 10.0.17763.
-- The C compiler identification is MSVC 19.29.30159.0
-- Check for working C compiler: C:/Program Files (x86)/Microsoft Visual Studio/2019/Community/VC/Tools/MSVC/14.29.30133/bin/Hostx64/x64/cl.exe - skipped
-- CMake platform flags: WIN32 MSVC-1929
[...]
-- Found _WIN32_WINNT=0x0a00
-- Picky compiler options: -W4 -Wall -wd4061 -wd4191 -wd4255 -wd4464 -wd4548 -wd4574 -wd4668 -wd4710 -wd4711 -wd4746 -wd4820 -wd5045
[...]
test 1664 [unit tests for strparse.c string parsing functions]

   1664: stdout FAILED:
  --- log/check-expected    2026-10-09 08:50:52.895380000 +0000
  +++ log/check-generated   2026-10-09 08:50:52.895380000 +0000
  @@ -154,9 +154,9 @@
   3: (%62) 6, line 0[LF]
   4: (%5c) 6, line 0[LF]
   5: (%20) 6, line 0[LF]
  -6: (%0a) 0, line 1[LF]
  -7: (%0d) 0, line 1[LF]
  -8: (%0d) 0, line 1[LF]
  +6: (%00) 0, line 1[LF]
  +7: (%00) 0, line 1[LF]
  +8: (%0a) 0, line 1[LF]
   9: (%0c) 6, line 0[LF]
   10: (%00) 6, line 0[LF]
   curlx_str_hex[LF]
```
Ref: https://ci.appveyor.com/project/curlorg/curl/builds/54864988/job/m823tifoodo7tt1a

Does not reproduce in this isolated example:
https://godbolt.org/z/n5jYPKWsM

Bug: curl#23306 (comment)
Bug: curl#23306 (comment)
Bug: curl#23306 (comment)
Cherry-picked from curl#23306
vszakats added a commit that referenced this pull request Oct 11, 2026
It affects `_MSC_VER >= 1923 && _MSC_VER <= 1934`, combined with `-O1`
or `-O2`, and inlining reduced via `-Ob0` or `-Ob1` (CMake
RelWithDebInfo config). Also with `-O2 -Ob2` (CMake Release config), in
curl `units.exe` context.

Introduced in: Visual Studio 2019 v16.3 (~2019-09-23)
Fixed in: Visual Studio 2022 v17.5 (~2023-02-21)

Godbolt reproducer: https://godbolt.org/z/T78GWxzeT

As seen in AppVeyor CI:
- CM VS2019, Debug  , x64, OpenSSL 3.0 + Schannel, Shared, !verbose, Build-tests: PASS
- CM VS2019, Release, x64, OpenSSL 3.0 + Schannel, Shared, !verbose, Build-tests: FAIL test1664
- CM VS2019, Release, x86, OpenSSL 3.0 + Schannel, Shared, !verbose, Build-tests: PASS
- VS2017/VS2022, Debug/Release: PASS

Fixing:
```
# Visual Studio Community 2019 v16.11.50
-- Building for: Visual Studio 16 2019
-- Using CMake version 4.1.0
-- Selecting Windows SDK version 10.0.26100.0 to target Windows 10.0.17763.
-- The C compiler identification is MSVC 19.29.30159.0
-- Check for working C compiler: C:/Program Files (x86)/Microsoft Visual Studio/2019/Community/VC/Tools/MSVC/14.29.30133/bin/Hostx64/x64/cl.exe - skipped
-- CMake platform flags: WIN32 MSVC-1929
[...]
-- Found _WIN32_WINNT=0x0a00
-- Picky compiler options: -W4 -Wall -wd4061 -wd4191 -wd4255 -wd4464 -wd4548 -wd4574 -wd4668 -wd4710 -wd4711 -wd4746 -wd4820 -wd5045
[...]
test 1664 [unit tests for strparse.c string parsing functions]

   1664: stdout FAILED:
  --- log/check-expected
  +++ log/check-generated
  @@ -154,9 +154,9 @@
   3: (%62) 6, line 0[LF]
   4: (%5c) 6, line 0[LF]
   5: (%20) 6, line 0[LF]
  -6: (%0a) 0, line 1[LF]
  -7: (%0d) 0, line 1[LF]
  -8: (%0d) 0, line 1[LF]
  +6: (%00) 0, line 1[LF]
  +7: (%00) 0, line 1[LF]
  +8: (%0a) 0, line 1[LF]
   9: (%0c) 6, line 0[LF]
   10: (%00) 6, line 0[LF]
   curlx_str_hex[LF]
[...]
TESTFAIL: These test cases failed: 1664
```
Ref: https://ci.appveyor.com/project/curlorg/curl/builds/54864988/job/m823tifoodo7tt1a

Bug: #23306 (comment)
Bug: #23306 (comment)
Bug: #23306 (comment)
Ref: #23347 (seeking a minimal reproducer)
Cherry-picked from #23306

Closes #23337
@vszakats vszakats closed this Oct 11, 2026
@vszakats
vszakats deleted the testmix branch October 11, 2026 17:46
@vszakats vszakats changed the title [TEST] --partial-loads-ok=no, VS2019 miscompile, autotools ldflags [TEST] --partial-loads-ok=no, VS2019/2022 miscompile, autotools ldflags Oct 11, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CI Continuous Integration cmdline tool tests

Development

Successfully merging this pull request may close these issues.

2 participants