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

Better Libdl.dlopen error when using non-standard extension #46998

Merged
merged 1 commit into from
Oct 25, 2022

Commits on Oct 1, 2022

  1. Better Libdl.dlopen error when using non-standard extension

    When trying to dlopen a file with non-standard extension (e.g. `foo.so`
    instead of `foo.dylib` when running on macOS), if this failed (e.g.
    because of a reference to an undefined symbol), then instead of printing
    the error message returned by `dlerror` with a helpful notice what
    went wrong, a message indicating something to the effect that
    "foo.so.dylib was not found" was shown, which was not helpful at all.
    
    To get the actual helpful error message, add a check so that when dlopen
    fails for a file that actually exists, we don't retry loading from a
    file with the standard extension attached, which might not even exist;
    instead we just give up.
    
    This matches what is already being done for relative paths. This patch
    simply copies the relevant check to also be applied to the case dealing
    with absolute paths.
    fingolfin committed Oct 1, 2022
    Configuration menu
    Copy the full SHA
    0db55be View commit details
    Browse the repository at this point in the history