Skip to content
Open
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: 12 additions & 0 deletions dso/unix/dso.c
Original file line number Diff line number Diff line change
Expand Up @@ -173,6 +173,18 @@ APR_DECLARE(apr_status_t) apr_dso_sym(apr_dso_handle_sym_t *ressym,
apr_dso_handle_t *handle,
const char *symname)
{
/* This is necessary for `testdso.c`. For some reason, musl
* builds fail the `test_unload_library` test if the below
* check isn't in place. `test_unload_library` unloads the
* library and then immediately calls this function. Maybe
* musl's `dlsym()` assumes the handle is never NULL and
* some UB is being invoked here...
*/
if (handle->handle == NULL) {
handle->errormsg = "library not loaded";
return APR_ESYMNOTFOUND;
}

#if defined(DSO_USE_SHL)
void *symaddr = NULL;
int status;
Expand Down