Index: lib/Support/SmallVector.cpp =================================================================== --- lib/Support/SmallVector.cpp +++ lib/Support/SmallVector.cpp @@ -33,6 +33,7 @@ // If this wasn't grown from the inline copy, grow the allocated space. NewElts = realloc(this->BeginX, NewCapacityInBytes); } + assert(NewElts && "Out of memory"); this->EndX = (char*)NewElts+CurSizeBytes; this->BeginX = NewElts;