فهرست منبع

HPCC-13941 Make unicode conversions thread safe.

Previous fix would core if used with threadpools (i.e. in Roxie).

Signed-off-by: Richard Chapman <rchapman@hpccsystems.com>
Richard Chapman 10 سال پیش
والد
کامیت
6113b63b48
1فایلهای تغییر یافته به همراه4 افزوده شده و 0 حذف شده
  1. 4 0
      rtl/eclrtl/eclrtl.cpp

+ 4 - 0
rtl/eclrtl/eclrtl.cpp

@@ -314,8 +314,12 @@ CriticalSection ucmCrit;
 static void clearUnicodeConverterMap()
 {
     delete unicodeConverterMap;
+    unicodeConverterMap = NULL;  // Important to clear, as this is called when threadpool threads end...
     if (prevThreadTerminator)
+    {
         (*prevThreadTerminator)();
+        prevThreadTerminator = NULL;
+    }
 }
 
 RTLUnicodeConverter * queryRTLUnicodeConverter(char const * codepage)