Skip to content

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

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).

Activity

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

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