diff --git a/CHANGES b/CHANGES index 9d3da0b410..0fe1b48f3a 100644 --- a/CHANGES +++ b/CHANGES @@ -2,6 +2,17 @@ The list of most significant changes made over time in Intel(R) Threading Building Blocks (Intel(R) TBB). +Intel TBB 2018 Update 6 +TBB_INTERFACE_VERSION == 10006 + +Changes (w.r.t. Intel TBB 2018 Update 5): + +Bugs fixed: + +- Fixed an issue with dynamic memory allocation replacement on Windows* + occurred for some versions of ucrtbase.dll. + +------------------------------------------------------------------------ Intel TBB 2018 Update 5 TBB_INTERFACE_VERSION == 10005 diff --git a/include/tbb/tbb_stddef.h b/include/tbb/tbb_stddef.h index 0f4f1795a0..473342daf4 100644 --- a/include/tbb/tbb_stddef.h +++ b/include/tbb/tbb_stddef.h @@ -26,7 +26,7 @@ #define TBB_VERSION_MINOR 0 // Engineering-focused interface version -#define TBB_INTERFACE_VERSION 10005 +#define TBB_INTERFACE_VERSION 10006 #define TBB_INTERFACE_VERSION_MAJOR TBB_INTERFACE_VERSION/1000 // The oldest major interface version still supported diff --git a/src/tbbmalloc/proxy.cpp b/src/tbbmalloc/proxy.cpp index 77da769772..5d67bd70a1 100644 --- a/src/tbbmalloc/proxy.cpp +++ b/src/tbbmalloc/proxy.cpp @@ -375,6 +375,7 @@ const char* known_bytecodes[] = { "C7442410000000008B", // release free() ucrtbase.dll 10.0.14393.33 "E90B000000CCCC", // release _msize() ucrtbase.dll 10.0.14393.33 "48895C24085748", // release _aligned_msize() ucrtbase.dll 10.0.14393.33 + "E903000000CCCC", // release _aligned_msize() ucrtbase.dll 10.0.16299.522 "48894C24084883EC28BA", // debug prologue "4C894424184889542410", // debug _aligned_msize() 10.0 "48894C24084883EC2848", // debug _aligned_free 10.0 diff --git a/src/tbbmalloc/tbb_function_replacement.cpp b/src/tbbmalloc/tbb_function_replacement.cpp index 08191b73bb..93a519ee92 100644 --- a/src/tbbmalloc/tbb_function_replacement.cpp +++ b/src/tbbmalloc/tbb_function_replacement.cpp @@ -378,7 +378,7 @@ static bool InsertTrampoline(void *inpAddr, void *targetAddr, const char ** opco if (!VirtualProtect(inpAddr, MAX_PROBE_SIZE, PAGE_EXECUTE_WRITECOPY, &origProt)) return FALSE; - UINT opcodeIdx = 0; + const char* pattern = NULL; if ( origFunc ){ // Need to store original function code UCHAR * const codePtr = (UCHAR *)inpAddr; if ( *codePtr == 0xE9 ){ // JMP relative instruction @@ -389,12 +389,12 @@ static bool InsertTrampoline(void *inpAddr, void *targetAddr, const char ** opco origFunc = NULL; // now it must be ignored by InsertTrampoline32/64 } else { // find the right opcode pattern - opcodeIdx = CheckOpcodes( opcodes, inpAddr, /*abortOnError=*/true ); + UINT opcodeIdx = CheckOpcodes( opcodes, inpAddr, /*abortOnError=*/true ); __TBB_ASSERT( opcodeIdx > 0, "abortOnError ignored in CheckOpcodes?" ); + pattern = opcodes[opcodeIdx-1]; // -1 compensates for +1 in CheckOpcodes } } - const char* pattern = opcodeIdx>0? opcodes[opcodeIdx-1]: NULL; // -1 compensates for +1 in CheckOpcodes probeSize = InsertTrampoline32(inpAddr, targetAddr, pattern, origFunc); if (!probeSize) probeSize = InsertTrampoline64(inpAddr, targetAddr, pattern, origFunc); diff --git a/src/test/test_tbb_version.cpp b/src/test/test_tbb_version.cpp index dae021e2da..4ca078fa35 100644 --- a/src/test/test_tbb_version.cpp +++ b/src/test/test_tbb_version.cpp @@ -229,7 +229,7 @@ int main(int argc, char *argv[] ) { void initialize_strings_vector(std::vector * vector) { vector->push_back(string_pair("TBB: VERSION\t\t2018.0", required)); // check TBB_VERSION - vector->push_back(string_pair("TBB: INTERFACE VERSION\t10005", required)); // check TBB_INTERFACE_VERSION + vector->push_back(string_pair("TBB: INTERFACE VERSION\t10006", required)); // check TBB_INTERFACE_VERSION vector->push_back(string_pair("TBB: BUILD_DATE", required)); vector->push_back(string_pair("TBB: BUILD_HOST", required)); vector->push_back(string_pair("TBB: BUILD_OS", required));