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 bug with wrong instance of lib being called for load/close #113

Merged
merged 2 commits into from
Apr 23, 2024

Conversation

klueska
Copy link
Contributor

@klueska klueska commented Apr 22, 2024

Without this change, go-nvlib is broken, when looking up symbol names, for example. Also, no v2 or v3 symbols are loaded as expected which breaks, for example, GetGpuInstancePossiblePlacements() for the extended media types.

@klueska klueska requested a review from elezar April 22, 2024 21:17
The refcount is still 0 within the body of load(), making the check in
LookupSymbol() think that the library isn't loaded yet while calling
updateVersionedSymbols(). This change replaces calls with
library.LookupSymbol() within updateVersionedSymbols() to calls of
library.dl.Lookup() directly to avoid the check against refcount.

Signed-off-by: Kevin Klues <[email protected]>
@klueska klueska force-pushed the fix-bug-load-close branch from 31312e5 to 73ee14c Compare April 22, 2024 23:59
Copy link
Member

@elezar elezar left a comment

Choose a reason for hiding this comment

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

Does this mean we need to update mig-parted to include this fix?

Are there other functions that are critical for our own components?

@klueska klueska merged commit c7513c3 into NVIDIA:main Apr 23, 2024
4 checks passed
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.

2 participants