[Question] heap-use-after-free after deleting database::DatabaseReference
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
調査の方向性
まず、issue に記載されている DatabaseReference のライフタイムと listener の削除動作を確認します。これには、ValueListener、ChildListener、および get 操作で使用される onFinish callback が含まれます。heap-use-after-free を発生させずに参照を安全に破棄できるタイミングを特定し、listener の削除に関して期待される動作を文書化するか再現します。
索引モデルが issue の本文から書いたものです。
説明
[REQUIRED] Please fill in the following fields:
- Pre-built SDK from the website or open-source from this repo: open source from this repo
- Firebase C++ SDK version: all
- Main Firebase Components in concern: Database
- Other Firebase Components in use: -
- Platform you are using the C++ SDK on: Linux
- Platform you are targeting: iOS, Android, Destkop
[REQUIRED] Please describe the question here:
I have lot of issue with "heap-use-after-free". To what I understand, the issue is linked to the fact reference is removed while beeing still in use in the SDK. When I made some "get" I just wait for the onFinish callback to be sure that firebase SDK don't need the reference anymore. But when using with Listener (ValueListener or ChildListener) we have no callback saying that the remove listener is finished. Then it's not clear when the reference can be safely destroyed. I tried lot of different approach but I always ends in use after free issue. Where can I find more informations about when a reference can be destroyed without risking a crash ?
- 主要言語
- C++
- スター
- 326
- フォーク
- 138
- 平均マージ
- 1日 22時間
- マージ済み PR(30日)
- 6
環境構築
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
firebase/firebase-cpp-sdk のほかの issue
-
new type: question
難易度 2/5 1〜3時間 初心者へのやさしさ 85/100
firebase/firebase-cpp-sdk#1926 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
firebase/firebase-cpp-sdk#1905 · コメント 2 件 ·
メンテナーはふだん 1 日以内に返信
-
api: firestore
難易度 5/5 1週間以上 初心者へのやさしさ 35/100
firebase/firebase-cpp-sdk#1920 · コメント 3 件 ·
メンテナーはふだん 1 日以内に返信
-
難易度 3/5 1〜2日 初心者へのやさしさ 70/100
firebase/firebase-cpp-sdk#1904 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
new type: question
難易度 4/5 3〜5日 初心者へのやさしさ 45/100
firebase/firebase-cpp-sdk#1892 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
firebase/firebase-cpp-sdk の issue をすべて見る
似ている issue
-
category:port-update
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
メンテナーはふだん 1 日以内に返信
-
難易度 1/5 1〜3時間 初心者へのやさしさ 88/100
tensorflow/tflite-micro#3784 ·
メンテナーはふだん 1 日以内に返信
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 88/100
メンテナーはふだん 1 日以内に返信
-
agentic-workflows automation
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
tenstorrent/tt-metal#57946 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
aristocratos/btop#1857 ·
メンテナーはふだん 3 日以内に返信