Skip to content

Match the response-file C fixture CRT to the dynamic MSVC link mode #693

Closed

Description

@LunaStev

Reproduced failure

On master 2b325483, the native MSVC acceptance gate fails only response-lld on both architectures:

Both msvc-native-*-evidence artifacts contain result.json with one failure, response-lld, and 197 recorded commands. commands.json shows duplicate symbols from static libucrt.lib and dynamic ucrt.lib, including _invalid_parameter_noinfo, _wctype, and __pctype_func. The separate response-msvc scenario passes.

Cause and independent check

Audit.response compiles empty.c using clang-cl /nologo /c without selecting a CRT, copies that object 64 times, then links it through Wave's dynamic CRT mode. The object requests the default static CRT: llvm-readobj --coff-directives empty.obj in a native x64 VM reports /DEFAULTLIB:libcmt.lib /DEFAULTLIB:oldnames.lib.

In a separate VM-only diagnostic at the same source revision, adding /MD only to that C fixture compilation makes both response-file scenarios pass, including execution and the failed-link output-preservation checks. No repository patch was applied for that experiment. ARM64 evidence here comes from CI; the local experiment was x64 only.

Acceptance

Difficulty: easy; correct the fixture contract, without weakening linker validation.

  • Explicitly match the C fixture CRT to the Wave link mode.
  • Keep all 64 distinct Unicode/space-containing object paths and the response-file argument-length coverage.
  • Keep both lld-link and MSVC link.exe execution, negative-link diagnostics, and preservation of the previous output.
  • Extend the existing focused response-fixture unit test to check the CRT choice; update its positional assumptions if arguments change.
  • Run python -m unittest tools.test_check_msvc_native, then let the existing native x64 and ARM64 CI gates validate the real link/runtime behavior.
  • Do not use /FORCE:MULTIPLE, suppress default libraries globally, or remove the failing scenario.

Follow-up to #620; this is a test-fixture CRT mismatch, not evidence that Unicode response paths are broken.

Activity

  1. added
    bug
    build
    good first issue
    ci
    on Sep 23, 2026
  2. self-assigned this
    on Sep 23, 2026
  3. added a commit that references this issue on Sep 23, 2026
    509a1e4
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

bugbuildcigood first issue

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions