From 2741d66552dcf6778f93fb381b33f83f52d12889 Mon Sep 17 00:00:00 2001 From: "Stephan T. Lavavej" Date: Fri, 23 Aug 2024 09:54:45 -0700 Subject: [PATCH 01/14] Update llvm-project. --- llvm-project | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/llvm-project b/llvm-project index 1b7631a699e..886b76128fb 160000 --- a/llvm-project +++ b/llvm-project @@ -1 +1 @@ -Subproject commit 1b7631a699e6af7f497548a1ceb5be0570c60ed0 +Subproject commit 886b76128fba5f995c8c8e24aaa2030b59dec01a From c74669d3d68ac3ad9b18f654ebb2ade4b772b921 Mon Sep 17 00:00:00 2001 From: "Stephan T. Lavavej" Date: Fri, 23 Aug 2024 10:50:38 -0700 Subject: [PATCH 02/14] range.join tests are now passing. --- tests/libcxx/expected_results.txt | 5 ----- 1 file changed, 5 deletions(-) diff --git a/tests/libcxx/expected_results.txt b/tests/libcxx/expected_results.txt index d1c69193af2..dd56707b144 100644 --- a/tests/libcxx/expected_results.txt +++ b/tests/libcxx/expected_results.txt @@ -1045,11 +1045,6 @@ std/algorithms/alg.modifying.operations/alg.move/ranges.move_backward.segmented. std/algorithms/alg.modifying.operations/alg.move/ranges.move.segmented.pass.cpp:0 FAIL std/algorithms/alg.modifying.operations/alg.move/ranges.move.segmented.pass.cpp:1 FAIL -# Not analyzed. constexpr evaluation fails with note: subobject '_Val' is not initialized -std/ranges/range.adaptors/range.join/end.pass.cpp:2 FAIL -std/ranges/range.adaptors/range.join/range.join.sentinel/ctor.parent.pass.cpp:2 FAIL -std/ranges/range.adaptors/range.join/range.join.sentinel/eq.pass.cpp:2 FAIL - # Not analyzed. constexpr evaluation fails with note: failure was caused by out of range index MEOW; allowed range is 0 <= index < 2 std/ranges/range.adaptors/range.join/adaptor.pass.cpp:0 FAIL std/ranges/range.adaptors/range.join/adaptor.pass.cpp:1 FAIL From a7ae7c9a89cd9499228ac635b9f8808336eaec48 Mon Sep 17 00:00:00 2001 From: "Stephan T. Lavavej" Date: Fri, 23 Aug 2024 10:52:57 -0700 Subject: [PATCH 03/14] LLVM-99375 implemented P1614R2. --- tests/libcxx/expected_results.txt | 3 --- 1 file changed, 3 deletions(-) diff --git a/tests/libcxx/expected_results.txt b/tests/libcxx/expected_results.txt index dd56707b144..f9970d0f5a0 100644 --- a/tests/libcxx/expected_results.txt +++ b/tests/libcxx/expected_results.txt @@ -85,9 +85,6 @@ std/numerics/rand/rand.util/rand.util.canonical/generate_canonical.pass.cpp FAIL # Test expects __cpp_lib_chrono to have the old value 201611L for P0505R0; we define the C++20 value 201907L for P1466R3. std/language.support/support.limits/support.limits.general/chrono.version.compile.pass.cpp FAIL -# Test expects __cpp_lib_three_way_comparison to have the old value 201711L for P0768R1; we define the C++20 value 201907L for P1614R2. -std/language.support/support.limits/support.limits.general/compare.version.compile.pass.cpp FAIL - # Tests expect __cpp_lib_ranges to have the old value 201811L for P0896R4; we define the C++20 value 201911L for P1716R3. std/language.support/support.limits/support.limits.general/algorithm.version.compile.pass.cpp FAIL std/language.support/support.limits/support.limits.general/functional.version.compile.pass.cpp FAIL From 0402eb622c7355be8cd65964e866a7d6d98a42c0 Mon Sep 17 00:00:00 2001 From: "Stephan T. Lavavej" Date: Fri, 23 Aug 2024 10:51:38 -0700 Subject: [PATCH 04/14] LLVM-100504 was merged. --- tests/libcxx/expected_results.txt | 3 --- 1 file changed, 3 deletions(-) diff --git a/tests/libcxx/expected_results.txt b/tests/libcxx/expected_results.txt index f9970d0f5a0..819c599aa6a 100644 --- a/tests/libcxx/expected_results.txt +++ b/tests/libcxx/expected_results.txt @@ -43,9 +43,6 @@ std/algorithms/alg.nonmodifying/alg.find.last/ranges.find_last_if_not.pass.cpp F # Note: The :1 (ASAN) configuration doesn't run static analysis. std/time/time.cal/time.cal.ymdlast/time.cal.ymdlast.nonmembers/comparisons.pass.cpp:0 FAIL -# LLVM-100504: [libc++][test] Fix Clang -Wunused-variable warnings in time.zone.members/to_sys.pass.cpp -std/time/time.zone/time.zone.timezone/time.zone.members/to_sys.pass.cpp:2 FAIL - # LLVM-100506: [libc++][test] Precondition violation in rand.dist.uni.real/param_ctor.pass.cpp std/numerics/rand/rand.dist/rand.dist.uni/rand.dist.uni.real/param_ctor.pass.cpp FAIL From 74ddc5385a9c0ea656d93d29a039582a181d4250 Mon Sep 17 00:00:00 2001 From: "Stephan T. Lavavej" Date: Fri, 23 Aug 2024 10:44:12 -0700 Subject: [PATCH 05/14] LLVM-100603 fixed LLVM-100498. --- tests/libcxx/expected_results.txt | 5 ----- 1 file changed, 5 deletions(-) diff --git a/tests/libcxx/expected_results.txt b/tests/libcxx/expected_results.txt index 819c599aa6a..bdb30b478c9 100644 --- a/tests/libcxx/expected_results.txt +++ b/tests/libcxx/expected_results.txt @@ -34,11 +34,6 @@ std/utilities/format/format.range/format.range.formatter/format.functions.vforma std/utilities/format/format.range/format.range.fmtset/format.functions.format.pass.cpp FAIL std/utilities/format/format.range/format.range.fmtset/format.functions.vformat.pass.cpp FAIL -# LLVM-100498: [libc++][test] alg.find.last tests assume that std::array iterators are pointers -std/algorithms/alg.nonmodifying/alg.find.last/ranges.find_last.pass.cpp FAIL -std/algorithms/alg.nonmodifying/alg.find.last/ranges.find_last_if.pass.cpp FAIL -std/algorithms/alg.nonmodifying/alg.find.last/ranges.find_last_if_not.pass.cpp FAIL - # LLVM-100502: [libc++][test] Bogus loops in time.cal.ymdlast.nonmembers/comparisons.pass.cpp # Note: The :1 (ASAN) configuration doesn't run static analysis. std/time/time.cal/time.cal.ymdlast/time.cal.ymdlast.nonmembers/comparisons.pass.cpp:0 FAIL From e6f6156bd67a23e39ed97be3c51180da9aea696c Mon Sep 17 00:00:00 2001 From: "Stephan T. Lavavej" Date: Fri, 23 Aug 2024 10:45:33 -0700 Subject: [PATCH 06/14] LLVM-101890 fixed LLVM-100502. --- tests/libcxx/expected_results.txt | 4 ---- 1 file changed, 4 deletions(-) diff --git a/tests/libcxx/expected_results.txt b/tests/libcxx/expected_results.txt index bdb30b478c9..dcc50316f00 100644 --- a/tests/libcxx/expected_results.txt +++ b/tests/libcxx/expected_results.txt @@ -34,10 +34,6 @@ std/utilities/format/format.range/format.range.formatter/format.functions.vforma std/utilities/format/format.range/format.range.fmtset/format.functions.format.pass.cpp FAIL std/utilities/format/format.range/format.range.fmtset/format.functions.vformat.pass.cpp FAIL -# LLVM-100502: [libc++][test] Bogus loops in time.cal.ymdlast.nonmembers/comparisons.pass.cpp -# Note: The :1 (ASAN) configuration doesn't run static analysis. -std/time/time.cal/time.cal.ymdlast/time.cal.ymdlast.nonmembers/comparisons.pass.cpp:0 FAIL - # LLVM-100506: [libc++][test] Precondition violation in rand.dist.uni.real/param_ctor.pass.cpp std/numerics/rand/rand.dist/rand.dist.uni/rand.dist.uni.real/param_ctor.pass.cpp FAIL From 9456d6399b5411210da32ff33ccabf91983e46ff Mon Sep 17 00:00:00 2001 From: "Stephan T. Lavavej" Date: Fri, 23 Aug 2024 09:55:59 -0700 Subject: [PATCH 07/14] LLVM-102032 fixed dereference.single.pass.cpp and deleted noexcept_operator_star.compile.pass.cpp. --- tests/libcxx/expected_results.txt | 4 ---- 1 file changed, 4 deletions(-) diff --git a/tests/libcxx/expected_results.txt b/tests/libcxx/expected_results.txt index dcc50316f00..f87b954c465 100644 --- a/tests/libcxx/expected_results.txt +++ b/tests/libcxx/expected_results.txt @@ -1221,10 +1221,6 @@ std/atomics/atomics.ref/operator_plus_equals.pass.cpp SKIPPED std/atomics/atomics.ref/store.pass.cpp SKIPPED std/atomics/atomics.ref/wait.pass.cpp SKIPPED -# Not analyzed. Attempting to dereference `void *`. -std/utilities/memory/unique.ptr/noexcept_operator_star.compile.pass.cpp FAIL -std/utilities/smartptr/unique.ptr/unique.ptr.class/unique.ptr.observers/dereference.single.pass.cpp FAIL - # Not analyzed. Attempting to delete `nullptr_t`. std/utilities/memory/util.smartptr/util.smartptr.shared/util.smartptr.shared.const/pointer_deleter.pass.cpp FAIL From 8d76803d8c219ec028a1f2ff7462cc9511a67f6c Mon Sep 17 00:00:00 2001 From: "Stephan T. Lavavej" Date: Fri, 23 Aug 2024 12:30:47 -0700 Subject: [PATCH 08/14] Reported LLVM-105878. --- tests/libcxx/expected_results.txt | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/tests/libcxx/expected_results.txt b/tests/libcxx/expected_results.txt index f87b954c465..3c0e77aa4c7 100644 --- a/tests/libcxx/expected_results.txt +++ b/tests/libcxx/expected_results.txt @@ -37,6 +37,10 @@ std/utilities/format/format.range/format.range.fmtset/format.functions.vformat.p # LLVM-100506: [libc++][test] Precondition violation in rand.dist.uni.real/param_ctor.pass.cpp std/numerics/rand/rand.dist/rand.dist.uni/rand.dist.uni.real/param_ctor.pass.cpp FAIL +# LLVM-105878: [libc++][test] fp_compare.h includes non-portable <__config> +std/numerics/c.math/cmath.pass.cpp FAIL +std/numerics/numeric.ops/numeric.ops.midpoint/midpoint.float.pass.cpp FAIL + # Non-Standard regex behavior. # "It seems likely that the test is still non-conforming due to how libc++ handles the 'w' character class." std/re/re.traits/lookup_classname.pass.cpp FAIL From 8c5264c6e29ffa8d4764a48b76a17afad1f4526e Mon Sep 17 00:00:00 2001 From: "Stephan T. Lavavej" Date: Fri, 23 Aug 2024 12:43:47 -0700 Subject: [PATCH 09/14] MSVC's STL hasn't implemented P3107R5 yet; GH 4821 is in flight. --- tests/libcxx/expected_results.txt | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tests/libcxx/expected_results.txt b/tests/libcxx/expected_results.txt index 3c0e77aa4c7..93f5a169477 100644 --- a/tests/libcxx/expected_results.txt +++ b/tests/libcxx/expected_results.txt @@ -233,6 +233,9 @@ std/language.support/support.limits/support.limits.general/cstdlib.version.compi # P2255R2 "Type Traits To Detect References Binding To Temporaries" std/language.support/support.limits/support.limits.general/type_traits.version.compile.pass.cpp FAIL +# P3107R5 "Permit An Efficient Implementation Of " +std/utilities/format/format.formatter/format.formatter.locking/enable_nonlocking_formatter_optimization.compile.pass.cpp FAIL + # *** MISSING COMPILER FEATURES *** # P1169R4 static operator() From 64a6ce70c6caadc117631f8e5aada5a39412f151 Mon Sep 17 00:00:00 2001 From: "Stephan T. Lavavej" Date: Fri, 23 Aug 2024 12:47:02 -0700 Subject: [PATCH 10/14] Another occurrence of an MSVC constexpr bug. --- tests/libcxx/expected_results.txt | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tests/libcxx/expected_results.txt b/tests/libcxx/expected_results.txt index 93f5a169477..e04b56d15d9 100644 --- a/tests/libcxx/expected_results.txt +++ b/tests/libcxx/expected_results.txt @@ -837,6 +837,8 @@ std/algorithms/robust_against_proxy_iterators_lifetime_bugs.pass.cpp FAIL # Not analyzed. Possible MSVC constexpr bug. # note: failure was caused by a read of a variable outside its lifetime +std/algorithms/alg.nonmodifying/alg.find.last/ranges.find_last.pass.cpp:0 FAIL +std/algorithms/alg.nonmodifying/alg.find.last/ranges.find_last.pass.cpp:1 FAIL std/containers/sequences/vector.bool/construct_iter_iter.pass.cpp:0 FAIL std/containers/sequences/vector.bool/construct_iter_iter.pass.cpp:1 FAIL std/containers/sequences/vector.bool/construct_iter_iter_alloc.pass.cpp:0 FAIL From f15463785e152319dde2d2b726563516ccc692a8 Mon Sep 17 00:00:00 2001 From: "Stephan T. Lavavej" Date: Fri, 23 Aug 2024 12:50:01 -0700 Subject: [PATCH 11/14] Another occurrence of constexpr step limits, Clang-only this time. --- tests/libcxx/expected_results.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/libcxx/expected_results.txt b/tests/libcxx/expected_results.txt index e04b56d15d9..ea978703138 100644 --- a/tests/libcxx/expected_results.txt +++ b/tests/libcxx/expected_results.txt @@ -932,6 +932,7 @@ std/thread/thread.mutex/thread.mutex.requirements/thread.sharedtimedmutex.requir std/utilities/utility/mem.res/mem.poly.allocator.class/mem.poly.allocator.mem/construct_piecewise_pair_evil.pass.cpp FAIL # Not analyzed, failing due to constexpr step limits. +std/algorithms/alg.nonmodifying/alg.contains/ranges.contains_subrange.pass.cpp:2 FAIL std/algorithms/alg.nonmodifying/alg.count/count.pass.cpp FAIL std/algorithms/alg.nonmodifying/alg.count/ranges.count.pass.cpp FAIL std/containers/sequences/vector.bool/append_range.pass.cpp FAIL From 102fe8273700a399f5461dce9226d7d8cf925845 Mon Sep 17 00:00:00 2001 From: "Stephan T. Lavavej" Date: Fri, 23 Aug 2024 13:01:04 -0700 Subject: [PATCH 12/14] Add not-entirely-analyzed failures. --- tests/libcxx/expected_results.txt | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/tests/libcxx/expected_results.txt b/tests/libcxx/expected_results.txt index ea978703138..86c17f66814 100644 --- a/tests/libcxx/expected_results.txt +++ b/tests/libcxx/expected_results.txt @@ -1254,6 +1254,12 @@ std/containers/sequences/vector/vector.capacity/shrink_to_fit.pass.cpp FAIL # Clang assertion: std::hermite(n, +inf) == inf std/numerics/c.math/hermite.pass.cpp FAIL +# Not analyzed. Test coverage for LLVM-104496 uses span. +std/containers/views/views.span/span.cons/copy.pass.cpp FAIL + +# Not analyzed. LLVM-103409 added a test to verify that std::optional's internal constructors aren't visible to users. +std/utilities/optional/optional.object/optional.object.ctor/gh_101960_internal_ctor.compile.pass.cpp FAIL + # *** XFAILs WHICH PASS *** # These tests contain `// XFAIL: msvc` comments, which accurately describe runtime failures for x86 and x64. From c0d57237afc705e7d21e54a219b60bedb795b2d0 Mon Sep 17 00:00:00 2001 From: "Stephan T. Lavavej" Date: Fri, 23 Aug 2024 10:59:18 -0700 Subject: [PATCH 13/14] Product code fix: Use `addressof` to defend against hijacking in `basic_ostream`. --- stl/inc/ostream | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/stl/inc/ostream b/stl/inc/ostream index b682a8b68bd..2b64fe185cc 100644 --- a/stl/inc/ostream +++ b/stl/inc/ostream @@ -100,7 +100,7 @@ public: } const auto _Tied = _Ostr.tie(); - if (!_Tied || _Tied == &_Ostr) { + if (!_Tied || _Tied == _STD addressof(_Ostr)) { _Ok = true; return; } From a42ef8ac445c664a1e2d3f1cb6218426907be9f5 Mon Sep 17 00:00:00 2001 From: "Stephan T. Lavavej" Date: Sat, 24 Aug 2024 19:42:57 -0700 Subject: [PATCH 14/14] Reported LLVM-105966. --- tests/libcxx/expected_results.txt | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tests/libcxx/expected_results.txt b/tests/libcxx/expected_results.txt index 86c17f66814..6f0059892bd 100644 --- a/tests/libcxx/expected_results.txt +++ b/tests/libcxx/expected_results.txt @@ -41,6 +41,9 @@ std/numerics/rand/rand.dist/rand.dist.uni/rand.dist.uni.real/param_ctor.pass.cpp std/numerics/c.math/cmath.pass.cpp FAIL std/numerics/numeric.ops/numeric.ops.midpoint/midpoint.float.pass.cpp FAIL +# LLVM-105966: [libc++][test] Fix is_always_lock_free test +std/atomics/atomics.lockfree/is_always_lock_free.cpp FAIL + # Non-Standard regex behavior. # "It seems likely that the test is still non-conforming due to how libc++ handles the 'w' character class." std/re/re.traits/lookup_classname.pass.cpp FAIL