Skip to content

Commit 61653a1

Browse files
Joachim KernTheRealMDoerr
Joachim Kern
authored andcommittedNov 30, 2023
8320830: [AIX] Dont mix os::dll_load() with direct dlclose() calls
Reviewed-by: stuefe, clanger
1 parent 8b102ed commit 61653a1

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed
 

‎src/hotspot/os/aix/libodm_aix.cpp

+3-3
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@
3535
dynamicOdm::dynamicOdm() {
3636
const char* libodmname = "/usr/lib/libodm.a(shr_64.o)";
3737
char ebuf[512];
38-
void* _libhandle = os::dll_load(libodmname, ebuf, sizeof(ebuf));
38+
_libhandle = os::dll_load(libodmname, ebuf, sizeof(ebuf));
3939

4040
if (!_libhandle) {
4141
trcVerbose("Cannot load %s (error %s)", libodmname, ebuf);
@@ -48,14 +48,14 @@ dynamicOdm::dynamicOdm() {
4848
_odm_terminate = (fun_odm_terminate )dlsym(_libhandle, "odm_terminate" );
4949
if (!_odm_initialize || !_odm_set_path || !_odm_mount_class || !_odm_get_obj || !_odm_terminate) {
5050
trcVerbose("Couldn't find all required odm symbols from %s", libodmname);
51-
dlclose(_libhandle);
51+
os::dll_unload(_libhandle);
5252
_libhandle = nullptr;
5353
return;
5454
}
5555
}
5656

5757
dynamicOdm::~dynamicOdm() {
58-
if (_libhandle) { dlclose(_libhandle); }
58+
if (_libhandle) { os::dll_unload(_libhandle); }
5959
}
6060

6161

‎src/hotspot/os/aix/libperfstat_aix.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@ bool libperfstat::init() {
114114
void libperfstat::cleanup() {
115115

116116
if (g_libhandle) {
117-
dlclose(g_libhandle);
117+
os::dll_unload(g_libhandle);
118118
g_libhandle = nullptr;
119119
}
120120

0 commit comments

Comments
 (0)
Please sign in to comment.