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

Fix re-locking hang found in issue 86684 #88539

Merged
merged 1 commit into from
Apr 12, 2024
Merged
Changes from all commits
Commits
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
12 changes: 6 additions & 6 deletions openmp/runtime/src/z_Linux_util.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2141,10 +2141,10 @@ int __kmp_is_address_mapped(void *addr) {
// We pass from number of vm entry's semantic
// to size of whole entry map list.
lstsz = lstsz * 4 / 3;
buf = reinterpret_cast<char *>(kmpc_malloc(lstsz));
buf = reinterpret_cast<char *>(KMP_INTERNAL_MALLOC(lstsz));
rc = sysctl(mib, 4, buf, &lstsz, NULL, 0);
if (rc < 0) {
kmpc_free(buf);
KMP_INTERNAL_FREE(buf);
return 0;
}

Expand All @@ -2168,7 +2168,7 @@ int __kmp_is_address_mapped(void *addr) {
}
lw += cursz;
}
kmpc_free(buf);
KMP_INTERNAL_FREE(buf);
#elif KMP_OS_DRAGONFLY
char err[_POSIX2_LINE_MAX];
kinfo_proc *proc;
Expand Down Expand Up @@ -2234,12 +2234,12 @@ int __kmp_is_address_mapped(void *addr) {
return 0;
}

buf = kmpc_malloc(sz);
buf = KMP_INTERNAL_MALLOC(sz);

while (sz > 0 && (rd = pread(file, buf, sz, 0)) == sz) {
void *newbuf;
sz <<= 1;
newbuf = kmpc_realloc(buf, sz);
newbuf = KMP_INTERNAL_REALLOC(buf, sz);
buf = newbuf;
}

Expand All @@ -2255,7 +2255,7 @@ int __kmp_is_address_mapped(void *addr) {
}
}

kmpc_free(map);
KMP_INTERNAL_FREE(map);
close(file);
KMP_INTERNAL_FREE(name);
#elif KMP_OS_DARWIN
Expand Down
Loading