-
-
Notifications
You must be signed in to change notification settings - Fork 34.3k
sqlite: fix segfault SQLTagStore when db handle is garbage collected #60462
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
base: main
Are you sure you want to change the base?
Conversation
|
Review requested:
|
cjihrig
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Left a couple comments, but LGTM.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #60462 +/- ##
==========================================
- Coverage 88.54% 88.53% -0.02%
==========================================
Files 704 704
Lines 208753 208760 +7
Branches 40279 40280 +1
==========================================
- Hits 184844 184821 -23
- Misses 15919 15930 +11
- Partials 7990 8009 +19
🚀 New features to boost your workflow:
|
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
mcollina
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm
|
I implemented @addaleax' suggestion by adding an internal field to SQLTagStore. Admittedly Claude gave a helping hand, I didn't do that before. The tests confirms that the segfault no longer occurs and the memory leak of my previous solution also does not appear. |
|
Could someone trigger CI? I am not a collaborator. |
Fixes #60448 by changing from a
BaseObjectWeakPtrto aBaseObjectPtr.A SQLTagStore should keep the database alive.