Skip to content

Commit

Permalink
Committing TBB 2018 Update 6 source code
Browse files Browse the repository at this point in the history
  • Loading branch information
tbbdev committed Oct 9, 2018
1 parent 615bb97 commit b0d944c
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 5 deletions.
11 changes: 11 additions & 0 deletions CHANGES
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
2 changes: 1 addition & 1 deletion include/tbb/tbb_stddef.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
1 change: 1 addition & 0 deletions src/tbbmalloc/proxy.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
6 changes: 3 additions & 3 deletions src/tbbmalloc/tbb_function_replacement.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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);
Expand Down
2 changes: 1 addition & 1 deletion src/test/test_tbb_version.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -229,7 +229,7 @@ int main(int argc, char *argv[] ) {
void initialize_strings_vector(std::vector <string_pair>* 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));
Expand Down

0 comments on commit b0d944c

Please sign in to comment.