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 invalid use of dlopen() #2594

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

kbenzie
Copy link
Contributor

@kbenzie kbenzie commented Jan 21, 2025

When attempting to get a handle for the libOpenCL.so library in order to call dlsym() invalid arguments were set so dlopen() always returned null. This just happened to work due to the value of RTLD_DEFAULT being 0 so the dlsym() calls succeeded. This patch removes the invalid dlopen() usage and explicitly uses RTLD_DEFAULT instead of the null handle.

When attempting to get a handle for the `libOpenCL.so` library in order
to call `dlsym()` invalid arguments were set so `dlopen()` always
returned null. This just happened to work due to the value of
`RTLD_DEFAULT` being 0 so the `dlsym()` calls succeeded. This patch
removes the invalid `dlopen()` usage and explicitly uses `RTLD_DEFAULT`
instead of the null `handle`.
@kbenzie kbenzie requested a review from a team as a code owner January 21, 2025 14:47
@github-actions github-actions bot added the opencl OpenCL adapter specific issues label Jan 21, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
opencl OpenCL adapter specific issues
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants