From 09fcc2ce9b45b5c5437a4b62b9f632939fdfe79e Mon Sep 17 00:00:00 2001 From: Eric Fiselier Date: Sun, 28 May 2017 20:56:16 +0000 Subject: [PATCH] Correct XFAIL's in coroutine tests to only list ubsan llvm-svn: 304106 --- .../end.to.end/bool_await_suspend.sh.cpp | 14 ++++++++------ .../support.coroutines/end.to.end/generator.sh.cpp | 5 ++--- 2 files changed, 10 insertions(+), 9 deletions(-) diff --git a/libcxx/test/std/experimental/language.support/support.coroutines/end.to.end/bool_await_suspend.sh.cpp b/libcxx/test/std/experimental/language.support/support.coroutines/end.to.end/bool_await_suspend.sh.cpp index 06ceafa..e51ac67 100644 --- a/libcxx/test/std/experimental/language.support/support.coroutines/end.to.end/bool_await_suspend.sh.cpp +++ b/libcxx/test/std/experimental/language.support/support.coroutines/end.to.end/bool_await_suspend.sh.cpp @@ -11,9 +11,8 @@ // UNSUPPORTED: c++98, c++03, c++11 // REQUIRES: fcoroutines-ts -// These configurations run the tests with '-g', which hits a bug in Clangs -// coroutine implementation. -// XFAIL: asan, msan, ubsan, tsan +// FIXME: When run under UBSAN this test hits an assertion inside Clang +// XFAIL: ubsan // RUN: %build -fcoroutines-ts // RUN: %run @@ -26,14 +25,15 @@ using namespace std::experimental; struct coro_t { struct promise_type { coro_t get_return_object() { - coroutine_handle{}; - return {}; + return coroutine_handle::from_promise(*this); } suspend_never initial_suspend() { return {}; } suspend_never final_suspend() { return {}; } void return_void(){} void unhandled_exception() {} }; + coro_t(coroutine_handle hh) : h(hh) {} + coroutine_handle h; }; struct NoSuspend { @@ -64,7 +64,9 @@ coro_t g() { int main() { assert(!f_started && !f_resumed && !g_started && !g_resumed); - f(); + auto fret = f(); + assert(f_started && !f_resumed); + fret.h.destroy(); assert(f_started && !f_resumed); g(); assert(g_started && g_resumed); diff --git a/libcxx/test/std/experimental/language.support/support.coroutines/end.to.end/generator.sh.cpp b/libcxx/test/std/experimental/language.support/support.coroutines/end.to.end/generator.sh.cpp index f31b68a..4681793 100644 --- a/libcxx/test/std/experimental/language.support/support.coroutines/end.to.end/generator.sh.cpp +++ b/libcxx/test/std/experimental/language.support/support.coroutines/end.to.end/generator.sh.cpp @@ -11,9 +11,8 @@ // UNSUPPORTED: c++98, c++03, c++11 // REQUIRES: fcoroutines-ts -// These configurations run the tests with '-g', which hits a bug in Clangs -// coroutine implementation. -// XFAIL: asan, msan, ubsan, tsan +// FIXME: When run under UBSAN this test hits an assertion inside Clang +// XFAIL: ubsan // RUN: %build -fcoroutines-ts // RUN: %run -- 2.7.4