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 release-after-main bug in get_primary_cuda_context #472

Merged
merged 4 commits into from
Sep 25, 2024

Conversation

madsbk
Copy link
Member

@madsbk madsbk commented Sep 25, 2024

Closes #442

@madsbk madsbk added bug Something isn't working non-breaking Introduces a non-breaking change labels Sep 25, 2024
@madsbk madsbk marked this pull request as ready for review September 25, 2024 10:24
@madsbk madsbk requested a review from a team as a code owner September 25, 2024 10:24
@madsbk madsbk requested a review from wence- September 25, 2024 10:24
Comment on lines 31 to 37
// Macros used for defining symbol visibility, only GLIBC is supported.
// Since KvikIO is header-only, we rely on the linker to disambiguate inline functions
// that have (or return) static references. To do this, the relevant function must have
// `__attribute__((visibility("default")))`. If not, then if KvikIO is used in two
// different DSOs, the function will appear twice, and there will be two static objects.
// See <https://github.com/rapidsai/kvikio/issues/442>.
#if (defined(__GNUC__) && !defined(__MINGW32__) && !defined(__MINGW64__))
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: Can we also support clang (https://clang.llvm.org/docs/AttributeReference.html#visibility) given the various people compiling on macos?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actually, clang also defines __GNUC__ by default but I guess adding defined(__clang__) is good since __attribute__((visibility(...))) is valid clang code as well.

@madsbk
Copy link
Member Author

madsbk commented Sep 25, 2024

/merge

@rapids-bot rapids-bot bot merged commit 44b3f97 into rapidsai:branch-24.10 Sep 25, 2024
56 checks passed
@madsbk madsbk deleted the get_primary_cuda_context_bug branch September 25, 2024 18:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working non-breaking Introduces a non-breaking change
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[BUG] get_primary_cuda_context static map is unsafe in three ways
2 participants