From 4440b96b3d92802ee327609e713f351065d25063 Mon Sep 17 00:00:00 2001 From: Cristian Cadar Date: Thu, 5 Aug 2010 10:22:53 +0000 Subject: Call klee_error instead of klee_warning when we fail to open a file, and inform users about the common file descriptor problem. Based on patch and discussion with Cristian Zamfir. git-svn-id: https://llvm.org/svn/llvm-project/klee/trunk@110329 91177308-0d34-0410-b5e6-96231b3b80d8 --- tools/klee/main.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/klee/main.cpp b/tools/klee/main.cpp index 2b7310ec..c3188259 100644 --- a/tools/klee/main.cpp +++ b/tools/klee/main.cpp @@ -353,9 +353,9 @@ std::ostream *KleeHandler::openOutputFile(const std::string &filename) { std::string path = getOutputFilename(filename); f = new std::ofstream(path.c_str(), io_mode); if (!f) { - klee_warning("out of memory"); + klee_error("error opening file \"%s\" (out of memory)", filename.c_str()); } else if (!f->good()) { - klee_warning("error opening: %s", filename.c_str()); + klee_error("error opening file \"%s\". KLEE may have run out of file descriptors: try to increase the maximum number of open file descriptors by using ulimit.", filename.c_str()); delete f; f = NULL; } -- cgit 1.4.1