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 infinite loop on macOS with TIMING enabled #49632

Merged

Conversation

topolarity
Copy link
Member

jl_pathname_for_handle calls jl_load_dynamic_library internally on macOS, so naively calling it for our TIMING instrumentation causes an infinite loop.

This is a simple fix that disables instrumentation when we are RTLD_NOLOAD'ing the library, which probably makes the trace information more meaningful as a set of opened libraries anyway.

`jl_pathname_for_handle` calls `jl_load_dynamic_library` internally on
macOS, so naively calling it for our TIMING instrumentation causes an
infinite loop.

This is a simple fix that disables instrumentation when we are
RTLD_NOLOAD'ing the library, which probably makes the trace information
more meaningful as a set of _opened_ libraries anyway.
@topolarity topolarity force-pushed the macos-timing-recursion-fix branch from 4f86d05 to 3fccc9a Compare May 4, 2023 20:02
@topolarity topolarity added the merge me PR is reviewed. Merge when all tests are passing label May 5, 2023
@KristofferC KristofferC merged commit 68cdf29 into JuliaLang:master May 5, 2023
@DilumAluthge DilumAluthge removed the merge me PR is reviewed. Merge when all tests are passing label May 5, 2023
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.

4 participants