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

confd: Don't cache libyang module references #237

Merged
merged 1 commit into from
Nov 29, 2023
Merged

Conversation

wkz
Copy link
Contributor

@wkz wkz commented Nov 29, 2023

As it turns out, references to module objects are not safe to keep across callbacks. In particular: loading a new model into sysrepo at runtime may cause it to move objects around in memory.

Therefore, fetch a valid reference to "infix-system" on every callback instead.

As it turns out, references to module objects are not safe to keep
across callbacks. In particular: loading a new model into sysrepo at
runtime may cause it to move objects around in memory.

Therefore, fetch a valid reference to "infix-system" on every callback
instead.
@wkz wkz requested review from troglobit and mattiaswal November 29, 2023 22:14
Copy link
Contributor

@troglobit troglobit left a comment

Choose a reason for hiding this comment

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

Amazing find, awesome work tracking this one down! <3

@troglobit
Copy link
Contributor

troglobit commented Nov 29, 2023

I was actually sniffing around this one, just had a feeling about it, but ended up spending too many hours trying to dump the schema instead.

I'll merge to main as soon as the tests pass.

@troglobit troglobit merged commit 10ece43 into main Nov 29, 2023
2 checks passed
@troglobit troglobit deleted the confd-ly-mod-fix branch November 29, 2023 22:52
@troglobit troglobit added this to the Infix v23.11 milestone Dec 1, 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.

2 participants