about summary refs log tree commit diff homepage
path: root/tools
diff options
context:
space:
mode:
authorCristian Cadar <cristic@cs.stanford.edu>2010-08-05 10:22:53 +0000
committerCristian Cadar <cristic@cs.stanford.edu>2010-08-05 10:22:53 +0000
commit4440b96b3d92802ee327609e713f351065d25063 (patch)
treef9a3af0666998e81d79068b966d942ab5656d57d /tools
parenta31b58cea45159999ae2ecdaa661490d29b6e3ab (diff)
downloadklee-4440b96b3d92802ee327609e713f351065d25063.tar.gz
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
Diffstat (limited to 'tools')
-rw-r--r--tools/klee/main.cpp4
1 files 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;
   }