mirror of
https://github.com/llvm/llvm-project.git
synced 2025-05-16 16:06:05 +00:00

If expensive checks are enabled, safe mode of libstdc++ is enabled too. In this mode the library uses more complex data that allow additional checks, for instance, a container may keep list of iterators that points to it. If a code crashes it can leave these complex library objects in inconsistent state. It occurs in a few tests that check error recovery if compiler crashes. These test hang in expensive check mode, as the library tries to synchronize access to the iterators pointing to some container, but corresponding mutex remains locked after the crash. This fix marks these tests as unsupported if clang is built with libstdc++ safe mode enabled. Differential Revision: https://reviews.llvm.org/D31126 llvm-svn: 300392
10 lines
380 B
C
10 lines
380 B
C
// RUN: not c-index-test -test-load-source all %s 2> %t.err
|
|
// RUN: FileCheck < %t.err -check-prefix=CHECK-LOAD-SOURCE-CRASH %s
|
|
// CHECK-LOAD-SOURCE-CRASH: Unable to load translation unit
|
|
// RUN: env LIBCLANG_DISABLE_CRASH_RECOVERY=1 not --crash c-index-test -test-load-source all %s
|
|
//
|
|
// REQUIRES: crash-recovery
|
|
// UNSUPPORTED: libstdcxx-safe-mode
|
|
|
|
#pragma clang __debug crash
|