summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorReid Kleckner <rnk@google.com>2017-08-10 21:14:07 +0000
committerReid Kleckner <rnk@google.com>2017-08-10 21:14:07 +0000
commit6be1ed05c7a7e1e7a812f037b660ec693c5c1ca9 (patch)
tree9a511fd56b130ef7c8ba900bfdeea3f8209711c2
parentf8556ad48f5ba9d020509ea7833cae432730bb19 (diff)
downloadbcm5719-llvm-6be1ed05c7a7e1e7a812f037b660ec693c5c1ca9.tar.gz
bcm5719-llvm-6be1ed05c7a7e1e7a812f037b660ec693c5c1ca9.zip
Disable some IR death tests when SEH is available
They hang for me locally. I suspect that there is a use-after-free when attempting to destroy an LLVMContext after asserting from the middle of metadata tracking. It doesn't seem worth debugging it further. llvm-svn: 310660
-rw-r--r--llvm/unittests/IR/MetadataTest.cpp9
1 files changed, 6 insertions, 3 deletions
diff --git a/llvm/unittests/IR/MetadataTest.cpp b/llvm/unittests/IR/MetadataTest.cpp
index e47afca532d..93173f72371 100644
--- a/llvm/unittests/IR/MetadataTest.cpp
+++ b/llvm/unittests/IR/MetadataTest.cpp
@@ -2466,8 +2466,12 @@ TEST_F(DistinctMDOperandPlaceholderTest, replaceUseWithNoUser) {
DistinctMDOperandPlaceholder(7).replaceUseWith(MDTuple::get(Context, None));
}
-#ifndef NDEBUG
-#ifdef GTEST_HAS_DEATH_TEST
+// Test various assertions in metadata tracking. Don't run these tests if gtest
+// will use SEH to recover from them. Two of these tests get halfway through
+// inserting metadata into DenseMaps for tracking purposes, and then they
+// assert, and we attempt to destroy an LLVMContext with broken invariants,
+// leading to infinite loops.
+#if defined(GTEST_HAS_DEATH_TEST) && !defined(NDEBUG) && !defined(GTEST_HAS_SEH)
TEST_F(DistinctMDOperandPlaceholderTest, MetadataAsValue) {
// This shouldn't crash.
DistinctMDOperandPlaceholder PH(7);
@@ -2509,6 +2513,5 @@ TEST_F(DistinctMDOperandPlaceholderTest, TrackingMDRefAndDistinctMDNode) {
}
}
#endif
-#endif
} // end namespace
OpenPOWER on IntegriCloud