llvm-project icon indicating copy to clipboard operation
llvm-project copied to clipboard

[libc++] Investigate the assertion issues for some libcxx tests on PowerPC

Open maryammo opened this issue 2 years ago • 2 comments

The following tests failed since the PowerPC rhel bot started to build libc++, to unblock the bots they were XFAILed for PowerPC by this commit.

libcxx/test/libcxx/containers/views/mdspan/layout_stride/assert.conversion.pass.cpp
libcxx/test/std/experimental/simd/simd.class/simd_ctor_broadcast.pass.cpp
libcxx/test/std/experimental/simd/simd.class/simd_ctor_conversion.pass.cpp
libcxx/test/std/experimental/simd/simd.class/simd_ctor_generator.pass.cpp
libcxx/test/std/experimental/simd/simd.class/simd_subscr.pass.cpp
libcxx/test/std/experimental/simd/simd.reference/reference_assignment.pass.cpp
libcxx/test/std/experimental/simd/simd.reference/reference_value_type.pass.cpp

This issue is to investigate the root cause of why they fail with a different assertion than the expected one on PowerPC.

Also, recently with this commit, layout_stride/assert.conversion.pass.cpp started to pass unexpectedly because we no longer heck the assertion message in non-debug hardening modes. To not hide the PowerPC issue, the test will be XFAILed in debug mode.

maryammo avatar Jan 23 '24 21:01 maryammo

@llvm/issue-subscribers-backend-powerpc

Author: Maryam Moghadas (maryammo)

The following tests failed since the PowerPC rhel [bot](https://lab.llvm.org/buildbot/#/builders/57) started to build libc++, to unblock the bots they were `XFAILed` for PowerPC by this [commit](https://github.com/llvm/llvm-project/commit/503dbe75a042af2af35b90d23153752c66dcbf25#r134239197).
libcxx/test/libcxx/containers/views/mdspan/layout_stride/assert.conversion.pass.cpp
libcxx/test/std/experimental/simd/simd.class/simd_ctor_broadcast.pass.cpp
libcxx/test/std/experimental/simd/simd.class/simd_ctor_conversion.pass.cpp
libcxx/test/std/experimental/simd/simd.class/simd_ctor_generator.pass.cpp
libcxx/test/std/experimental/simd/simd.class/simd_subscr.pass.cpp
libcxx/test/std/experimental/simd/simd.reference/reference_assignment.pass.cpp
libcxx/test/std/experimental/simd/simd.reference/reference_value_type.pass.cpp

This issue is to investigate the root cause of why they fail with a different assertion than the expected one on PowerPC.

Also, recently with this commit, layout_stride/assert.conversion.pass.cpp started to pass unexpectedly because we no longer heck the assertion message in non-debug hardening modes. To not hide the PowerPC issue, the test will be XFAILed in debug mode.

llvmbot avatar Jan 23 '24 21:01 llvmbot

On PowerPC LE, layout_stride/assert.conversion.pass.cpp fails with

# .---command stderr------------
# | EXPECT_DEATH( ([=] { std::layout_stride::mapping<std::extents<char, D, D>> m(offset_map); }()) ) failed! (matcher failed)
# | 
# | child exit code: 2
# | ---------- standard out ----------
# | Failed to match assertion info!
# | msg = "layout_stride::mapping converting ctor: all strides must be greater than 0"
# | line = '*'
# | file = '*'
# | VS
# | /home/maryammo/llvm-workspace/myFork/build/include/c++/v1/__mdspan/layout_stride.h:249 (layout_stride::mapping converting ctor: base offset of mapping must be zero.)
# | 
# | t.tmp.exe: /home/maryammo/llvm-workspace/myFork/llvm-project/libcxx/test/libcxx/containers/views/mdspan/layout_stride/assert.conversion.pass.cpp:76: int main(int, char **): Assertion `(ExpectDeath("([=] { std::layout_stride::mapping<std::extents<char, D, D>> m(offset_map); }())", [&]() { (void)(([=] { std::layout_stride::mapping<std::extents<char, D, D>> m(offset_map); }())); }, AssertionInfoMatcher("layout_stride::mapping converting ctor: all strides must be greater than 0")))' failed.
# `-----------------------------
# error: command failed with exit status: 250

maryammo avatar Jan 23 '24 22:01 maryammo