about summary refs log tree commit diff homepage
diff options
context:
space:
mode:
authorDaniel Dunbar <daniel@zuster.org>2009-08-01 21:56:44 +0000
committerDaniel Dunbar <daniel@zuster.org>2009-08-01 21:56:44 +0000
commit3f22dfb755580dc8d608140f5b4274b0e7ba14cd (patch)
tree0d8e3d4034d5b303226c2ec4f04335960fec2aee
parent01a78cc5898a21310fdfadc13c0c702086721d8c (diff)
downloadklee-3f22dfb755580dc8d608140f5b4274b0e7ba14cd.tar.gz
KLEE64: Fix initialization of ctype_ externals.
git-svn-id: https://llvm.org/svn/llvm-project/klee/trunk@77816 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--lib/Core/Executor.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/lib/Core/Executor.cpp b/lib/Core/Executor.cpp
index 5118fac2..370495eb 100644
--- a/lib/Core/Executor.cpp
+++ b/lib/Core/Executor.cpp
@@ -473,17 +473,17 @@ void Executor::initializeGlobals(ExecutionState &state) {
   const uint16_t **addr = __ctype_b_loc();
   addExternalObject(state, (void *)(*addr-128), 
                     384 * sizeof **addr, true);
-  addExternalObject(state, addr, 4, true);
+  addExternalObject(state, addr, sizeof(*addr), true);
     
   const int32_t **lower_addr = __ctype_tolower_loc();
   addExternalObject(state, (void *)(*lower_addr-128), 
                     384 * sizeof **lower_addr, true);
-  addExternalObject(state, lower_addr, 4, true);
+  addExternalObject(state, lower_addr, sizeof(*lower_addr), true);
   
   const int32_t **upper_addr = __ctype_toupper_loc();
   addExternalObject(state, (void *)(*upper_addr-128), 
                     384 * sizeof **upper_addr, true);
-  addExternalObject(state, upper_addr, 4, true);
+  addExternalObject(state, upper_addr, sizeof(*upper_addr), true);
 #endif
 #endif
 #endif
@@ -506,6 +506,7 @@ void Executor::initializeGlobals(ExecutionState &state) {
 
       // XXX - DWD - hardcode some things until we decide how to fix.
 #ifndef WINDOWS
+      // TODO: is it 64-bit clean ?
       if (i->getName() == "_ZTVN10__cxxabiv117__class_type_infoE") {
         size = 0x2C;
       } else if (i->getName() == "_ZTVN10__cxxabiv120__si_class_type_infoE") {