[WinEH] Reset WinEHPrepare::SEHExceptionCodeSlot when we're done.
authorAhmed Bougacha <ahmed.bougacha@gmail.com>
Wed, 6 May 2015 01:28:58 +0000 (01:28 +0000)
committerAhmed Bougacha <ahmed.bougacha@gmail.com>
Wed, 6 May 2015 01:28:58 +0000 (01:28 +0000)
This caused a use-after-free on test/CodeGen/X86/win32-eh.ll
No functional change intended.

llvm-svn: 236561

llvm/lib/CodeGen/WinEHPrepare.cpp

index db91c02..2c72a55 100644 (file)
@@ -934,6 +934,7 @@ bool WinEHPrepare::prepareExceptionHandlers(
   CleanupHandlerMap.clear();
   HandlerToParentFP.clear();
   DT = nullptr;
+  SEHExceptionCodeSlot = nullptr;
 
   return HandlersOutlined;
 }