[klee] r110329 - /klee/trunk/tools/klee/main.cpp

Cristian Cadar cristic at cs.stanford.edu
Thu Aug 5 03:22:53 PDT 2010


Author: cristic
Date: Thu Aug  5 05:22:53 2010
New Revision: 110329

URL: http://llvm.org/viewvc/llvm-project?rev=110329&view=rev
Log:
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.


Modified:
    klee/trunk/tools/klee/main.cpp

Modified: klee/trunk/tools/klee/main.cpp
URL: http://llvm.org/viewvc/llvm-project/klee/trunk/tools/klee/main.cpp?rev=110329&r1=110328&r2=110329&view=diff
==============================================================================
--- klee/trunk/tools/klee/main.cpp (original)
+++ klee/trunk/tools/klee/main.cpp Thu Aug  5 05:22:53 2010
@@ -353,9 +353,9 @@
   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;
   }




More information about the klee-commits mailing list