Skip to content

Conversation

@louwers
Copy link
Contributor

@louwers louwers commented Oct 28, 2025

Fixes #60448 by changing from a BaseObjectWeakPtr to a BaseObjectPtr.

A SQLTagStore should keep the database alive.

@nodejs-github-bot
Copy link
Collaborator

Review requested:

  • @nodejs/sqlite

@nodejs-github-bot nodejs-github-bot added c++ Issues and PRs that require attention from people who are familiar with C++. needs-ci PRs that need a full CI run. sqlite Issues and PRs related to the SQLite subsystem. labels Oct 28, 2025
Copy link
Contributor

@cjihrig cjihrig left a 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
Copy link

codecov bot commented Oct 28, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 88.53%. Comparing base (fc0952f) to head (20a0eed).
⚠️ Report is 7 commits behind head on main.

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     
Files with missing lines Coverage Δ
src/node_sqlite.cc 80.26% <100.00%> (+0.09%) ⬆️
src/node_sqlite.h 80.39% <ø> (ø)

... and 31 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@Luisangelgarciahernandez975-prog

This comment was marked as off-topic.

@Luisangelgarciahernandez975-prog

This comment was marked as off-topic.

Copy link
Member

@mcollina mcollina left a comment

Choose a reason for hiding this comment

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

lgtm

@mcollina mcollina added the request-ci Add this label to start a Jenkins CI on a PR. label Dec 29, 2025
@github-actions github-actions bot removed the request-ci Add this label to start a Jenkins CI on a PR. label Dec 29, 2025
@louwers
Copy link
Contributor Author

louwers commented Dec 29, 2025

@mcollina I need to fix the issue brought up by @addaleax.

I need to figure out how to add an internal field to SQLTagStore.

@louwers louwers marked this pull request as draft December 29, 2025 10:53
@louwers louwers marked this pull request as ready for review January 3, 2026 22:25
@louwers
Copy link
Contributor Author

louwers commented Jan 3, 2026

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.

@louwers
Copy link
Contributor Author

louwers commented Jan 4, 2026

Could someone trigger CI? I am not a collaborator.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

c++ Issues and PRs that require attention from people who are familiar with C++. needs-ci PRs that need a full CI run. sqlite Issues and PRs related to the SQLite subsystem.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

sqlite: segmentation fault using SQLTagStore if there's no reference to the underlying database

7 participants