Skip to content

Commit 28b3fb4

Browse files
[CAS] Detect crash in llvm-cas-test RunSafely
1 parent ae0cb17 commit 28b3fb4

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

llvm/tools/llvm-cas-test/llvm-cas-test.cpp

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,7 @@ static void fillData(ObjectStore &CAS, ActionCache &AC, const Config &Conf) {
141141
for (size_t I = 0; I != Conf.NumShards; ++I) {
142142
ThreadPool.async([&] {
143143
CrashRecoveryContext CRC;
144-
CRC.RunSafely([&]() {
144+
auto Success = CRC.RunSafely([&]() {
145145
std::vector<ObjectRef> Refs;
146146
for (unsigned Depth = 0; Depth < Conf.TreeDepth; ++Depth) {
147147
unsigned NumNodes =
@@ -173,6 +173,9 @@ static void fillData(ObjectStore &CAS, ActionCache &AC, const Config &Conf) {
173173
Refs.swap(Created);
174174
}
175175
});
176+
if (!Success) {
177+
ExitOnErr(createStringError("fillData crashed"));
178+
}
176179
});
177180
}
178181
ThreadPool.wait();

0 commit comments

Comments
 (0)