From de13b795434877ad71f77a74180c2a01141083b2 Mon Sep 17 00:00:00 2001 From: Erik Sohns Date: Wed, 2 Dec 2015 14:53:29 +0100 Subject: fix potential memory leak when using the Win32 Proactor (part1) --- ACE/ace/WIN32_Proactor.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/ACE/ace/WIN32_Proactor.cpp b/ACE/ace/WIN32_Proactor.cpp index 25bf4f31b32..c593398cc26 100644 --- a/ACE/ace/WIN32_Proactor.cpp +++ b/ACE/ace/WIN32_Proactor.cpp @@ -636,6 +636,12 @@ ACE_WIN32_Proactor::application_specific_code (ACE_WIN32_Asynch_Result *asynch_r const void *completion_key, u_long error) { + // *NOTE*: on Win32 with MSVC (ACE_HAS_WIN32_STRUCTURAL_EXCEPTIONS set), this + // needs to be compiled with '/EHa' to work properly, otherwise + // 'finally' is skipped, leaking memory + // *TODO*: the default (auto-)generated MPC MSVC project files do not enforce + // this (uses '/EHsc', see $MPC_ROOT/templates/nmakedll.mpt:36) + // *WORKAROUND*: #undef(ine) ACE_HAS_WIN32_STRUCTURAL_EXCEPTIONS in config.h ACE_SEH_TRY { // Call completion hook -- cgit v1.2.1