Invalidated context may be used in query observer callback

Description

After was fixed in LiteCore, we have seen that if the change callback is called after the c4queryobserver is disabled and the context object passed to th c4queryobserver is released (freed), the already-freed context object will be used and cause the crash.

The usage scenario that could cause the problem is when the query's listener token is removed at the same time that there is a new query's result change to be notified.

Activity

Show:

CB robot May 23, 2024 at 4:04 PM

Build couchbase-lite-c-3.2.0-41 contains couchbase-lite-c commit 3795baf with commit message:
: Fix a released captured context may be used in observer callback + LiteCore 3.2.0-189 (#534)

Fixed
Pinned fields
Click on the next to a field label to start pinning.

Details

Assignee

Reporter

Story Points

Components

Fix versions

Affects versions

Priority

Instabug

Open Instabug

PagerDuty

Sentry

Zendesk Support

Created April 22, 2024 at 2:40 AM
Updated October 25, 2024 at 2:41 AM
Resolved July 24, 2024 at 6:41 PM
Instabug