Skip to content

Dangling reference to filterFunc in DatabaseSync::ApplyChangeset in node_sqlite.ccΒ #62276

@iamstolis

Description

@iamstolis

DatabaseSync::ApplyChangeset() in node_sqlite.cc initializes context.filterCallback by a lambda that captures filterFunc by reference. filterFunc is defined in a block that ends before the callback is invoked (via sqlite3changeset_apply()). So, filterFunc is a dangling reference by that time. The lamda should capture filterFunc by value (compare with the correct capture of context.conflictCallback lambda few lines above).

Metadata

Metadata

Assignees

No one assigned

    Labels

    sqliteIssues and PRs related to the SQLite subsystem.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions