about summary refs log tree commit diff homepage
diff options
context:
space:
mode:
authorMartin Nowack <martin.nowack@gmail.com>2014-02-03 15:42:05 +0100
committerCristian Cadar <c.cadar@imperial.ac.uk>2015-04-01 15:12:43 +0100
commitdb29a0bba74b672cdf4b8fef4d94ffa6ab845e6d (patch)
treebb394b39959f7721088e09ca752b1c9657edb618
parentbadffc570e1be6b675dcab7e21829bd029c46287 (diff)
downloadklee-db29a0bba74b672cdf4b8fef4d94ffa6ab845e6d.tar.gz
[tools] Added fortified version wrapper for fprintf
-rw-r--r--tools/klee/main.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/tools/klee/main.cpp b/tools/klee/main.cpp
index 8a246685..08eacac1 100644
--- a/tools/klee/main.cpp
+++ b/tools/klee/main.cpp
@@ -1092,6 +1092,8 @@ static llvm::Module *linkWithUclibc(llvm::Module *mainModule, StringRef libDir)
   replaceOrRenameFunction(mainModule, "__libc_open", "open");
   replaceOrRenameFunction(mainModule, "__libc_fcntl", "fcntl");
 
+  // Take care of fortified functions
+  replaceOrRenameFunction(mainModule, "__fprintf_chk", "fprintf");
 
   // XXX we need to rearchitect so this can also be used with
   // programs externally linked with uclibc.