Index: lib/ExecutionEngine/JIT/JITEmitter.cpp
===================================================================
RCS file: /var/cvs/llvm/llvm/lib/ExecutionEngine/JIT/JITEmitter.cpp,v
retrieving revision 1.59
diff -u -r1.59 JITEmitter.cpp
--- lib/ExecutionEngine/JIT/JITEmitter.cpp	5 Dec 2004 07:19:16 -0000	1.59
+++ lib/ExecutionEngine/JIT/JITEmitter.cpp	6 Dec 2004 10:34:21 -0000
@@ -51,6 +51,7 @@
     unsigned char *CurStubPtr, *CurFunctionPtr;
   public:
     JITMemoryManager();
+    ~JITMemoryManager();
     
     inline unsigned char *allocateStub(unsigned StubSize);
     inline unsigned char *startFunctionBody();
@@ -69,6 +70,10 @@
   CurStubPtr = CurFunctionPtr = FunctionBase;
 }
 
+JITMemoryManager::~JITMemoryManager() {
+  sys::Memory::ReleaseRWX(MemBlock);
+}
+
 unsigned char *JITMemoryManager::allocateStub(unsigned StubSize) {
   CurStubPtr -= StubSize;
   if (CurStubPtr < MemBase) {
Index: lib/Support/Timer.cpp
===================================================================
RCS file: /var/cvs/llvm/llvm/lib/Support/Timer.cpp,v
retrieving revision 1.33
diff -u -r1.33 Timer.cpp
--- lib/Support/Timer.cpp	19 Nov 2004 04:59:07 -0000	1.33
+++ lib/Support/Timer.cpp	3 Dec 2004 14:30:24 -0000
@@ -33,12 +33,10 @@
 // problem is that a Statistic<> object gets destroyed, which ends up calling
 // 'GetLibSupportInfoOutputFile()' (below), which calls this function.
 // LibSupportInfoOutputFilename used to be a global variable, but sometimes it
-// would get destroyed before the Statistic, causing havoc to ensue.  We "fix"
-// this by creating the string the first time it is needed and never destroying
-// it.
+// would get destroyed before the Statistic, causing havoc to ensue.
 static std::string &getLibSupportInfoOutputFilename() {
-  static std::string *LibSupportInfoOutputFilename = new std::string();
-  return *LibSupportInfoOutputFilename;
+  static std::string LibSupportInfoOutputFilename;
+  return LibSupportInfoOutputFilename;
 }
 
 namespace {
