Browse Source

Merge branch 'candidate-7.6.0' into candidate-7.6.x

Signed-off-by: Richard Chapman <rchapman@hpccsystems.com>
Richard Chapman 5 years ago
parent
commit
de7a10cb45

+ 6 - 1
cmake_modules/commonSetup.cmake

@@ -338,11 +338,16 @@ IF ("${COMMONSETUP_DONE}" STREQUAL "")
   if (CMAKE_COMPILER_IS_GNUCC AND NOT CMAKE_BUILD_TYPE STREQUAL "Debug" AND NOT CMAKE_BUILD_TYPE STREQUAL "RelWithDebInfo")
     add_definitions (-fvisibility=hidden)
   endif ()
-  if (((CMAKE_COMPILER_IS_GNUCXX AND CMAKE_CXX_COMPILER_VERSION VERSION_GREATER 8.0.0) OR CMAKE_COMPILER_IS_CLANGXX) AND CMAKE_BUILD_TYPE STREQUAL "Debug")
+  if (CMAKE_COMPILER_IS_CLANGXX AND CMAKE_BUILD_TYPE STREQUAL "Debug")
     add_definitions (-fsanitize=undefined -fno-sanitize=alignment -fsanitize-trap=undefined)
     SET (CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -fsanitize=undefined")
     SET (CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -fsanitize=undefined")
   endif ()
+  if ((CMAKE_COMPILER_IS_GNUCXX AND CMAKE_CXX_COMPILER_VERSION VERSION_GREATER 8.0.0) AND CMAKE_BUILD_TYPE STREQUAL "Debug")
+    add_definitions (-fsanitize=undefined -fno-sanitize=alignment -fsanitize-undefined-trap-on-error)
+    SET (CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -fsanitize=undefined")
+    SET (CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -fsanitize=undefined")
+  endif ()
   if (CMAKE_COMPILER_IS_CLANGXX)
     execute_process( COMMAND ${CMAKE_CXX_COMPILER} --version OUTPUT_VARIABLE clang_full_version_string )
     if (${clang_full_version_string} MATCHES "Apple LLVM version ([0-9]+\\.[0-9]+\\.[0-9]+).*")

+ 2 - 2
common/deftype/deftype.ipp

@@ -1062,14 +1062,14 @@ struct CStringTypeKey
 {
     ExtraInfoAttr charset;
     ExtraInfoAttr collation;
-    memsize_t length;   // to make sure that there is no random packing in the structure
+    memsize_t length = 0;   // to make sure that there is no random packing in the structure
 };
 typedef MapXToIInterface<CStringTypeKey, CStringTypeKey &> CStringTypeToTypeMap;
 
 struct CUnicodeTypeKey
 {
     ExtraInfoAttr locale;
-    memsize_t length;   // to make sure that there is no random packing in the structure
+    memsize_t length = 0;   // to make sure that there is no random packing in the structure
 };
 typedef MapXToIInterface<CUnicodeTypeKey, CUnicodeTypeKey &> CUnicodeTypeToTypeMap;
 

+ 1 - 0
common/dllserver/dllserver.cpp

@@ -813,6 +813,7 @@ void cleanUpOldDlls()
     unsigned month;
     unsigned day;
     cutoff->getGmtDate(year, month, day);
+    //MORE: Should this test be removed?
     if (false && month-- == 1)
     {
         month = 12;

+ 9 - 9
common/fileview2/fvidxsource.ipp

@@ -82,21 +82,21 @@ protected:
     Owned<IOutputMetaData> diskRecordMeta;
     Owned<IDistributedFile> df;
     Linked<FVDataSource> original;
-    unsigned __int64 totalRows;
-    unsigned __int64 nextRowToRead;
-    unsigned keyedSize;
+    unsigned __int64 totalRows = 0;
+    unsigned __int64 nextRowToRead = 0;
+    unsigned keyedSize = 0;
     UnsignedArray keyedOffsets;
     TypeInfoArray keyedTypes;
     Owned<IKeyIndex> tlk;
     Owned<IKeyManager> manager;
     Owned<IKeyIndex> curPart;
-    int curPartIndex;
+    int curPartIndex = 0;
     UnsignedArray matchingParts;
-    unsigned numParts;
-    bool singlePart;
-    bool filtered;
-    bool isLocal;
-    bool ignoreSkippedRows;
+    unsigned numParts = 0;
+    bool singlePart = false;
+    bool filtered = false;
+    bool isLocal = false;
+    bool ignoreSkippedRows = false;
     IndexPageCache cache;
 };
 

+ 7 - 7
common/remote/hooks/libarchive/archive.cpp

@@ -282,19 +282,19 @@ public:
         return 0;
     }
 protected:
-    struct archive *archive;
-    offset_t fileSize;
+    struct archive *archive = nullptr;
+    offset_t fileSize = 0;
 #if ARCHIVE_VERSION_NUMBER < 3000000
-    off_t curPos;
+    off_t curPos = 0;
 #else
 #if defined(_WIN32)
 #define	int64_t	__int64
 #endif
-    int64_t curPos;
+    int64_t curPos = 0;
 #endif
-    offset_t lastPos;
-    size_t curBuffSize;
-    const void *curBuff;
+    offset_t lastPos = 0;
+    size_t curBuffSize = 0;
+    const void *curBuff = nullptr;
     StringAttr fullName;
 };
 

+ 3 - 3
common/thorhelper/roxielmj.hpp

@@ -47,10 +47,10 @@ public:
 //CRHRollingCache copied/modified from THOR
 class CRHRollingCache: extends CInterface
 {
-    unsigned max; // max cache size
+    unsigned max = 0; // max cache size
     QueueOf<CRHRollingCacheElem,true> cache;
-    IRowStream * in;
-    bool eos;
+    IRowStream * in = nullptr;
+    bool eos = false;
 public:
     ~CRHRollingCache();
     void init(IRowStream *_in, unsigned _max);

+ 2 - 2
common/thorhelper/thorread.cpp

@@ -508,7 +508,7 @@ protected:
 
 private:
     template <class PROCESS>
-    inline const void * inlineNextRow(PROCESS processor) __attribute((always_inline));
+    inline const void * inlineNextRow(PROCESS processor) __attribute__((always_inline));
 
 protected:
     ISourceRowPrefetcher * actualRowPrefetcher = nullptr;
@@ -1238,7 +1238,7 @@ public:
 
 private:
     template <class PROCESS>
-    inline const void * inlineNextRow(PROCESS processor) __attribute((always_inline));
+    inline const void * inlineNextRow(PROCESS processor) __attribute__((always_inline));
 
 protected:
     ISourceRowPrefetcher * projectedRowPrefetcher = nullptr;

+ 0 - 143
common/thorhelper/thorxmlwrite.cpp

@@ -150,146 +150,3 @@ extern thorhelper_decl void convertRowToJSON(size32_t & lenResult, char * & resu
     rtlStrToStrX(sizeResult, result, writer.length(), writer.str());
     lenResult = rtlUtf8Length(sizeResult, result);
 }
-
-
-//=============================================================================================
-
-void PropertyTreeXmlWriter::outputLiteralString(size32_t size, const char *value, const char *fieldname)
-{
-    //Horrible that there is no interface for adding a (len, data) string
-    StringBuffer temp;
-    temp.append(size, value);
-    root->addProp(fieldname, temp.str());
-}
-
-void PropertyTreeXmlWriter::outputInlineXml(const char *text)
-{
-    throwUnexpected();
-}
-
-void PropertyTreeXmlWriter::outputQuoted(const char *text)
-{
-    throwUnexpected();
-}
-
-void PropertyTreeXmlWriter::outputQString(unsigned len, const char *value, const char *fieldname)
-{
-    MemoryAttr tempBuffer;
-    char * temp = (char *)tempBuffer.allocate(len);
-    rtlQStrToStr(len, temp, len, value);
-    outputString(len, temp, fieldname);
-}
-
-void PropertyTreeXmlWriter::outputString(unsigned len, const char *value, const char *fieldname)
-{
-    size32_t resultLen;
-    rtlDataAttr result;
-    rtlStrToUtf8X(resultLen, result.refstr(), len, value);
-
-    size32_t size = rtlUtf8Size(resultLen, result.getstr());
-    outputLiteralString(size, result.getstr(), fieldname);
-}
-
-void PropertyTreeXmlWriter::outputBool(bool value, const char *fieldname)
-{
-    root->setPropBool(fieldname, value);
-}
-
-void PropertyTreeXmlWriter::outputData(unsigned len, const void *value, const char *fieldname)
-{
-    root->setPropBin(fieldname, len, value);
-}
-
-void PropertyTreeXmlWriter::outputInt(__int64 value, unsigned size, const char *fieldname)
-{
-    root->setPropInt64(fieldname, value);
-}
-
-void PropertyTreeXmlWriter::outputUInt(unsigned __int64 value, unsigned size, const char *fieldname)
-{
-    //Convert to string first?
-    root->setPropInt64(fieldname, value);
-}
-
-void PropertyTreeXmlWriter::outputReal(double value, const char *fieldname)
-{
-    StringAttr temp;
-    temp.setown(rtlRealToVStrX(value));
-    root->setProp(fieldname, temp);
-}
-
-void PropertyTreeXmlWriter::outputDecimal(const void *value, unsigned size, unsigned precision, const char *fieldname)
-{
-    Decimal temp;
-    char text[50];
-    temp.setDecimal(size, precision, value);
-    temp.getCString(sizeof(text), text);
-    root->setProp(fieldname, text);
-}
-
-void PropertyTreeXmlWriter::outputUDecimal(const void *value, unsigned size, unsigned precision, const char *fieldname)
-{
-    Decimal temp;
-    char text[50];
-    temp.setUDecimal(size, precision, value);
-    temp.getCString(sizeof(text), text);
-    root->setProp(fieldname, text);
-}
-
-void PropertyTreeXmlWriter::outputUnicode(unsigned len, const UChar *value, const char *fieldname)
-{
-    size32_t resultLen;
-    rtlDataAttr result;
-    rtlUnicodeToUtf8X(resultLen, result.refstr(), len, value);
-
-    size32_t size = rtlUtf8Size(resultLen, result.getstr());
-    outputLiteralString(size, result.getstr(), fieldname);
-}
-
-void PropertyTreeXmlWriter::outputUtf8(unsigned len, const char *value, const char *fieldname)
-{
-    size32_t size = rtlUtf8Size(len, value);
-    outputLiteralString(size, value, fieldname);
-}
-
-void PropertyTreeXmlWriter::outputBeginDataset(const char *fieldname, bool nestChildren)
-{
-    stack.append(*root);
-    root = root->setPropTree(fieldname);
-}
-
-void PropertyTreeXmlWriter::outputEndDataset(const char *fieldname)
-{
-    root = &stack.popGet();
-}
-
-void PropertyTreeXmlWriter::outputBeginNested(const char *fieldname, bool nestChildren)
-{
-    stack.append(*root);
-    root = root->setPropTree(fieldname);
-}
-
-void PropertyTreeXmlWriter::outputEndNested(const char *fieldname)
-{
-    root = &stack.popGet();
-}
-
-void PropertyTreeXmlWriter::outputBeginArray(const char *fieldname) //repeated elements are inline for xml
-{
-    throwUnexpected();
-}
-
-void PropertyTreeXmlWriter::outputEndArray(const char *fieldname)
-{
-    throwUnexpected();
-}
-
-void PropertyTreeXmlWriter::outputSetAll()
-{
-    throwUnexpected();
-}
-
-void PropertyTreeXmlWriter::outputXmlns(const char *name, const char *uri)
-{
-    throwUnexpected();
-}

+ 0 - 37
common/thorhelper/thorxmlwrite.hpp

@@ -57,43 +57,6 @@ public:
 
 };
 
-class thorhelper_decl PropertyTreeXmlWriter : implements CInterfaceOf<IXmlWriter>
-{
-public:
-    PropertyTreeXmlWriter(IPropertyTree * _root) : root(_root) {}
-
-    virtual void outputInlineXml(const char *text) override;
-    virtual void outputQuoted(const char *text) override;
-    virtual void outputQString(unsigned len, const char *field, const char *fieldname) override;
-    virtual void outputString(unsigned len, const char *field, const char *fieldname) override;
-    virtual void outputBool(bool field, const char *fieldname) override;
-    virtual void outputData(unsigned len, const void *field, const char *fieldname) override;
-    virtual void outputInt(__int64 field, unsigned size, const char *fieldname) override;
-    virtual void outputUInt(unsigned __int64 field, unsigned size, const char *fieldname) override;
-    virtual void outputReal(double field, const char *fieldname) override;
-    virtual void outputDecimal(const void *field, unsigned size, unsigned precision, const char *fieldname) override;
-    virtual void outputUDecimal(const void *field, unsigned size, unsigned precision, const char *fieldname) override;
-    virtual void outputUnicode(unsigned len, const UChar *field, const char *fieldname) override;
-    virtual void outputUtf8(unsigned len, const char *field, const char *fieldname) override;
-    virtual void outputBeginDataset(const char *dsname, bool nestChildren) override;
-    virtual void outputEndDataset(const char *dsname) override;
-    virtual void outputBeginNested(const char *fieldname, bool nestChildren) override;
-    virtual void outputEndNested(const char *fieldname) override;
-    virtual void outputBeginArray(const char *fieldname) override; //repeated elements are inline for xml
-    virtual void outputEndArray(const char *fieldname) override;
-    virtual void outputSetAll() override;
-    virtual void outputXmlns(const char *name, const char *uri) override;
-
-protected:
-    void outputLiteralString(size32_t size, const char *value, const char *fieldname);
-
-protected:
-    IPropertyTree * root;
-    ICopyArrayOf<IPropertyTree> stack;
-};
-
-
-
 extern thorhelper_decl void printKeyedValues(StringBuffer &out, IIndexReadContext *segs, IOutputMetaData *rowMeta);
 
 extern thorhelper_decl void convertRowToXML(size32_t & lenResult, char * & result, IOutputMetaData & info, const void * row, unsigned flags = (unsigned)-1);

+ 0 - 1
dali/base/dacsds.ipp

@@ -93,7 +93,6 @@ public:
 private:
     CriticalSection lockCrit;
     unsigned lockCount;
-    unsigned hash;
     bool lazyFetch;
     bool stateChanges;      // =false when client applying server received changes
     bool connected, serverIterAvailable, serverIter, useAppendOpt, serverGetIdsAvailable;

+ 1 - 0
dali/base/dadfs.hpp

@@ -40,6 +40,7 @@
 #include "seclib.hpp"
 
 #include <vector>
+#include <string>
 
 typedef __int64 DistributedLockID;
 #define FOREIGN_DALI_TIMEOUT (1000*60*5)

+ 1 - 1
ecl/hqlcpp/hqlsource.cpp

@@ -3080,7 +3080,7 @@ class DiskReadBuilder : public DiskReadBuilderBase
 {
 public:
     DiskReadBuilder(HqlCppTranslator & _translator, IHqlExpression *_tableExpr, IHqlExpression *_nameExpr)
-        : DiskReadBuilderBase(_translator, _tableExpr, _nameExpr, (modeOp != no_pipe))
+        : DiskReadBuilderBase(_translator, _tableExpr, _nameExpr, (_tableExpr->queryChild(2)->getOperator() != no_pipe))
     {
         extractCanMatch = (modeOp == no_thor) || (modeOp == no_flat) ||
                           ((modeOp == no_csv) && genericDiskRead);

+ 4 - 3
ecl/hthor/hthor.cpp

@@ -45,6 +45,7 @@
 #include "thorsort.hpp"
 #include "thorparse.ipp"
 #include "thorxmlwrite.hpp"
+#include "rtlformat.hpp"
 #include "thorcommon.hpp"
 #include "jsmartsock.hpp"
 #include "thorstep.hpp"
@@ -1615,7 +1616,7 @@ public:
         {
             writeTransformer->writeTranslatedText(row, pipe);
         }
-        catch (IException *e)
+        catch (IException *)
         {
             ReleaseRoxieRow(row);
             throw;
@@ -10443,7 +10444,7 @@ CHThorNewDiskReadBaseActivity::CHThorNewDiskReadBaseActivity(IAgentContext &_age
             recordTranslationModeHint = getTranslationMode(recordTranslationModeHintText);
     }
 
-    PropertyTreeXmlWriter writer(formatOptions);
+    CPropertyTreeWriter writer(formatOptions);
     helper.getFormatOptions(writer);
 }
 
@@ -10505,7 +10506,7 @@ void CHThorNewDiskReadBaseActivity::resolveFile()
     if (helper.getFlags() & TDRdynformatoptions)
     {
         curFormatOptions.setown(createPTreeFromIPT(formatOptions));
-        PropertyTreeXmlWriter writer(curFormatOptions);
+        CPropertyTreeWriter writer(curFormatOptions);
         helper.getFormatDynOptions(writer);
     }
     else

+ 3 - 0
roxie/ccd/CMakeLists.txt

@@ -94,6 +94,9 @@ include_directories (
 
 if (CMAKE_COMPILER_IS_GNUCC OR CMAKE_COMPILER_IS_CLANG)
   SET (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Wextra -Wno-switch -Wno-unused-parameter -Werror -Wno-delete-non-virtual-dtor -Wno-overloaded-virtual")
+  if (CMAKE_COMPILER_IS_GNUCC AND NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS "8.0.0")
+    SET (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-class-memaccess")
+  endif()
 endif()
 
 ADD_DEFINITIONS( -D_USRDLL -DCCD_EXPORTS -DSTARTQUERY_EXPORTS )

+ 1 - 1
system/CMakeLists.txt

@@ -29,6 +29,6 @@ if (NOT JLIB_ONLY)
    if (USE_AERON)
        project (aeron_include)
          remove_definitions(-fvisibility=hidden)
-         HPCC_ADD_SUBDIRECTORY (aeron "PLATFORM")
+         HPCC_ADD_SUBDIRECTORY (aeron)
    endif()
 endif( )

+ 4 - 1
system/include/platform.h

@@ -530,11 +530,14 @@ typedef unsigned __int64 timestamp_type;
 //use these macros before a function definition to disable a particular sanitize option for the body of that function
 
 #ifdef __clang__
- #define NO_SANITIZE(a) [[clang::no_sanitize(a)]]
+  #define NO_SANITIZE(a) [[clang::no_sanitize(a)]]
+  #define NO_SANITIZE_FUNCTION [[clang::no_sanitize("function")]]
 #elif __GNUC__ >= 8
  #define NO_SANITIZE(a) [[gnu::no_sanitize(a)]]
+ #define NO_SANITIZE_FUNCTION [[gnu::no_sanitize("undefined")]]
 #else
  #define NO_SANITIZE(a)
+ #define NO_SANITIZE_FUNCTION
 #endif
 
 

+ 3 - 5
system/jlib/jbuff.hpp

@@ -480,16 +480,14 @@ public:
 
 class CLargeMemorySequentialReader
 {
-    size32_t left;
-    memsize_t pos;
-    const void *ptr;
+    size32_t left = 0;
+    memsize_t pos = 0;
+    const void *ptr = nullptr;
     CLargeMemoryAllocator &allocator;
 
     inline CLargeMemorySequentialReader(CLargeMemoryAllocator &_allocator)
         : allocator(_allocator)
     {
-        left = 0;
-        pos = 0;
     }
 
     inline const void *read(size32_t &max)

+ 2 - 2
system/jlib/jfile.hpp

@@ -138,8 +138,8 @@ public:
     }
     Linked<IFile> file;
     StringAttr name;
-    bool isdir;
-    __int64 size;
+    bool isdir = false;
+    __int64 size = 0;
     CDateTime modifiedTime;
 };
 

+ 1 - 1
system/jlib/jhash.ipp

@@ -54,7 +54,7 @@ class jlib_decl MappingBase : public CInterfaceOf<IMapping>
 
 protected:
     //Packs into the remainder of the 8byte value from CInterface in 64bit
-    unsigned hash;
+    unsigned hash = 0;
 };
 
 class jlib_decl Mapping : extends MappingBase

+ 2 - 2
system/jlib/jlog.hpp

@@ -499,10 +499,10 @@ protected:
     LogMsgCategory            category;
     LogMsgSysInfo             sysInfo;
     LogMsgJobInfo             jobInfo;
-    LogMsgCode                msgCode;
+    LogMsgCode                msgCode = NoLogMsgCode;
     unsigned                  component;
     StringBuffer              text;
-    bool                      remoteFlag;
+    bool                      remoteFlag = false;
 };
 
 jlib_decl unsigned getPositionOfField(unsigned logfields, unsigned positionoffield);

+ 2 - 2
system/jlib/jmisc.hpp

@@ -291,8 +291,8 @@ private:
 class NoQuickEditSection
 {
 #ifdef _WIN32
-    DWORD savedmode;
-    bool saved;
+    DWORD savedmode = 0;
+    bool saved = false;
 #endif
 public:
     NoQuickEditSection()

+ 1 - 1
system/jlib/jmutex.hpp

@@ -204,7 +204,7 @@ private:
     ThreadId owner;
     unsigned depth;
 #endif
-    inline CriticalSection(CriticalSection & value __attribute__((unused))) { assert(false); } // dummy to prevent inadvertant use as block
+    inline CriticalSection(CriticalSection &) = delete;
 public:
     inline CriticalSection()
     {

+ 7 - 7
system/jlib/jsort.cpp

@@ -56,7 +56,7 @@ static bool sortParallel(unsigned &numcpus)
 #define COMPARE(search,position)    compare(search,position)
 #define INSERT(position,search)     memmove(position,search, width)
 
-NO_SANITIZE("function")
+NO_SANITIZE_FUNCTION
 void * binary_add(const void *newitem, const void *base,
              size32_t nmemb, 
              size32_t width,
@@ -75,7 +75,7 @@ void * binary_add(const void *newitem, const void *base,
 #define INSERT(position,search)     *(const void * *)(position) = search
 #define NEVER_ADD
 
-NO_SANITIZE("function")
+NO_SANITIZE_FUNCTION
 extern jlib_decl void * binary_vec_find(const void *newitem, const void * * base,
                                         size32_t nmemb, 
                                         sortCompareFunction compare,
@@ -96,7 +96,7 @@ extern jlib_decl void * binary_vec_find(const void *newitem, const void * * base
 #define INSERT(position,search)     *(const void * *)(position) = search
 #define NEVER_ADD
 
-NO_SANITIZE("function")
+NO_SANITIZE_FUNCTION
 extern jlib_decl void * binary_vec_find(const void *newitem, const void * * base,
                                         size32_t nmemb, 
                                         ICompare & compare,
@@ -117,7 +117,7 @@ extern jlib_decl void * binary_vec_find(const void *newitem, const void * * base
 #define INSERT(position,search)     *(const void * *)(position) = search
 #define ALWAYS_ADD
 
-NO_SANITIZE("function")
+NO_SANITIZE_FUNCTION
 extern jlib_decl void * binary_vec_insert(const void *newitem, const void * * base,
                                           size32_t nmemb, 
                                           sortCompareFunction compare)
@@ -135,7 +135,7 @@ extern jlib_decl void * binary_vec_insert(const void *newitem, const void * * ba
 #define INSERT(position,search)     *(const void * *)(position) = search
 #define ALWAYS_ADD
 
-NO_SANITIZE("function")
+NO_SANITIZE_FUNCTION
 extern jlib_decl void * binary_vec_insert(const void *newitem, const void * * base,
                                           size32_t nmemb, 
                                           ICompare const & compare)
@@ -154,7 +154,7 @@ extern jlib_decl void * binary_vec_insert(const void *newitem, const void * * ba
 #define ALWAYS_ADD
 #define SEEK_LAST_MATCH
 
-NO_SANITIZE("function")
+NO_SANITIZE_FUNCTION
 extern jlib_decl void * binary_vec_insert_stable(const void *newitem, const void * * base,
                                           size32_t nmemb, 
                                           sortCompareFunction compare)
@@ -174,7 +174,7 @@ extern jlib_decl void * binary_vec_insert_stable(const void *newitem, const void
 #define ALWAYS_ADD
 #define SEEK_LAST_MATCH
 
-NO_SANITIZE("function")
+NO_SANITIZE_FUNCTION
 extern jlib_decl void * binary_vec_insert_stable(const void *newitem, const void * * base,
                                           size32_t nmemb, 
                                           ICompare const & compare)

+ 1 - 1
system/jlib/jtime.hpp

@@ -170,7 +170,7 @@ class CTimeMon
 {
 public:
     unsigned t;
-    unsigned timeout;
+    unsigned timeout = 0;
 
     CTimeMon() { t = msTick(); }
 

+ 5 - 5
system/lzma/LzmaEnc.cpp

@@ -820,7 +820,7 @@ static void LenEnc_Encode2(CLenPriceEnc *p, CRangeEnc *rc, UInt32 symbol, UInt32
 }
 
 
-NO_SANITIZE("function")
+NO_SANITIZE_FUNCTION
 static void MovePos(CLzmaEnc *p, UInt32 num)
 {
   #ifdef SHOW_STAT
@@ -834,7 +834,7 @@ static void MovePos(CLzmaEnc *p, UInt32 num)
   }
 }
 
-NO_SANITIZE("function")
+NO_SANITIZE_FUNCTION
 static UInt32 ReadMatchDistances(CLzmaEnc *p, UInt32 *numDistancePairsRes)
 {
   UInt32 lenRes = 0, numPairs;
@@ -948,7 +948,7 @@ static UInt32 Backward(CLzmaEnc *p, UInt32 *backRes, UInt32 cur)
 
 #define LIT_PROBS(pos, prevByte) (p->litProbs + ((((pos) & p->lpMask) << p->lc) + ((prevByte) >> (8 - p->lc))) * 0x300)
 
-NO_SANITIZE("function")
+NO_SANITIZE_FUNCTION
 static UInt32 GetOptimum(CLzmaEnc *p, UInt32 position, UInt32 *backRes)
 {
   UInt32 numAvail, mainLen, numPairs, repMaxIndex, i, posState, lenEnd, len, cur;
@@ -1509,7 +1509,7 @@ static UInt32 GetOptimum(CLzmaEnc *p, UInt32 position, UInt32 *backRes)
 
 #define ChangePair(smallDist, bigDist) (((bigDist) >> 7) > (smallDist))
 
-NO_SANITIZE("function")
+NO_SANITIZE_FUNCTION
 static UInt32 GetOptimumFast(CLzmaEnc *p, UInt32 *backRes)
 {
   UInt32 numAvail, mainLen, mainDist, numPairs, repIndex, repLen, i;
@@ -1754,7 +1754,7 @@ void LzmaEnc_Destroy(CLzmaEncHandle p, ISzAlloc *alloc, ISzAlloc *allocBig)
   alloc->Free(alloc, p);
 }
 
-NO_SANITIZE("function")
+NO_SANITIZE_FUNCTION
 static SRes LzmaEnc_CodeOneBlock(CLzmaEnc *p, Bool useLimits, UInt32 maxPackSize, UInt32 maxUnpackSize)
 {
   UInt32 nowPos32, startPos32;

+ 1 - 0
tools/swapnode/swapnode.cpp

@@ -39,6 +39,7 @@
 #include "workunit.hpp"
 
 #include "swapnodelib.hpp"
+#include <string>
 
 struct DaliClient
 {