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

Brian Gaeke gaeke at cs.uiuc.edu
Thu Feb 12 23:49:01 PST 2004


Changes in directory llvm/lib/ExecutionEngine/Interpreter:

Execution.cpp updated: 1.122 -> 1.123

---
Log message:

The Interpreter was failing the AtExit UnitTest. This fixes it.


---
Diffs of the changes:  (+4 -0)

Index: llvm/lib/ExecutionEngine/Interpreter/Execution.cpp
diff -u llvm/lib/ExecutionEngine/Interpreter/Execution.cpp:1.122 llvm/lib/ExecutionEngine/Interpreter/Execution.cpp:1.123
--- llvm/lib/ExecutionEngine/Interpreter/Execution.cpp:1.122	Sun Feb  8 15:44:28 2004
+++ llvm/lib/ExecutionEngine/Interpreter/Execution.cpp	Thu Feb 12 23:48:00 2004
@@ -523,6 +523,10 @@
 //===----------------------------------------------------------------------===//
 
 void Interpreter::exitCalled(GenericValue GV) {
+  // runAtExitHandlers() assumes there are no stack frames, but
+  // if exit() was called, then it had a stack frame. Blow away
+  // the stack before interpreting atexit handlers.
+  ECStack.clear ();
   runAtExitHandlers ();
   exit (GV.IntVal);
 }





More information about the llvm-commits mailing list