aboutsummaryrefslogtreecommitdiff
path: root/src/core/CL/OpenCL.cpp
diff options
context:
space:
mode:
authorAnthony Barbier <anthony.barbier@arm.com>2017-12-14 10:58:47 +0000
committerAnthony Barbier <anthony.barbier@arm.com>2018-11-02 16:42:33 +0000
commit7b43d311fea58e6fd14317f72ec40c84c5c21fc6 (patch)
tree2ddbe7f3601ce1651d1199dc9716bb0fbe4c31a5 /src/core/CL/OpenCL.cpp
parenta58b61e803adb90fc4c0459e431da03c690c69a7 (diff)
downloadComputeLibrary-7b43d311fea58e6fd14317f72ec40c84c5c21fc6.tar.gz
COMPMID-556: Don't call dlclose
Calling dlclose on a handle meanse the library will get unloaded and therefore its symbols won't be valid anymore. Shared libraries are automatically unloaded when the application exits, so we can just 'leak' the handles. https://stackoverflow.com/questions/26131102/is-it-safe-to-call-dlclose-after-dlsym Change-Id: I8991af0887e5e48108fe787a77e003dd7c872361 Reviewed-on: https://eu-gerrit-1.euhpc.arm.com/113264 Reviewed-by: Michalis Spyrou <michalis.spyrou@arm.com> Reviewed-by: Gian Marco Iodice <gianmarco.iodice@arm.com> Tested-by: BSG Visual Compute Jenkins server to access repositories on http://mpd-gerrit.cambridge.arm.com <bsgcomp@arm.com>
Diffstat (limited to 'src/core/CL/OpenCL.cpp')
-rw-r--r--src/core/CL/OpenCL.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/core/CL/OpenCL.cpp b/src/core/CL/OpenCL.cpp
index 3a145e0ab3..157b6d6820 100644
--- a/src/core/CL/OpenCL.cpp
+++ b/src/core/CL/OpenCL.cpp
@@ -110,7 +110,7 @@ bool CLSymbols::load(const std::string &library)
#undef LOAD_FUNCTION_PTR
- dlclose(handle);
+ //Don't call dlclose(handle) or all the symbols will be unloaded !
// Disable default loading and set status to successful
_loaded = std::make_pair(true, true);