Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Load dependencies by name #1594

Open
wants to merge 28 commits into
base: master
Choose a base branch
from
Open
Changes from 1 commit
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
93b61da
Add TBB_VERIFY_DEPENDENCY_SIGNATURE option
aleksei-fedotov Dec 18, 2024
f269320
Avoid manual setting of a size for TCM link table
aleksei-fedotov Dec 18, 2024
6da67a2
Don't load library from working dir on WIN32
aleksei-fedotov Dec 20, 2024
d9561b2
Allow dependency loading without building abs path
aleksei-fedotov Dec 20, 2024
65c6f7d
Load TCM using only its module name
aleksei-fedotov Dec 20, 2024
ce00bfc
Verify module signature during dynamic linking
aleksei-fedotov Dec 30, 2024
3290f75
Do not determine full filepath when it is built
aleksei-fedotov Jan 2, 2025
b7f462f
Use mbsrtowcs for character conversion
aleksei-fedotov Jan 2, 2025
dc871bf
Remove unnecessary variable
aleksei-fedotov Jan 2, 2025
f7d334a
Add TBB's own DYNAMIC_LINK_WARNING implementation
aleksei-fedotov Jan 2, 2025
1f0da0f
Actualize commentaries
aleksei-fedotov Jan 3, 2025
cb5fdf7
Remove debug code
aleksei-fedotov Jan 7, 2025
409799d
Unify loading flags for Windows
aleksei-fedotov Jan 7, 2025
6aba940
Fix build on Linux
aleksei-fedotov Jan 8, 2025
267f581
Improve commentary and fix build w/o dynamic load
aleksei-fedotov Jan 8, 2025
d8248be
Use fprintf_s when it is supported
aleksei-fedotov Jan 9, 2025
3bd2919
Clarify CMake message
aleksei-fedotov Jan 9, 2025
4605226
Remove outdated commentary
aleksei-fedotov Jan 9, 2025
b6e2c65
Document singature validating function
aleksei-fedotov Jan 15, 2025
028d5a1
Use built-in CMake's function for defining macros
aleksei-fedotov Jan 15, 2025
65f95c2
Use actual return type instead of auto keyword
aleksei-fedotov Jan 27, 2025
87c8939
Use SearchPath to find full path to the module
aleksei-fedotov Jan 27, 2025
d305d5d
Reuse previously allocated array on the stack
aleksei-fedotov Jan 27, 2025
32fa261
Shorten the function name
aleksei-fedotov Jan 27, 2025
79ab862
Remove unnecessary code
aleksei-fedotov Jan 27, 2025
0121aca
Correct dynamic link error messages
aleksei-fedotov Jan 27, 2025
b00dc00
Update copyright year in CMakeLists.txt files
aleksei-fedotov Jan 27, 2025
dd5a544
Print dynamic link warnings instead of errors
aleksei-fedotov Jan 27, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Remove unnecessary variable
Signed-off-by: Fedotov, Aleksei <aleksei.fedotov@intel.com>
aleksei-fedotov committed Jan 14, 2025

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
commit dc871bf7a2ab92044dec95f4dcda186c271fe45c
5 changes: 2 additions & 3 deletions src/tbb/dynamic_link.cpp
Original file line number Diff line number Diff line change
@@ -581,16 +581,15 @@ namespace r1 {
// (e.g. because of MS runtime problems - one of those crazy manifest related ones)
UINT prev_mode = SetErrorMode (SEM_FAILCRITICALERRORS);
#if __TBB_VERIFY_DEPENDENCY_SIGNATURE
const char* filepath = path;
char buff[PATH_MAX] = {0};
if ( !(flags & DYNAMIC_LINK_BUILD_ABSOLUTE_PATH) ) { // Get the path if it is not yet built
length = get_module_full_path(buff, /*buffer_length*/PATH_MAX, path);
if (length == 0) // The full path to the module has not been retrieved
return library_handle;
filepath = buff;
path = buff;
}

if (has_valid_signature(filepath, length)) {
if (has_valid_signature(path, length)) {
#endif /* __TBB_VERIFY_DEPENDENCY_SIGNATURE */
#endif /* _WIN32 */
// The second argument (loading_flags) is ignored on Windows