Skip to content

Fix crash in static database destruction due to unsafe lambda capture #241

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

Open
wants to merge 1 commit into
base: dev
Choose a base branch
from

Conversation

amoskahiga
Copy link

Crash would occur at exit when a static shared_ptr object was destroyed due to capturing local variables by value using [=] in the shared_ptr's custom deleter lambda. The deleter doesn't use any captured variables so use an empty clause instead.

Crash would occur when a static object holding a shared_ptr<sqlite3>
object was destroyed due to capturing local variables by value using [=]
in the shared_ptr's custom deleter lambda. The deleter doesn't use any
captured variables so use an empty clause instead.
@amoskahiga amoskahiga marked this pull request as ready for review May 22, 2025 01:50
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.

1 participant