Investigate ARM64EC runtime test failures
Nobody has claimed this yet.
- Dominant language
- C++
- Stars
- 11.1k
- Forks
- 1.7k
- Avg merge
- 4d 15h
- Merged PRs (30d)
- 22
Description
#5831 enables ARM64EC runtime test coverage; this is a followup issue for a workaround that I had to introduce.
Baffling lld-link Mysteries
I don't understand why:
- We're seeing these errors only for ARM64-hosted ARM64EC-targeting builds. The x64-hosted ARM64EC-targeting builds have been fine.
- Why Clang is using lld-link here, when it seems to prefer link.exe in other contexts.
- Why lld-link is emitting these errors.
All of these errors went away when I updated the test harness to compile with -fuse-ld=link and link with /machine:arm64ec.
lld-link: error: undefined symbol: __sanitizer_annotate_contiguous_container
~1544 occurrences.
name: std.tests/P2286R8_text_formatting_tuple
output: Build setup steps:
Build steps:
Build step failed unexpectedly.
Command: "C:\Program Files\Microsoft Visual Studio\18\Insiders\VC\Tools\Llvm\ARM64\bin\clang-cl.EXE" "C:\a\_work\1\s\tests\std\tests\P2286R8_text_formatting_tuple\test.cpp" "-IC:\stlBuild\out\inc" "-IC:\a\_work\1\s\llvm-project\libcxx\test\support" "-IC:\a\_work\1\s\tests\std\include" "/nologo" "/Od" "/W4" "/w14061" "/w14242" "/w14265" "/w14582" "/w14583" "/w14587" "/w14588" "/w14749" "/w14841" "/w14842" "/w15038" "/w15214" "/w15215" "/w15216" "/w15217" "/w15262" "/sdl" "/WX" "/D_ENABLE_STL_INTERNAL_CHECK" "/bigobj" "/FIforce_include.hpp" "/w14365" "/w14668" "/w15267" "/D_ENFORCE_FACET_SPECIALIZATIONS=1" "/w14640" "/Zc:threadSafeInit-" "/EHsc" "/std:c++latest" "-fno-ms-compatibility" "-fno-delayed-template-parsing" "-Wno-unqualified-std-cast-call" "/permissive-" "/MTd" "/fp:strict" "--start-no-unused-arguments" "--target=arm64ec-pc-windows-msvc" "-FeC:\stlBuild\tests\std\tests\P2286R8_text_formatting_tuple\Output\28\P2286R8_text_formatting_tuple.exe" "-link" "-LIBPATH:C:\stlBuild\out\lib\arm64ec" "-LIBPATH:C:\Program Files\Microsoft Visual Studio\18\Insiders\VC\Tools\MSVC\14.50.35717\lib\arm64" "/MANIFEST:EMBED"
Exit Code: 1 (0x1)
Standard Error:
--
lld-link: error: undefined symbol: __sanitizer_annotate_contiguous_container
>>> referenced by libcpmtd.lib(locale.cpp.obj):($LN1)
>>> referenced by libcpmtd.lib(locale.cpp.obj):($LN1)
>>> referenced by libcpmtd.lib(wlocale.cpp.obj)
clang-cl: error: linker command failed with exit code 1 (use -v to see invocation)
lld-link: error: loosefpmath.obj: machine type arm64 conflicts with arm64ec
name: std.tests/GH_000935_complex_numerical_accuracy
output: Build setup steps:
Build steps:
Build step failed unexpectedly.
Command: "C:\Program Files\Microsoft Visual Studio\18\Insiders\VC\Tools\Llvm\ARM64\bin\clang-cl.EXE" "C:\a\_work\1\s\tests\std\tests\GH_000935_complex_numerical_accuracy\test.cpp" "-IC:\stlBuild\out\inc" "-IC:\a\_work\1\s\llvm-project\libcxx\test\support" "-IC:\a\_work\1\s\tests\std\include" "/nologo" "/Od" "/W4" "/w14061" "/w14242" "/w14265" "/w14582" "/w14583" "/w14587" "/w14588" "/w14749" "/w14841" "/w14842" "/w15038" "/w15214" "/w15215" "/w15216" "/w15217" "/w15262" "/sdl" "/WX" "/D_ENABLE_STL_INTERNAL_CHECK" "/bigobj" "/FIforce_include.hpp" "/w14365" "/w14668" "/w15267" "/D_ENFORCE_FACET_SPECIALIZATIONS=1" "/FIfenv_prefix.hpp" "/w14640" "/Zc:threadSafeInit-" "/EHsc" "/std:c++latest" "/fp:strict" "/DFP_CONFIG_PRESET=1" "/DTEST_FP_ROUNDING=1" "/DWITH_FP_ABRUPT_UNDERFLOW=1" "/DFP_CONTRACT_MODE=0" "/clang:-ffp-contract=off" "-fno-ms-compatibility" "-fno-delayed-template-parsing" "-Wno-unqualified-std-cast-call" "-Wno-unused-command-line-argument" "-Wno-overriding-option" "/O2" "/MT" "--target=arm64ec-pc-windows-msvc" "-FeC:\stlBuild\tests\std\tests\GH_000935_complex_numerical_accuracy\Output\034\GH_000935_complex_numerical_accuracy.exe" "-link" "-LIBPATH:C:\stlBuild\out\lib\arm64ec" "-LIBPATH:C:\Program Files\Microsoft Visual Studio\18\Insiders\VC\Tools\MSVC\14.50.35717\lib\arm64" "/MANIFEST:EMBED" "loosefpmath.obj"
Exit Code: 1 (0x1)
Standard Error:
--
lld-link: error: C:\Program Files\Microsoft Visual Studio\18\Insiders\VC\Tools\MSVC\14.50.35717\lib\arm64\loosefpmath.obj: machine type arm64 conflicts with arm64ec
clang-cl: error: linker command failed with exit code 1 (use -v to see invocation)
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with #5831 and the test-harness workaround, then reproduce the two failures in the named std.tests/P2286R8_text_formatting_tuple and GH_000935_complex_numerical_accuracy tests. Compare ARM64-hosted and x64-hosted ARM64EC commands, including lld-link versus link.exe; done means identifying the cause of both linker failures and establishing a durable test-harness fix.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp
- Domain
- build-system, compilers, testing-qa
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 30/100