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

dso: Check for NULL handle in apr_dso_sym #40

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

Conversation

gmbeard
Copy link

@gmbeard gmbeard commented Mar 25, 2023

The voidlinux package for apr on musl fails the test_unload_library test in testdso.c without this NULL check. The test unloads the dso and then immediately tries to read a symbol from the unloaded dso, and assumes this fails. I found it was actually succeeding to read the symbol. Maybe musl's dlsym() function assumes you won't pass it a NULL handle, and this test is invoking some UB.

@gmbeard
Copy link
Author

gmbeard commented Apr 21, 2023

I've discovered that the reason this test fails is because dlclose is a no-op on musl, so maybe the test should be ignored on this platform instead.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant