[llvm-commits] CVS: llvm/lib/ExecutionEngine/Interpreter/Execution.cpp Interpreter.cpp

Reid Spencer reid at x10sys.com
Fri Jun 1 15:23:51 PDT 2007



Changes in directory llvm/lib/ExecutionEngine/Interpreter:

Execution.cpp updated: 1.184 -> 1.185
Interpreter.cpp updated: 1.39 -> 1.40
---
Log message:

For PR1486: http://llvm.org/PR1486 :
Avoid overwriting the APInt instance with 0 bytes which causes the bitwidth
to be set to 0 (illegal) producing a subsequent assert. 


---
Diffs of the changes:  (+2 -2)

 Execution.cpp   |    2 +-
 Interpreter.cpp |    2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)


Index: llvm/lib/ExecutionEngine/Interpreter/Execution.cpp
diff -u llvm/lib/ExecutionEngine/Interpreter/Execution.cpp:1.184 llvm/lib/ExecutionEngine/Interpreter/Execution.cpp:1.185
--- llvm/lib/ExecutionEngine/Interpreter/Execution.cpp:1.184	Thu May 17 01:47:54 2007
+++ llvm/lib/ExecutionEngine/Interpreter/Execution.cpp	Fri Jun  1 17:23:29 2007
@@ -610,7 +610,7 @@
     if (RetTy && RetTy->isInteger()) {          // Nonvoid return type?
       ExitValue = Result;   // Capture the exit value of the program
     } else {
-      memset(&ExitValue, 0, sizeof(ExitValue));
+      memset(&ExitValue.Untyped, 0, sizeof(ExitValue.Untyped));
     }
   } else {
     // If we have a previous stack frame, and we have a previous call,


Index: llvm/lib/ExecutionEngine/Interpreter/Interpreter.cpp
diff -u llvm/lib/ExecutionEngine/Interpreter/Interpreter.cpp:1.39 llvm/lib/ExecutionEngine/Interpreter/Interpreter.cpp:1.40
--- llvm/lib/ExecutionEngine/Interpreter/Interpreter.cpp:1.39	Mon Mar  5 21:05:57 2007
+++ llvm/lib/ExecutionEngine/Interpreter/Interpreter.cpp	Fri Jun  1 17:23:29 2007
@@ -54,7 +54,7 @@
 //
 Interpreter::Interpreter(Module *M) : ExecutionEngine(M), TD(M) {
       
-  memset(&ExitValue, 0, sizeof(ExitValue));
+  memset(&ExitValue.Untyped, 0, sizeof(ExitValue.Untyped));
   setTargetData(&TD);
   // Initialize the "backend"
   initializeExecutionEngine();






More information about the llvm-commits mailing list