Skip to content

[libcxx] [test] Change an MSVC mode XFAIL into UNSUPPORTED #141609

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
May 28, 2025

Conversation

mstorsjo
Copy link
Member

The underlying bug in vcruntime [1] has been fixed in the latest version of MSVC (released two weeks ago); this will cause the test which is currently marked XFAIL to start erroring, when it starts passing unexpectedly.

This version of MSVC may soon start appearing in the Github Actions runner images used for our CI.

We could try to detect the state of this bug, but in practice, such detection code would essentially be a copy of this whole test.

Therefore, just mark this test UNSUPPORTED for the MSVC mode builds. If we at some point require new enough MSVC libraries, we could remove the marking entirely.

[1] https://developercommunity.visualstudio.com/t/vcruntime-nothrow-array-operator-new-fal/10373274

The underlying bug in vcruntime [1] has been fixed in the latest
version of MSVC (released two weeks ago); this will cause the
test which is currently marked XFAIL to start erroring, when it
starts passing unexpectedly.

This version of MSVC may soon start appearing in the Github Actions
runner images used for our CI.

We could try to detect the state of this bug, but in practice,
such detection code would essentially be a copy of this whole
test.

Therefore, just mark this test UNSUPPORTED for the MSVC mode builds.
If we at some point require new enough MSVC libraries, we could
remove the marking entirely.

[1] https://developercommunity.visualstudio.com/t/vcruntime-nothrow-array-operator-new-fal/10373274
@mstorsjo mstorsjo requested a review from a team as a code owner May 27, 2025 14:28
@llvmbot llvmbot added the libc++ libc++ C++ Standard Library. Not GNU libstdc++. Not libc++abi. label May 27, 2025
@llvmbot
Copy link
Member

llvmbot commented May 27, 2025

@llvm/pr-subscribers-libcxx

Author: Martin Storsjö (mstorsjo)

Changes

The underlying bug in vcruntime [1] has been fixed in the latest version of MSVC (released two weeks ago); this will cause the test which is currently marked XFAIL to start erroring, when it starts passing unexpectedly.

This version of MSVC may soon start appearing in the Github Actions runner images used for our CI.

We could try to detect the state of this bug, but in practice, such detection code would essentially be a copy of this whole test.

Therefore, just mark this test UNSUPPORTED for the MSVC mode builds. If we at some point require new enough MSVC libraries, we could remove the marking entirely.

[1] https://developercommunity.visualstudio.com/t/vcruntime-nothrow-array-operator-new-fal/10373274


Full diff: https://github.com/llvm/llvm-project/pull/141609.diff

1 Files Affected:

  • (modified) libcxx/test/std/language.support/support.dynamic/new.delete/new.delete.array/new.size_nothrow.replace.indirect.pass.cpp (+5-1)
diff --git a/libcxx/test/std/language.support/support.dynamic/new.delete/new.delete.array/new.size_nothrow.replace.indirect.pass.cpp b/libcxx/test/std/language.support/support.dynamic/new.delete/new.delete.array/new.size_nothrow.replace.indirect.pass.cpp
index 84bfe8205b600..2e0ba468b6ff0 100644
--- a/libcxx/test/std/language.support/support.dynamic/new.delete/new.delete.array/new.size_nothrow.replace.indirect.pass.cpp
+++ b/libcxx/test/std/language.support/support.dynamic/new.delete/new.delete.array/new.size_nothrow.replace.indirect.pass.cpp
@@ -21,7 +21,11 @@
 // MSVC/vcruntime falls back from the nothrow array new to the nothrow
 // scalar new, instead of falling back on the throwing array new.
 // https://developercommunity.visualstudio.com/t/vcruntime-nothrow-array-operator-new-fal/10373274
-// XFAIL: target={{.+}}-windows-msvc
+// This issue got fixed in MSVC 2022 17.14; with vcruntime from that version,
+// this test does pass. (We could try to detect it and set a feature for when
+// this is known broken, but that detection would essentially a copy of this
+// test.)
+// UNSUPPORTED: target={{.+}}-windows-msvc
 
 #include <new>
 #include <cstddef>

@mstorsjo mstorsjo merged commit 74a102f into llvm:main May 28, 2025
146 of 161 checks passed
@mstorsjo mstorsjo deleted the libcxx-vcruntime-xfail branch May 28, 2025 06:21
sivan-shani pushed a commit to sivan-shani/llvm-project that referenced this pull request Jun 3, 2025
The underlying bug in vcruntime [1] has been fixed in the latest version
of MSVC (released two weeks ago); this will cause the test which is
currently marked XFAIL to start erroring, when it starts passing
unexpectedly.

This version of MSVC may soon start appearing in the Github Actions
runner images used for our CI.

We could try to detect the state of this bug, but in practice, such
detection code would essentially be a copy of this whole test.

Therefore, just mark this test UNSUPPORTED for the MSVC mode builds. If
we at some point require new enough MSVC libraries, we could remove the
marking entirely.

[1]
https://developercommunity.visualstudio.com/t/vcruntime-nothrow-array-operator-new-fal/10373274
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
libc++ libc++ C++ Standard Library. Not GNU libstdc++. Not libc++abi.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants