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 June 5, 2024 at 11:40 AM

Build couchbase-lite-ios-3.2.0-103 contains couchbase-lite-ios commit 12dfb61 with commit message:
: Fix a released query context may be used in observer callback (#3285)

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 20, 2024 at 4:34 PM
Updated August 31, 2024 at 10:55 AM
Resolved July 24, 2024 at 6:47 PM
Instabug