We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent f71ea60 commit 16e60e1Copy full SHA for 16e60e1
1 file changed
ddprof-lib/src/main/cpp/libraryPatcher_linux.cpp
@@ -88,15 +88,9 @@ void LibraryPatcher::patch_libraries() {
88
void LibraryPatcher::patch_library_unlocked(CodeCache* lib) {
89
char path[PATH_MAX];
90
char* resolved_path = realpath(lib->name(), path);
91
- if (resolved_path == nullptr) {
92
- // virtual file, e.g. [vdso], etc.
93
- // scan-build false positive: resolved_path is used at line 96
94
- resolved_path = (char*)lib->name();
95
- } else {
96
- // Don't patch self
97
- if (strcmp(resolved_path,_profiler_name) == 0) {
98
- return;
99
- }
+ if (resolved_path != nullptr && // filter out virtual file, e.g. [vdso], etc.
+ strcmp(resolved_path, _profiler_name) == 0) { // Don't patch self
+ return;
100
}
101
102
void** pthread_create_location = (void**)lib->findImport(im_pthread_create);
0 commit comments